Closed tastytea closed 1 year ago
Do versions before 0.8.0 compile fine with LTO?
Previously there were no automated tests for it and i didn't test it manually either. But when i compile it now, 0.7.0 fails in the same way: mtxclient-0.7.0:20220819-222802.log
Okay, so it is not a regression from the hidden friends at least :D
Compiling mtxclient with
-flto
works fine, but compiling the tests fails:build failure log
``` [86/91] : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wall -Wextra -pipe -pedantic -fsized-deallocation -fdiagnostics-color=always -Wno-attributes -Wunreachable-code -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 CMakeFiles/messages.dir/tests/messages.cpp.o -o messages -Wl,-rpath,/var/tmp/portage/dev-libs/mtxclient-0.8.0/work/mtxclient-0.8.0_build libmatrix_client.so.0.8.0 /usr/lib64/libspdlog.so.1.10.0 /usr/lib64/libfmt.so.9.0.0 -Wl,--as-needed /usr/lib64/libcoeurl.so /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libolm.so.3.2.12 /usr/lib64/libgtest_main.so.1.11.0 /usr/lib64/libgtest.so.1.11.0 && : FAILED: messages : && /usr/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wall -Wextra -pipe -pedantic -fsized-deallocation -fdiagnostics-color=always -Wno-attributes -Wunreachable-code -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 CMakeFiles/messages.dir/tests/messages.cpp.o -o messages -Wl,-rpath,/var/tmp/portage/dev-libs/mtxclient-0.8.0/work/mtxclient-0.8.0_build libmatrix_client.so.0.8.0 /usr/lib64/libspdlog.so.1.10.0 /usr/lib64/libfmt.so.9.0.0 -Wl,--as-needed /usr/lib64/libcoeurl.so /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libolm.so.3.2.12 /usr/lib64/libgtest_main.so.1.11.0 /usr/lib64/libgtest.so.1.11.0 && : lto-wrapper: warning: using serial compilation of 4 LTRANS jobs lto-wrapper: note: see the ‘-flto’ option documentation for more information /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-libs/mtxclient-0.8.0/temp/ccM7FmFB.ltrans1.ltrans.o: in function `RoomEvents_Encrypted_Test::TestBody()':Full build log: https://861731.bugs.gentoo.org/attachment.cgi?id=795278 Gentoo bug: https://bugs.gentoo.org/861731
I don't think anyone needs optimized tests but i thought you may want to know about it. 😊