conda-forge / llvmdev-feedstock

A conda-smithy repository for llvmdev.
BSD 3-Clause "New" or "Revised" License
8 stars 42 forks source link

Build LLVM 15.0.0-rc1 #163

Closed h-vetinari closed 2 years ago

h-vetinari commented 2 years ago

Hot off the press!

conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

h-vetinari commented 2 years ago

Some more problems with zstd it seems, details here.

h-vetinari commented 2 years ago

So cmake does something a bit schizophrenic for aarch/ppc here:

$BUILD_PREFIX/bin/x86_64-conda-linux-gnu-c++ [...] \
    -Wl,-rpath,$BUILD_PREFIX/lib \
    tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o \
    -o bin/llvm-config  \
    -Wl,-rpath,"\$ORIGIN/../lib"  \
     lib/libLLVMSupport.a  -lpthread  -lrt  -ldl  -lpthread  -lm \
     $PREFIX/lib/libzstd.so.1.5.2  -pthread \
     $BUILD_PREFIX/lib/libtinfo.so  lib/libLLVMDemangle.a

While compiling the build-native llvm-config, it sets up the rpath to $BUILD_PREFIX, an takes some libs from there, but then explicitly tries to link to $PREFIX, where libzstd is obviously compiled for the wrong architecture --> "wrong format".

The lib locations seem to be related to the detection:

-- Found ZLIB: $PREFIX/lib/libz.so (found version "1.2.12") 
-- Found LibXml2: $PREFIX/lib/libxml2.so (found version "2.9.14") 
-- Found Terminfo: $BUILD_PREFIX/lib/libtinfo.so 

which also seems iffy. TBH, I don't understand why this worked before and not now (well, aside from the fact that the zstd-integration is new to LLVM 15), though I did check that also LLVM 14 did the whole:

[...]
[434/3181] Building native llvm-config...
[1/152] Building CXX object lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o
[...]
[152/152] Linking CXX executable bin/llvm-config
[444/3181] Linking CXX shared module unittests/Support/DynamicLibrary/SecondLib.so
[...]

thing, except that it was successful.

Perhaps we'd now need to build llvm-config separately in $BUILD_PREFIX before starting the main compilation? In the meantime, I'll just try without zstd.

h-vetinari commented 2 years ago

@conda-forge-admin, please rerender