[Bug 264192] lang/ghc: poudriere based build used odd mix of devel/llvm10 and system toolchain

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 23 May 2022 21:37:58 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264192

            Bug ID: 264192
           Summary: lang/ghc: poudriere based build used odd mix of
                    devel/llvm10 and system toolchain
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: marklmi26-fbsd@yahoo.com
                CC: brooks@FreeBSD.org, haskell@FreeBSD.org
                CC: brooks@FreeBSD.org, haskell@FreeBSD.org

There is a lang/ghc build oddity:
watching it in top during the early parts
of its build shows:

52498    . . . /usr/local/llvm10/bin/llc -O1 -enable-tbaa
-relocation-model=static -mcpu=generic -mattr=+strict-align /tmp/ghc47452_0/gh

so it is using devel/llvm10 at this stage.

I see in the Makefile :

LLVM_VERSION=           10
BOOT_GHC_VERSION=       8.10.7
# LLVM version that bootstrap compiler uses
BOOT_LLVM_VERSION=      10
. . .
.if ${ARCH} == aarch64 || ${ARCH:Marmv*}
# ghc-8.10.x on arm requires devel/llvm10
# CONFIGURE_TARGET must to be the same as the llvm triple
CONFIGURE_TARGET=       ${ARCH}-unknown-freebsd${"${ARCH:Maarch64}" !=
"":?:-gnueabihf}
CONFIGURE_ARGS+=        --host=${CONFIGURE_TARGET}
BUILD_DEPENDS+=         llc${LLVM_VERSION}:devel/llvm${LLVM_VERSION}
RUN_DEPENDS+=           llc${LLVM_VERSION}:devel/llvm${LLVM_VERSION}

# When GHC being compiled and GHC used for bootstrapping support different
# LLVM versions, we have to pull in both. Luckily, this is relatively rare.
.  if ${BOOT_LLVM_VERSION} != ${LLVM_VERSION}
BUILD_DEPENDS+=         llc${BOOT_LLVM_VERSION}:devel/llvm${BOOT_LLVM_VERSION}
.  endif
.endif

Yet the log file for lang/ghc shows, for only
some of its activity, far from all:

. . .
 HC [stage 0] utils/genapply/dist/build/Main.o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
"inplace/bin/mkdirhier" utils/genapply/dist/build/tmp//.
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Adjustor.p_o
 rts_dist_HC rts/dist/build/Arena.p_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Capability.p_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/CheckUnload.p_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/ClosureFlags.p_o

. . .

 rts_dist_HC rts/dist/build/PrimOps.p_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/StgMiscClosures.p_o
 rts_dist_HC rts/dist/build/StgStartup.p_o
 rts_dist_HC rts/dist/build/StgStdThunks.p_o
 rts_dist_HC rts/dist/build/Updates.p_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Adjustor.dyn_o
 rts_dist_HC rts/dist/build/Arena.dyn_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Capability.dyn_o

. . .

 rts_dist_HC rts/dist/build/StgMiscClosures.dyn_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/StgStartup.dyn_o
 rts_dist_HC rts/dist/build/StgStdThunks.dyn_o
"inplace/bin/ghc-pkg" --simple-output field rts extra-libraries \
 | sed -e 's/\([^ ][^ ]*\)/-l\1/g' > rts/dist/libs.depend
 rts_dist_HC rts/dist/build/Updates.dyn_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Adjustor.l_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
"inplace/bin/ghc-pkg" --simple-output field rts library-dirs \
 | sed -e 's/\([^ ][^ ]*\)/-L\1/g' >> rts/dist/libs.depend
 rts_dist_HC rts/dist/build/Arena.l_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Capability.l_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/CheckUnload.l_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/ClosureFlags.l_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Disassembler.l_o

. . .

 rts_dist_HC rts/dist/build/StgMiscClosures.l_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/StgStartup.l_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/StgStdThunks.l_o
 rts_dist_HC rts/dist/build/Updates.l_o
 rts_dist_HC rts/dist/build/Adjustor.debug_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Arena.debug_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Capability.debug_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/CheckUnload.debug_o
 rts_dist_HC rts/dist/build/ClosureFlags.debug_o
 rts_dist_HC rts/dist/build/Disassembler.debug_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/FileLock.debug_o
. . .
 rts_dist_HC rts/dist/build/StgStdThunks.debug_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Updates.debug_o
 rts_dist_HC rts/dist/build/Adjustor.thr_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Arena.thr_o
 rts_dist_HC rts/dist/build/Capability.thr_o
 rts_dist_HC rts/dist/build/CheckUnload.thr_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/ClosureFlags.thr_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Disassembler.thr_o
 rts_dist_HC rts/dist/build/FileLock.thr_o
 rts_dist_HC rts/dist/build/ForeignExports.thr_o
 rts_dist_HC rts/dist/build/fs.thr_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Globals.thr_o

. . .

 rts_dist_HC rts/dist/build/StgStartup.thr_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/StgStdThunks.thr_o
 rts_dist_HC rts/dist/build/Updates.thr_o
 rts_dist_HC rts/dist/build/Adjustor.thr_debug_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/Arena.thr_debug_o
 rts_dist_HC rts/dist/build/Capability.thr_debug_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/CheckUnload.thr_debug_o
You are using an unsupported version of LLVM!
Currently only 9 to 13 is supported. System LLVM version: 14.0.3
We will try though...
 rts_dist_HC rts/dist/build/ClosureFlags.thr_debug_o

. . .

I'll stop with that. There is more.

The log files for lang/ghc show:

===>   Installing existing package /packages/All/llvm10-10.0.1_10.pkg
[CA72_ZFS] Installing llvm10-10.0.1_10...
[CA72_ZFS] `-- Installing libedit-3.1.20210910,1...
[CA72_ZFS] `-- Extracting libedit-3.1.20210910,1: .......... done
[CA72_ZFS] `-- Installing libxml2-2.9.13_2...
[CA72_ZFS] `-- Extracting libxml2-2.9.13_2: .......... done
[CA72_ZFS] `-- Installing lua52-5.2.4...
[CA72_ZFS] `-- Extracting lua52-5.2.4: ......... done
[CA72_ZFS] `-- Installing perl5-5.32.1_1...
[CA72_ZFS] `-- Extracting perl5-5.32.1_1: .......... done
[CA72_ZFS] Extracting llvm10-10.0.1_10: .......... done

but no other devel/llvm* install. So the use of
llvm14 was via the system toolchain, not via
use of devel/llvm14 .

For reference . . .

The /usr/ports content vintage in use:

merge-base: 0a2f0da65b65bb9b3abf7a06815854f3cff063fa
merge-base: CommitDate: 2022-05-07 18:07:34 +0000
0a2f0da65b65 (HEAD -> main) devel/py-tabulate: update to version 0.8.9
n582877 (--first-parent --count for merge-base)

The aarch64 system (being used to target armv7 in the build):
(system can execute armv7 code natively, so no use of qemu)

main-n255745-77649f35a7e5-dirty

-- 
You are receiving this mail because:
You are the assignee for the bug.