-
Notifications
You must be signed in to change notification settings - Fork 75
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
Do not use LTO if AR is incompatible with LD #136
Comments
Please post the output of |
It's a normal desktop machine with Ubuntu 20.04.3 LTS, the arch should be the same. /usr/bin/c++ --version /usr/bin/ld --version |
From the |
Please find the full cmake and build log attached. |
It appears to be an incompatibility between llvm-ar + -fthin-lto and the gnu linker.
And instead add:
If this makes it build, then the proper solution is either:
|
Yes, removing that block does make it work. Thank you very much for the help. |
Thanks for confirming. I renamed the ticket to reflect the uncovered issue. The LTO checker should detect this degenerate case, and disable LTO automatically. |
I followed the install steps but the following error is reporeted:
[ 21%] Linking CXX executable brecovery
/usr/bin/cmake -E cmake_link_script CMakeFiles/brecovery.dir/link.txt --verbose=1
/usr/bin/c++ -O2 -g -DNDEBUG CMakeFiles/brecovery.dir/bin/brecovery.cpp.o -o brecovery libbinlog.a
/usr/bin/ld: libbinlog.a: error adding symbols: file format not recognized
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/brecovery.dir/build.make:85: brecovery] Error 1
make[2]: Leaving directory '/home/user/project/public/binlog/Release'
make[1]: *** [CMakeFiles/Makefile2:571: CMakeFiles/brecovery.dir/all] Error 2
make[1]: Leaving directory '/home/user/project/public/binlog/Release'
make: *** [Makefile:141: all] Error 2
libbinlog.a has been generated
The text was updated successfully, but these errors were encountered: