Open juulvanderspek opened 2 years ago
This is a bug with cmake enabling thinlto when using binutils linker.
A fix is to use LLD to link by passing cmake -DENABLE_LLD=True
.
I'll add some message to cmake about this later today.
Yup, that worked. After installing a few other necessary ubuntu packages the build now completes. Thanks for the quick reply!
Hi,
I just pulled the FEX sources and tried to build them, according to the instructions in https://github.com/FEX-Emu/FEX#quick-start-guide.
The build gets me in the error listed below when linking UnitTestGenerator. I would appreciate some tips on getting past this.
Some details:
clang version 10.0.0-4ubuntu1 Target: aarch64-unknown-linux-gnu Linux version 5.10.87 Description: Ubuntu 20.04.4 LTS
Thanks,
Julius
[243/324] Linking CXX executable Bin/UnitTestGenerator FAILED: Bin/UnitTestGenerator : && /usr/bin/clang++ -O3 -DNDEBUG -fomit-frame-pointer -flto=thin -fPIE -pie Source/Tests/CMakeFiles/UnitTestGenerator.dir/UnitTestGenerator.cpp.o -o Bin/U: /usr/bin/ld: error: Failed to link module External/FEXCore/Source/libFEXCore.a.llvm.7437846.jemalloc.c: Expected at most one ThinLTO module per bitcode file clang: error: linker command failed with exit code 1 (use -v to see invocation) [248/324] Linking CXX shared library External/FEXCore/Source/libFEXCore.so ninja: build stopped: subcommand failed.