mehah / otclient

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Other
267 stars 205 forks source link

Error linking otclient: shared system protobuf library misses absl::log_internal_check_op #936

Closed jopadan closed 1 week ago

jopadan commented 2 weeks ago

Priority

Low

Area

What happened?

Running

cmake . --install-prefix=/usr && make install

I get

[ 12%] Built target protobuf
[ 16%] Linking CXX executable ../otclient
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/otclient.dir/Unity/unity_12_cxx.cxx.o: undefined reference to symbol '_ZN4absl12lts_2024072212log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libabsl_log_internal_check_op.so.2407.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/otclient.dir/build.make:487: otclient] Error 1
make[1]: *** [CMakeFiles/Makefile2:142: src/CMakeFiles/otclient.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Dependencies protobuf and abseil are re/installed.

What OS are you seeing the problem on?

Linux neptun 6.11.4-gentoo #1 SMP PREEMPT_DYNAMIC Fri Oct 18 14:48:02 CEST 2024 x86_64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz GenuineIntel GNU/Linux
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-14.2.1_p20241012/work/gcc-14-20241012/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python --enable-objc-gc --enable-languages=c,c++,d,go,objc,obj-c++,fortran,ada,m2,rust --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.2.1_p20241012 p1' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --enable-libada --enable-cet --disable-systemtap --disable-valgrind-annotations --enable-vtable-verify --with-zstd --with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie --enable-host-bind-now --enable-default-ssp --disable-fixincludes --with-build-config='bootstrap-O3 bootstrap-lto bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.1 20241012 (Gentoo 14.2.1_p20241012 p1) 
GNU assembler version 2.43.1 (x86_64-pc-linux-gnu) using BFD version (Gentoo 2.43 p2) 2.43.1
GNU ld (Gentoo 2.43 p2) 2.43.1
libtool (GNU libtool) 2.5.3
protobuf-28.0
abseil-cpp-20240722.0

Code of Conduct

surfaceflinger commented 1 week ago

Try running src/protobuf/generate.sh before cmake and if it's still broken then try using protobuf 26.1 instead

jopadan commented 1 week ago

Trying otclient/src/protobuf generally creates a static library only that is missing every abseil linker flag

jopadan commented 1 week ago

Fixed in #938