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
"undefined reference to `archive_read_new" #2113
Comments
if we enable dpdk when building seastar, dpdk pulls libarchive in if the latter is installed in the system. and we do not use |
@mickey298 please add the information on how you configure seastar, and how dpdk is involved in the build. |
|
I solved the problem temporarily by add ” target_link_libraries(seastar_private INTERFACE -larchive)" in the CMakeLists.txt. and continue building. an new issues appeared. [1/16] Linking CXX executable apps/httpd/httpd
FAILED: apps/httpd/httpd
: && /usr/bin/g++ -O2 -g -DNDEBUG apps/httpd/CMakeFiles/app_httpd.dir/demo.json.cc.o apps/httpd/CMakeFiles/app_httpd.dir/main.cc.o -o apps/httpd/httpd libseastar.a /usr/lib/libboost_program_options.so /usr/lib/libboost_thread.so /usr/lib/libboost_chrono.so /usr/lib/libboost_atomic.so /usr/lib/libcares.so /usr/lib/libfmt.so.10.2.0 /usr/lib/liblz4.so -ldl /usr/lib/libgnutls.so -latomic /usr/lib/libsctp.so /usr/lib/libprotobuf.so /usr/lib/libyaml-cpp.so /usr/lib/libhwloc.so /usr/lib/liburing.so /usr/lib/libnuma.so -larchive && :
/usr/bin/ld: libseastar.a(prometheus.cc.o): undefined reference to symbol '_ZN4absl12lts_2023080212log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/libabsl_log_internal_check_op.so.2308.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[3/16] Linking CXX executable apps/io_tester/io_tester
ninja: build stopped: subcommand failed. confirm the file the symbol: ❯ ls /usr/lib/libabsl_log_internal_check_op.so -alh
lrwxrwxrwx 1 root root 41 Sep 19 04:50 /usr/lib/libabsl_log_internal_check_op.so -> libabsl_log_internal_check_op.so.2308.0.0
❯ nm -D /usr/lib/libabsl_log_internal_check_op.so |rg "_ZN4absl12lts_2023080212log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc"
0000000000003b50 T _ZN4absl12lts_2023080212log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc it seems a protobuf version problem from these information. i didn't sovled this issue eventually .maybe i need to wait for the official update? if anyone solved this issue,pls let me know about it. Thank you for your help. @tchaikov |
so there are two issues:
regarding the 2nd one, before CMake upstream fixes it, we need to find a workaround. |
protobuf v22.0 is packaged by in modern distros, but the FindProtobuf module shipped along with CMake fails to add the new dependency of abseil libraries to the linkage. so Seastar fail to link if compiled with protobuf v22.0 and up. so, in this change, we try to find protobuf using its CMake package configuration first, and fall back to the Findprotobuf module. because find_package() runs in module mode, and fall back to the config mode, and the protobuf's CMake configuration adds the abseil libraries dependency correctly, we need to use config mode first. Refs scylladb#2113 Signed-off-by: Kefu Chai <[email protected]>
protobuf v22.0 is packaged by in modern distros, but the FindProtobuf module shipped along with CMake fails to add the new dependency of abseil libraries to the linkage. so Seastar fail to link if compiled with protobuf v22.0 and up. so, in this change, we try to find protobuf using its CMake package configuration first, and fall back to the Findprotobuf module. because find_package() runs in module mode, and fall back to the config mode, and the protobuf's CMake configuration adds the abseil libraries dependency correctly, we need to use config mode first. Refs #2113 Signed-off-by: Kefu Chai <[email protected]>
@tchaikov Still had issues. CMake Warning at cmake/SeastarDependencies.cmake:162 (find_package):
Could not find a configuration file for package "Protobuf" that is
compatible with requested version "2.5.0".
The following configuration files were considered but not accepted:
/usr/lib/cmake/protobuf/protobuf-config.cmake, version: 25.3.0
/lib/cmake/protobuf/protobuf-config.cmake, version: 25.3.0
Call Stack (most recent call first):
CMakeLists.txt:395 (seastar_find_dependencies)
-- Found Protobuf: /usr/lib/libprotobuf.so (found suitable version "4.25.3", minimum required is "2.5.0") At first,i thougt it's version problems. So i delete the version constraint(2.5.0),and continue build with this command: ./configure.py --mode=release --enable-dpdk --prefix=/usr the configure works fine. and i got this error after building: $ ninja -C build/release -j3
ninja: Entering directory `build/release'
[1/346] Generating gen/src/proto/metrics2.pb.h, gen/src/proto/metrics2.pb.cc
FAILED: gen/src/proto/metrics2.pb.h gen/src/proto/metrics2.pb.cc /home/warren/seastar/build/release/gen/src/proto/metrics2.pb.h /home/warren/seastar/build/release/gen/src/proto/metrics2.pb.cc
cd /home/warren/seastar/build/release && /usr/bin/cmake -E make_directory /home/warren/seastar/build/release/gen/src/proto && --cpp_out=/home/warren/seastar/build/release/gen/src/proto -I/home/warren/seastar/src/proto /home/warren/seastar/src/proto/metrics2.proto
/bin/sh: line 1: --cpp_out=/home/warren/seastar/build/release/gen/src/proto: No such file or directory
[3/346] Generating catest.key
ninja: build stopped: subcommand failed. PS. $uname -a
Linux archlinuxtest 6.7.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 03 Mar 2024 00:30:36 +0000 x86_64 GNU/Linux
$gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++ --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.1 20230801 (GCC)
seastar version: commit e6799055c8cacd2dc15c3037c7181831b2e48d79 |
as higher versions of Protobuf does not claim to be compatible with v2.5.0, so we have to specify a range of versions which is acceptable by Seastar. please note Protobuf is using an interesting versioning: the library is versioned with v21.x, etc. while the C++ APIs are versioned like v3.21.x, v4.22, etc. if we find the package using config mode, we search with its library version, otherwise we search using its C++ API version. Refs scylladb#2113 Signed-off-by: Kefu Chai <[email protected]>
Warining @ddef7a2 |
as higher versions of Protobuf does not claim to be compatible with v2.5.0, so we have to specify a range of versions which is acceptable by Seastar. please note Protobuf is using an interesting versioning: the library is versioned with v21.x, etc. while the C++ APIs are versioned like v3.21.x, v4.22, etc. if we find the package using config mode, we search with its library version, otherwise we search using its C++ API version. Refs scylladb#2113 Signed-off-by: Kefu Chai <[email protected]>
as higher versions of Protobuf does not claim to be compatible with v2.5.0, so we have to specify a range of versions which is acceptable by Seastar. please note Protobuf is using an interesting versioning: the library is versioned with v21.x, etc. while the C++ APIs are versioned like v3.21.x, v4.22, etc. if we find the package using config mode, we search with its library version, otherwise we search using its C++ API version. see also https://protobuf.dev/support/version-support/ Refs scylladb#2113 Signed-off-by: Kefu Chai <[email protected]>
@mickey298 while you were testing. i just sent a fix for it. |
Ok. I was in a hurry and i will testing it again after a few minutes. |
@mickey298 thank you! i don't have an environment for testing the protobuf cmake configuration file at this moment. neither of my linux boxes have protobuf packaged with the configuration file installed: debian sid and f38. would be great if you could test again after removing |
My pleasure. Have you finished? |
@mickey298 yup, i've pushed the latest revision to #2132. |
I got this. CMake Warning at cmake/SeastarDependencies.cmake:162 (find_package):
Could not find a configuration file for package "Protobuf" that is
compatible with requested version range "22.0...25.3".
The following configuration files were considered but not accepted:
/usr/lib/cmake/protobuf/protobuf-config.cmake, version: 25.3.0
/lib/cmake/protobuf/protobuf-config.cmake, version: 25.3.0
Call Stack (most recent call first):
CMakeLists.txt:395 (seastar_find_dependencies)
-- Found Protobuf: /usr/lib/libprotobuf.so (found suitable version "4.25.3", minimum required is "2.5.0") So i modified to 22.0...25.3.0,and i got this: CMake Warning at cmake/SeastarDependencies.cmake:162 (find_package):
Could not find a configuration file for package "Protobuf" that is
compatible with requested version range "22.0...25.3.0".
The following configuration files were considered but not accepted:
/usr/lib/cmake/protobuf/protobuf-config.cmake, version: 25.3.0
/lib/cmake/protobuf/protobuf-config.cmake, version: 25.3.0
Call Stack (most recent call first):
CMakeLists.txt:395 (seastar_find_dependencies)
-- Found Protobuf: /usr/lib/libprotobuf.so (found suitable version "4.25.3", minimum required is "2.5.0") The same error with 22.0.0...25.3.0. Do you feel this is too strict? What if the version of protobuf upgrade to 25.4.0? Can we have a better way? @tchaikov |
as higher versions of Protobuf does not claim to be compatible with v2.5.0, so we should not specify a version number which is acceptable by Seastar as a parameter of `find_package()`. and instead, we just check the version number after calling `find_package()` in config mode. if we find the package using config mode, we search it again, for printing out the version number to the stdout, otherwise we search using its C++ API version. Refs #scylladb#2113 Signed-off-by: Kefu Chai <[email protected]>
as higher versions of Protobuf does not claim to be compatible with v2.5.0, so we should not specify a version number which is acceptable by Seastar as a parameter of `find_package()`. and instead, we just check the version number after calling `find_package()` in config mode. if we find the package using config mode, we search it again, for printing out the version number to the stdout, otherwise we search using its C++ API version. Refs #scylladb#2113 Signed-off-by: Kefu Chai <[email protected]>
@mickey298 thanks. now i understand the problem better. and yeah, it's too strict. so i revised the patch again. see #2132 . could you take another look? |
from 0d4499 |
@mickey298 thank you for testing and the great analysis! without your help, i would not be able to come up with this fix =) |
as higher versions of Protobuf does not claim to be compatible with v2.5.0, so we should not specify a version number which is acceptable by Seastar as a parameter of `find_package()`. and instead, we just check the version number after calling `find_package()` in config mode. if we find the package using config mode, we search it again, for printing out the version number to the stdout, otherwise we search using its C++ API version. Refs ##2113 Closes #2132 * github.com:scylladb/seastar: build: relax the version constraint for Protobuf build: use protobuf::protoc for the path to protoc compiler
protobuf v22.0 is packaged by in modern distros, but the FindProtobuf module shipped along with CMake fails to add the new dependency of abseil libraries to the linkage. so Seastar fail to link if compiled with protobuf v22.0 and up. so, in this change, we try to find protobuf using its CMake package configuration first, and fall back to the Findprotobuf module. because find_package() runs in module mode, and fall back to the config mode, and the protobuf's CMake configuration adds the abseil libraries dependency correctly, we need to use config mode first. Refs scylladb#2113 Signed-off-by: Kefu Chai <[email protected]>
as higher versions of Protobuf does not claim to be compatible with v2.5.0, so we should not specify a version number which is acceptable by Seastar as a parameter of `find_package()`. and instead, we just check the version number after calling `find_package()` in config mode. if we find the package using config mode, we search it again, for printing out the version number to the stdout, otherwise we search using its C++ API version. Refs #scylladb#2113 Signed-off-by: Kefu Chai <[email protected]>
as higher versions of Protobuf does not claim to be compatible with v2.5.0, so we should not specify a version number which is acceptable by Seastar as a parameter of `find_package()`. and instead, we just check the version number after calling `find_package()` in config mode. if we find the package using config mode, we search it again, for printing out the version number to the stdout, otherwise we search using its C++ API version. Refs #scylladb#2113 Closes scylladb#2132 * github.com:scylladb/seastar: build: relax the version constraint for Protobuf build: use protobuf::protoc for the path to protoc compiler
os
fresh new vm
uname -a Linux archlinuxtest 6.7.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 17 Feb 2024 14:02:33 +0000 x86_64 GNU/Linux
seastar commit
f0b2971
configure and build
error:
issue still exists after installing libarchive.
@tchaikov
The text was updated successfully, but these errors were encountered: