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

Build failure with protobuf 23.3 #583

Open
arenekosreal opened this issue Jul 6, 2023 · 2 comments
Open

Build failure with protobuf 23.3 #583

arenekosreal opened this issue Jul 6, 2023 · 2 comments

Comments

@arenekosreal
Copy link

arenekosreal commented Jul 6, 2023

Arch Linux updated protobuf to version 23.3 so there is no libprotobuf-lite.so.32 anymore.
However, rebuilding et against latest protobuf results a build failure. Logs can be found below:

[ 93%] Building CXX object CMakeFiles/et-test.dir/test/BackedTest.cpp.o
[ 94%] Linking CXX executable etterminal
[ 94%] Linking CXX executable etserver
[ 95%] Linking CXX executable et
[ 95%] Building CXX object CMakeFiles/et-test.dir/test/ConnectionTest.cpp.o
[ 97%] Building CXX object CMakeFiles/et-test.dir/test/CryptoHandlerTest.cpp.o
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/htmd.dir/build.make:119: htmd] Error 1
make[1]: *** [CMakeFiles/Makefile2:762: CMakeFiles/htmd.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 97%] Building CXX object CMakeFiles/et-test.dir/test/JumphostTest.cpp.o
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/htm.dir/build.make:119: htm] Error 1
make[1]: *** [CMakeFiles/Makefile2:704: CMakeFiles/htm.dir/all] Error 2
[ 98%] Building CXX object CMakeFiles/et-test.dir/test/ServerFifoPathTest.cpp.o
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/etterminal.dir/build.make:119: etterminal] Error 1
make[1]: *** [CMakeFiles/Makefile2:565: CMakeFiles/etterminal.dir/all] Error 2
[ 98%] Building CXX object CMakeFiles/et-test.dir/test/TerminalTest.cpp.o
[100%] Building CXX object CMakeFiles/et-test.dir/test/Main.cpp.o
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/etserver.dir/build.make:119: etserver] Error 1
make[1]: *** [CMakeFiles/Makefile2:505: CMakeFiles/etserver.dir/all] Error 2
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/et.dir/build.make:119: et] Error 1
make[1]: *** [CMakeFiles/Makefile2:445: CMakeFiles/et.dir/all] Error 2
[100%] Linking CXX executable et-test
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/et-test.dir/build.make:227: et-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:820: CMakeFiles/et-test.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Full build log can be found here:
eternalterminal-6.2.4-2-x86_64-build.log
Note: we are using AUR package eternalterminal with gcc13 patch applied.

Edit: There has already been a fix: https://gist.github.com/figue/8ecdf31ce7e0437efe36ad13c4aca9e5, in a word, we need to set -DCMAKE_EXE_LINKER_FLAGS="-Wl,--copy-dt-needed-entries" -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--copy-dt-needed-entries" when calling cmake.

@oliverkurth
Copy link

oliverkurth commented Dec 12, 2023

I am hitting the same error with 6.2.4 and 6.2.8 on current Photon 5.0. This used to work earlier (a few weeks ago) but a recent upgrade in Photon apparently broke this.

/usr/bin/cmake -E cmake_link_script CMakeFiles/et-test.dir/link.txt --verbose=1
/usr/bin/c++ -O2 -g -DUSE_SENTRY -DELPP_NO_DEFAULT_LOG_FILE -DELPP_FEATURE_CRASH_LOG -DELPP_THREAD_SAFE -DELPP_STRICT_PERMISSIONS -DSENTRY_BUILD_STATIC -g -ggdb3 -DWITH_UTEMPTER -rdynamic "CMakeFiles/et-test.dir/test/BackedTest.cpp.o" "CMakeFiles/et-test.dir/test/ConnectionTest.cpp.o" "CMakeFiles/et-test.dir/test/CryptoHandlerTest.cpp.o" "CMakeFiles/et-test.dir/test/JumphostTest.cpp.o" "CMakeFiles/et-test.dir/test/ServerFifoPathTest.cpp.o" "CMakeFiles/et-test.dir/test/TerminalTest.cpp.o" "CMakeFiles/et-test.dir/test/Main.cpp.o" -o et-test  -Wl,-rpath,/usr/src/photon/BUILD/EternalTerminal-et-v6.2.8/x86_64-vmware-linux/external_imported/Catch2/src libTerminalCommon.a libet-lib.a external_imported/Catch2/src/libCatch2Main.so.3.3.2 -lprotobuf -lsodium -lutempter external_imported/sentry-native/libsentry.a /usr/lib/libssl.so /usr/lib/libcrypto.so /usr/lib/libz.so -lutil -lresolv -latomic external_imported/Catch2/src/libCatch2.so.3.3.2 /usr/lib/libcurl.so -ldl -lrt external_imported/sentry-native/external/libbreakpad_client.a 
/usr/bin/ld: libTerminalCommon.a(UserTerminalHandler.cpp.o): undefined reference to symbol '_ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../lib64/libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/et-test.dir/build.make:230: et-test] Error 1
make[2]: Leaving directory '/usr/src/photon/BUILD/EternalTerminal-et-v6.2.8/x86_64-vmware-linux'
make[1]: *** [CMakeFiles/Makefile2:929: CMakeFiles/et-test.dir/all] Error 2
make[1]: Leaving directory '/usr/src/photon/BUILD/EternalTerminal-et-v6.2.8/x86_64-vmware-linux'
make: *** [Makefile:169: all] Error 2

@oliverkurth
Copy link

The workaround using the cmake options works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants