Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvmPackages*.llvm: Disable checkPhase on powerpc64-linux #296666

Closed
wants to merge 822 commits into from

Conversation

OPNA2608
Copy link
Contributor

@OPNA2608 OPNA2608 commented Mar 17, 2024

Description of changes

Many failures, mostly in MCJIT & Orc(more JIT).

LLVM 9
Failing Tests (125):
    LLVM :: ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll
    LLVM :: ExecutionEngine/MCJIT/2003-01-04-ArgumentBug.ll
    LLVM :: ExecutionEngine/MCJIT/2003-01-04-LoopTest.ll
    LLVM :: ExecutionEngine/MCJIT/2003-01-04-PhiTest.ll
    LLVM :: ExecutionEngine/MCJIT/2003-01-09-SARTest.ll
    LLVM :: ExecutionEngine/MCJIT/2003-01-10-FUCOM.ll
    LLVM :: ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll
    LLVM :: ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
    LLVM :: ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll
    LLVM :: ExecutionEngine/MCJIT/2003-05-11-PHIRegAllocBug.ll
    LLVM :: ExecutionEngine/MCJIT/2003-06-04-bzip2-bug.ll
    LLVM :: ExecutionEngine/MCJIT/2003-06-05-PHIBug.ll
    LLVM :: ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll
    LLVM :: ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll
    LLVM :: ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll
    LLVM :: ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
    LLVM :: ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll
    LLVM :: ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
    LLVM :: ExecutionEngine/MCJIT/cross-module-a.ll
    LLVM :: ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/MCJIT/eh-lg-pic.ll
    LLVM :: ExecutionEngine/MCJIT/eh.ll
    LLVM :: ExecutionEngine/MCJIT/hello.ll
    LLVM :: ExecutionEngine/MCJIT/hello2.ll
    LLVM :: ExecutionEngine/MCJIT/load-object-a.ll
    LLVM :: ExecutionEngine/MCJIT/multi-module-a.ll
    LLVM :: ExecutionEngine/MCJIT/multi-module-eh-a.ll
    LLVM :: ExecutionEngine/MCJIT/multi-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/MCJIT/non-extern-addend.ll
    LLVM :: ExecutionEngine/MCJIT/pr13727.ll
    LLVM :: ExecutionEngine/MCJIT/simplesttest.ll
    LLVM :: ExecutionEngine/MCJIT/simpletest.ll
    LLVM :: ExecutionEngine/MCJIT/stubs-sm-pic.ll
    LLVM :: ExecutionEngine/MCJIT/stubs.ll
    LLVM :: ExecutionEngine/MCJIT/test-arith.ll
    LLVM :: ExecutionEngine/MCJIT/test-branch.ll
    LLVM :: ExecutionEngine/MCJIT/test-call-no-external-funcs.ll
    LLVM :: ExecutionEngine/MCJIT/test-call.ll
    LLVM :: ExecutionEngine/MCJIT/test-cast.ll
    LLVM :: ExecutionEngine/MCJIT/test-common-symbols-alignment.ll
    LLVM :: ExecutionEngine/MCJIT/test-common-symbols.ll
    LLVM :: ExecutionEngine/MCJIT/test-constantexpr.ll
    LLVM :: ExecutionEngine/MCJIT/test-data-align.ll
    LLVM :: ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll
    LLVM :: ExecutionEngine/MCJIT/test-fp.ll
    LLVM :: ExecutionEngine/MCJIT/test-global-ctors.ll
    LLVM :: ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
    LLVM :: ExecutionEngine/MCJIT/test-global-init-nonzero.ll
    LLVM :: ExecutionEngine/MCJIT/test-global.ll
    LLVM :: ExecutionEngine/MCJIT/test-loadstore.ll
    LLVM :: ExecutionEngine/MCJIT/test-local.ll
    LLVM :: ExecutionEngine/MCJIT/test-logical.ll
    LLVM :: ExecutionEngine/MCJIT/test-loop.ll
    LLVM :: ExecutionEngine/MCJIT/test-phi.ll
    LLVM :: ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
    LLVM :: ExecutionEngine/MCJIT/test-ptr-reloc.ll
    LLVM :: ExecutionEngine/MCJIT/test-ret.ll
    LLVM :: ExecutionEngine/MCJIT/test-return.ll
    LLVM :: ExecutionEngine/MCJIT/test-setcond-fp.ll
    LLVM :: ExecutionEngine/MCJIT/test-setcond-int.ll
    LLVM :: ExecutionEngine/MCJIT/test-shift.ll
    LLVM :: ExecutionEngine/MCJIT/weak-function.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2002-12-16-ArgTest.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-01-04-ArgumentBug.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-01-04-LoopTest.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-01-04-PhiTest.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-01-09-SARTest.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-01-10-FUCOM.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-01-15-AlignmentTest.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-05-06-LivenessClobber.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-05-07-ArgumentTest.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-05-11-PHIRegAllocBug.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-06-04-bzip2-bug.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-06-05-PHIBug.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-08-15-AllocaAssertion.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-08-21-EnvironmentTest.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-08-23-RegisterAllocatePhysReg.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2005-12-02-TailCallBug.ll
    LLVM :: ExecutionEngine/OrcMCJIT/2013-04-04-RelocAddend.ll
    LLVM :: ExecutionEngine/OrcMCJIT/cross-module-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/eh.ll
    LLVM :: ExecutionEngine/OrcMCJIT/hello.ll
    LLVM :: ExecutionEngine/OrcMCJIT/hello2.ll
    LLVM :: ExecutionEngine/OrcMCJIT/load-object-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/multi-module-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll
    LLVM :: ExecutionEngine/OrcMCJIT/non-extern-addend.ll
    LLVM :: ExecutionEngine/OrcMCJIT/pr13727.ll
    LLVM :: ExecutionEngine/OrcMCJIT/pr32650.ll
    LLVM :: ExecutionEngine/OrcMCJIT/simplesttest.ll
    LLVM :: ExecutionEngine/OrcMCJIT/simpletest.ll
    LLVM :: ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/stubs.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-arith.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-branch.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-call-no-external-funcs.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-call.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-cast.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-common-symbols-alignment.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-common-symbols.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-constantexpr.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-data-align.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-fp-no-external-funcs.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-fp.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-global-ctors.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-global-init-nonzero.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-global.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-loadstore.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-local.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-logical.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-loop.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-phi.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-ptr-reloc.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-ret.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-return.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-setcond-fp.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-setcond-int.ll
    LLVM :: ExecutionEngine/OrcMCJIT/test-shift.ll
    LLVM :: ExecutionEngine/OrcMCJIT/weak-function.ll

llvm-9.0.1.log

LLVM 17
Failed Tests (91):
  LLVM :: ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll
  LLVM :: ExecutionEngine/MCJIT/2003-01-04-ArgumentBug.ll
  LLVM :: ExecutionEngine/MCJIT/2003-01-04-LoopTest.ll
  LLVM :: ExecutionEngine/MCJIT/2003-01-04-PhiTest.ll
  LLVM :: ExecutionEngine/MCJIT/2003-01-09-SARTest.ll
  LLVM :: ExecutionEngine/MCJIT/2003-01-10-FUCOM.ll
  LLVM :: ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll
  LLVM :: ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
  LLVM :: ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll
  LLVM :: ExecutionEngine/MCJIT/2003-05-11-PHIRegAllocBug.ll
  LLVM :: ExecutionEngine/MCJIT/2003-06-04-bzip2-bug.ll
  LLVM :: ExecutionEngine/MCJIT/2003-06-05-PHIBug.ll
  LLVM :: ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll
  LLVM :: ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll
  LLVM :: ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll
  LLVM :: ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
  LLVM :: ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll
  LLVM :: ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
  LLVM :: ExecutionEngine/MCJIT/cross-module-a.ll
  LLVM :: ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll
  LLVM :: ExecutionEngine/MCJIT/eh-lg-pic.ll
  LLVM :: ExecutionEngine/MCJIT/eh.ll
  LLVM :: ExecutionEngine/MCJIT/hello.ll
  LLVM :: ExecutionEngine/MCJIT/hello2.ll
  LLVM :: ExecutionEngine/MCJIT/load-object-a.ll
  LLVM :: ExecutionEngine/MCJIT/multi-module-a.ll
  LLVM :: ExecutionEngine/MCJIT/multi-module-eh-a.ll
  LLVM :: ExecutionEngine/MCJIT/multi-module-sm-pic-a.ll
  LLVM :: ExecutionEngine/MCJIT/non-extern-addend.ll
  LLVM :: ExecutionEngine/MCJIT/pr13727.ll
  LLVM :: ExecutionEngine/MCJIT/remote/cross-module-a.ll
  LLVM :: ExecutionEngine/MCJIT/remote/eh.ll
  LLVM :: ExecutionEngine/MCJIT/remote/multi-module-a.ll
  LLVM :: ExecutionEngine/MCJIT/remote/simpletest-remote.ll
  LLVM :: ExecutionEngine/MCJIT/remote/stubs-remote.ll
  LLVM :: ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
  LLVM :: ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
  LLVM :: ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
  LLVM :: ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
  LLVM :: ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll
  LLVM :: ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
  LLVM :: ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll
  LLVM :: ExecutionEngine/MCJIT/simplesttest.ll
  LLVM :: ExecutionEngine/MCJIT/simpletest.ll
  LLVM :: ExecutionEngine/MCJIT/stubs-sm-pic.ll
  LLVM :: ExecutionEngine/MCJIT/stubs.ll
  LLVM :: ExecutionEngine/MCJIT/test-arith.ll
  LLVM :: ExecutionEngine/MCJIT/test-branch.ll
  LLVM :: ExecutionEngine/MCJIT/test-call-no-external-funcs.ll
  LLVM :: ExecutionEngine/MCJIT/test-call.ll
  LLVM :: ExecutionEngine/MCJIT/test-cast.ll
  LLVM :: ExecutionEngine/MCJIT/test-common-symbols-alignment.ll
  LLVM :: ExecutionEngine/MCJIT/test-common-symbols.ll
  LLVM :: ExecutionEngine/MCJIT/test-constantexpr.ll
  LLVM :: ExecutionEngine/MCJIT/test-data-align.ll
  LLVM :: ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll
  LLVM :: ExecutionEngine/MCJIT/test-fp.ll
  LLVM :: ExecutionEngine/MCJIT/test-global-ctors.ll
  LLVM :: ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
  LLVM :: ExecutionEngine/MCJIT/test-global-init-nonzero.ll
  LLVM :: ExecutionEngine/MCJIT/test-global.ll
  LLVM :: ExecutionEngine/MCJIT/test-loadstore.ll
  LLVM :: ExecutionEngine/MCJIT/test-local.ll
  LLVM :: ExecutionEngine/MCJIT/test-logical.ll
  LLVM :: ExecutionEngine/MCJIT/test-loop.ll
  LLVM :: ExecutionEngine/MCJIT/test-phi.ll
  LLVM :: ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
  LLVM :: ExecutionEngine/MCJIT/test-ptr-reloc.ll
  LLVM :: ExecutionEngine/MCJIT/test-ret.ll
  LLVM :: ExecutionEngine/MCJIT/test-return.ll
  LLVM :: ExecutionEngine/MCJIT/test-setcond-fp.ll
  LLVM :: ExecutionEngine/MCJIT/test-setcond-int.ll
  LLVM :: ExecutionEngine/MCJIT/test-shift.ll
  LLVM :: ExecutionEngine/MCJIT/weak-function.ll
  LLVM :: ExecutionEngine/Orc/global-ctor-with-cast.ll
  LLVM :: ExecutionEngine/Orc/global-variable-alignment.ll
  LLVM :: ExecutionEngine/Orc/trivial-call-to-function.ll
  LLVM :: ExecutionEngine/Orc/trivial-call-to-internal-function.ll
  LLVM :: ExecutionEngine/Orc/trivial-reference-to-global-variable.ll
  LLVM :: ExecutionEngine/Orc/trivial-reference-to-internal-variable-nonzeroinit.ll
  LLVM :: ExecutionEngine/Orc/trivial-reference-to-internal-variable-zeroinit.ll
  LLVM :: ExecutionEngine/Orc/trivial-return-zero.ll
  LLVM :: ExecutionEngine/Orc/weak-comdat.ll
  LLVM :: ExecutionEngine/frem.ll
  LLVM :: ExecutionEngine/mov64zext32.ll
  LLVM :: ExecutionEngine/test-interp-vec-arithm_float.ll
  LLVM :: ExecutionEngine/test-interp-vec-arithm_int.ll
  LLVM :: ExecutionEngine/test-interp-vec-logical.ll
  LLVM :: ExecutionEngine/test-interp-vec-setcond-fp.ll
  LLVM :: ExecutionEngine/test-interp-vec-setcond-int.ll
  LLVM-Unit :: ExecutionEngine/Orc/./OrcJITTests/0/2

llvm-17.0.6.log


Notes:

  • Only verified that building 9, 17 & git fails, and that disabling the tests makes all 3 of them build. I can check other versions if desired, but…
  • Building any LLVM version takes ~10h on my machine, so I haven't done alot of looking into what causes these failures, if any version is unaffected, or if it's potentially caused by using gnuabielfv2.
Clang-based stdenv *mostly works*, though it'll need some help from our cc-wrapper

LLVM/Clang ignores the gnuabielfv{1,2} ABI part of the config triplet and culls it down to just gnu:

Which results in the compiler producing ELFv1 objects, even though we're asking for ELFv2 ones. So most linking will fail.

configure:4527: checking whether the C compiler works
configure:4549: clang    conftest.c  >&5
/nix/store/amf0m5dg8iacfy5ni3dk9rpgv8kwrrvg-binutils-2.41/bin/ld: /build/conftest-67e02b.o: ABI version 1 is not compatible with ABI version 2 output
/nix/store/amf0m5dg8iacfy5ni3dk9rpgv8kwrrvg-binutils-2.41/bin/ld: failed to merge target specific data of file /build/conftest-67e02b.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

When running with -v:

clang version 17.0.6
Target: powerpc64-unknown-linux-gnuabielfv2
Thread model: posix
InstalledDir: /nix/store/09cfx6kdrgl622qvv812d1igxhz76xyl-clang-17.0.6/bin
Found candidate GCC installation: /nix/store/c7g75hwfhrn2z1b03y5qq62mblx7dycf-gcc-13.2.0/lib/gcc/powerpc64-unknown-linux-gnuabielfv2/13.2.0
Found candidate GCC installation: /nix/store/c7g75hwfhrn2z1b03y5qq62mblx7dycf-gcc-13.2.0/lib64/gcc/powerpc64-unknown-linux-gnuabielfv2/13.2.0
Selected GCC installation: /nix/store/c7g75hwfhrn2z1b03y5qq62mblx7dycf-gcc-13.2.0/lib64/gcc/powerpc64-unknown-linux-gnuabielfv2/13.2.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/nix/store/09cfx6kdrgl622qvv812d1igxhz76xyl-clang-17.0.6/bin/clang-17" -cc1 -triple powerpc64-unknown-linux-gnuabielfv2 -emit-obj -mrelax-all -dumpdir /dev/shm/conftest- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name conftest.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu ppc64 -mfloat-abi hard -target-abi elfv1 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/home/puna/devel/nixpkgs -nostdsysteminc -resource-dir /nix/store/h4li1h7pr918ms4b4bl048kfihcvybaa-clang-wrapper-17.0.6/resource-root -idirafter /nix/store/hcazi292x6d6l782dm6ss20q512a5wrl-glibc-2.38-44-dev/include -internal-isystem /nix/store/h4li1h7pr918ms4b4bl048kfihcvybaa-clang-wrapper-17.0.6/resource-root/include/ppc_wrappers -internal-isystem /nix/store/h4li1h7pr918ms4b4bl048kfihcvybaa-clang-wrapper-17.0.6/resource-root/include -fdebug-compilation-dir=/home/puna/devel/nixpkgs -ferror-limit 19 -fno-signed-char -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/conftest-a4408e.o -x c /dev/shm/conftest.c
clang -cc1 version 17.0.6 based upon LLVM 17.0.6 default target powerpc64-unknown-linux-gnuabielfv2
#include "..." search starts here:
#include <...> search starts here:
 /nix/store/h4li1h7pr918ms4b4bl048kfihcvybaa-clang-wrapper-17.0.6/resource-root/include/ppc_wrappers
 /nix/store/h4li1h7pr918ms4b4bl048kfihcvybaa-clang-wrapper-17.0.6/resource-root/include
 /nix/store/hcazi292x6d6l782dm6ss20q512a5wrl-glibc-2.38-44-dev/include
End of search list.
 "/nix/store/h4li1h7pr918ms4b4bl048kfihcvybaa-clang-wrapper-17.0.6/bin/ld" -pie --hash-style=gnu --eh-frame-hdr -m elf64ppc -o /dev/shm/conftest /nix/store/13mhdf5x574x9wnrjpdk79k8ir52fw5n-glibc-2.38-44/lib/Scrt1.o /nix/store/13mhdf5x574x9wnrjpdk79k8ir52fw5n-glibc-2.38-44/lib/crti.o /nix/store/c7g75hwfhrn2z1b03y5qq62mblx7dycf-gcc-13.2.0/lib/gcc/powerpc64-unknown-linux-gnuabielfv2/13.2.0/crtbeginS.o -L/nix/store/13mhdf5x574x9wnrjpdk79k8ir52fw5n-glibc-2.38-44/lib -L/nix/store/c7g75hwfhrn2z1b03y5qq62mblx7dycf-gcc-13.2.0/lib/gcc/powerpc64-unknown-linux-gnuabielfv2/13.2.0 -L/nix/store/06p31qlrln7nf6bvlgs3kswgfsvnrz6d-gcc-13.2.0-lib/lib -L/nix/store/c7g75hwfhrn2z1b03y5qq62mblx7dycf-gcc-13.2.0//lib -L/nix/store/85l7pnrc4pjdza8j8pa9rcn378hcp26f-gcc-13.2.0-libgcc/lib -L/nix/store/8pgjm8r18w14z042jxcqg2ww08ldw1zq-clang-17.0.6-lib/lib -L/nix/store/c7g75hwfhrn2z1b03y5qq62mblx7dycf-gcc-13.2.0/lib64/gcc/powerpc64-unknown-linux-gnuabielfv2/13.2.0 -L/nix/store/c7g75hwfhrn2z1b03y5qq62mblx7dycf-gcc-13.2.0/lib64/gcc/powerpc64-unknown-linux-gnuabielfv2/13.2.0/../../../../lib64 -L/lib/powerpc64-linux-gnu -L/lib/../lib64 -L/usr/lib/powerpc64-linux-gnu -L/usr/lib/../lib64 -L/lib -L/usr/lib -dynamic-linker=/nix/store/13mhdf5x574x9wnrjpdk79k8ir52fw5n-glibc-2.38-44/lib/ld64.so.2 /tmp/conftest-a4408e.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /nix/store/c7g75hwfhrn2z1b03y5qq62mblx7dycf-gcc-13.2.0/lib/gcc/powerpc64-unknown-linux-gnuabielfv2/13.2.0/crtendS.o /nix/store/13mhdf5x574x9wnrjpdk79k8ir52fw5n-glibc-2.38-44/lib/crtn.o
/nix/store/amf0m5dg8iacfy5ni3dk9rpgv8kwrrvg-binutils-2.41/bin/ld: /tmp/conftest-a4408e.o: ABI version 1 is not compatible with ABI version 2 output
/nix/store/amf0m5dg8iacfy5ni3dk9rpgv8kwrrvg-binutils-2.41/bin/ld: failed to merge target specific data of file /tmp/conftest-a4408e.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Relevant part:

Target: powerpc64-unknown-linux-gnuabielfv2
[...]
"/nix/store/09cfx6kdrgl622qvv812d1igxhz76xyl-clang-17.0.6/bin/clang-17" -cc1 -triple powerpc64-unknown-linux-gnuabielfv2 [...] -target-cpu ppc64 -mfloat-abi hard -target-abi elfv1 [...]

Planning to add something like this to our cc-wrapper to work around this, which gets hello building with llvmPackages_17.stdenv:

diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index d788076dda51..a78fb5c4d62c 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -643,6 +643,12 @@ stdenv.mkDerivation {
       echo "-mtune=${tune}" >> $out/nix-support/cc-cflags-before
     '')
 
+    # Clang doesn't parse gnuabielfv{1,2} triplet parts for powerpc64{,le}, need to manually override abi
+    + optionalString (isClang && targetPlatform.isPower64 && targetPlatform.parsed.abi.name != "gnu") ''
+      echo "-mabi=${targetPlatform.parsed.abi.abi}" >> $out/nix-support/cc-cflags-before
+    ''
+
+
     # TODO: categorize these and figure out a better place for them
     + optionalString targetPlatform.isWindows ''
       hardening_unsupported_flags+=" pic"

But we can figure out the details of that in a separate PR.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • powerpc64-linux [for time reasons, only tested LLVM 9 & 17]
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@OPNA2608
Copy link
Contributor Author

Rebased - LLVM 9 has since been dropped, and 18 was added.

amaxine and others added 22 commits April 22, 2024 21:11
Starting from GLib / gobject-introspection 2.80, GLib introspection data
is provided by GLib itself instead of gobject-introspection. This causes
tests failures because env.set() resets the environment and GLib is missing
from GI_TYPELIB_PATH:

gi.RepositoryError: Typelib file for namespace 'Gio', version '2.0' not found
This is needed to find GLib typelib:
ImportError: cannot import name GLib, introspection typelib not found
disable checks until fixes land in pygobject3
@NixOS NixOS locked and limited conversation to collaborators Apr 29, 2024
@K900 K900 closed this Apr 29, 2024
@K900
Copy link
Contributor

K900 commented Apr 29, 2024

Failed rebase, mass ping, closing, please resubmit.

@rrbutani rrbutani added 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related and removed 6.topic: python 6.topic: nixos 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: haskell 6.topic: qt/kde 8.has: documentation 8.has: changelog 8.has: module (update) 6.topic: emacs 6.topic: rust 6.topic: ruby 6.topic: vim 6.topic: erlang 6.topic: xfce The Xfce Desktop Environment 6.topic: fetch 6.topic: stdenv Standard environment 6.topic: nodejs 6.topic: pantheon The Pantheon desktop environment 6.topic: lua 6.topic: cinnamon 6.topic: exotic Exotic hardware or software platform 6.topic: Lumina DE The Lumina Desktop Environment 6.topic: Enlightenment DE The Enlightenment Desktop Environment 6.topic: mate The MATE Desktop Environment 6.topic: vscode labels May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.