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

[Bug]: error while loading shared libraries: libabsl_cord_internal.so.2401.0.0: cannot open shared object file: No such file or directory #1740

Open
xiedeacc opened this issue Aug 6, 2024 · 0 comments

Comments

@xiedeacc
Copy link

xiedeacc commented Aug 6, 2024

Describe the issue

when dynamic link absl, can build and link, but when execute the final binary, it said:

./main: error while loading shared libraries: libabsl_cord_internal.so.2401.0.0: cannot open shared object file: No such file or directory

ldd main, it seems some library can recogise by linker, some cannot

linux-vdso.so.1 (0x00007fffd998d000)
        libabsl_cord.so.2401.0.0 => /usr/local/lib/libabsl_cord.so.2401.0.0 (0x00007fa880ebe000)
        libabsl_cordz_info.so.2401.0.0 => /usr/local/lib/libabsl_cordz_info.so.2401.0.0 (0x00007fa880eb1000)
        libabsl_hash.so.2401.0.0 => /usr/local/lib/libabsl_hash.so.2401.0.0 (0x00007fa880eac000)
        libabsl_log_internal_check_op.so.2401.0.0 => /usr/local/lib/libabsl_log_internal_check_op.so.2401.0.0 (0x00007fa880ea2000)
        libabsl_log_internal_conditions.so.2401.0.0 => /usr/local/lib/libabsl_log_internal_conditions.so.2401.0.0 (0x00007fa880e9d000)
        libabsl_log_internal_message.so.2401.0.0 => /usr/local/lib/libabsl_log_internal_message.so.2401.0.0 (0x00007fa880e7b000)
        libabsl_log_internal_nullguard.so.2401.0.0 => /usr/local/lib/libabsl_log_internal_nullguard.so.2401.0.0 (0x00007fa880e76000)
        libabsl_raw_hash_set.so.2401.0.0 => /usr/local/lib/libabsl_raw_hash_set.so.2401.0.0 (0x00007fa880e67000)
        libabsl_raw_logging_internal.so.2401.0.0 => /usr/local/lib/libabsl_raw_logging_internal.so.2401.0.0 (0x00007fa880e5f000)
        libabsl_spinlock_wait.so.2401.0.0 => /usr/local/lib/libabsl_spinlock_wait.so.2401.0.0 (0x00007fa880e5a000)
        libabsl_status.so.2401.0.0 => /usr/local/lib/libabsl_status.so.2401.0.0 (0x00007fa880e2f000)
        libabsl_statusor.so.2401.0.0 => /usr/local/lib/libabsl_statusor.so.2401.0.0 (0x00007fa880e22000)
        libabsl_str_format_internal.so.2401.0.0 => /usr/local/lib/libabsl_str_format_internal.so.2401.0.0 (0x00007fa880dcd000)
        libabsl_strings.so.2401.0.0 => /usr/local/lib/libabsl_strings.so.2401.0.0 (0x00007fa880d88000)
        libabsl_synchronization.so.2401.0.0 => /usr/local/lib/libabsl_synchronization.so.2401.0.0 (0x00007fa880d61000)
        libabsl_throw_delegate.so.2401.0.0 => /usr/local/lib/libabsl_throw_delegate.so.2401.0.0 (0x00007fa880d5a000)
        libfmt.so.9 => /usr/local/lib/libfmt.so.9 (0x00007fa880d39000)
        libglog.so.0 => /usr/local/lib/libglog.so.0 (0x00007fa880d02000)
        libgflags.so.2.2 => /usr/local/lib/libgflags.so.2.2 (0x00007fa880cdb000)
        libunwind.so.8 => /usr/local/lib/libunwind.so.8 (0x00007fa880cbe000)
        libdouble-conversion.so.3 => /usr/local/lib/libdouble-conversion.so.3 (0x00007fa880cae000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa880a79000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa880992000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa880970000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa880747000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa8818f5000)
        libabsl_cord_internal.so.2401.0.0 => not found
        libabsl_crc_cord_state.so.2401.0.0 => not found
        libabsl_cordz_functions.so.2401.0.0 => not found
        libabsl_cord_internal.so.2401.0.0 => not found
        libabsl_cordz_handle.so.2401.0.0 => not found
        libabsl_stacktrace.so.2401.0.0 => not found
        libabsl_time.so.2401.0.0 => not found
        libabsl_base.so.2401.0.0 => not found
        libabsl_city.so.2401.0.0 => not found
        libabsl_low_level_hash.so.2401.0.0 => not found
        libabsl_base.so.2401.0.0 => not found
        libabsl_examine_stack.so.2401.0.0 => not found
        libabsl_log_internal_format.so.2401.0.0 => not found
        libabsl_log_internal_proto.so.2401.0.0 => not found
        libabsl_strerror.so.2401.0.0 => not found
        libabsl_log_internal_log_sink_set.so.2401.0.0 => not found
        libabsl_log_internal_globals.so.2401.0.0 => not found
        libabsl_log_globals.so.2401.0.0 => not found
        libabsl_time.so.2401.0.0 => not found
        libabsl_base.so.2401.0.0 => not found
        libabsl_strerror.so.2401.0.0 => not found
        libabsl_int128.so.2401.0.0 => not found
        libabsl_strings_internal.so.2401.0.0 => not found
        libabsl_graphcycles_internal.so.2401.0.0 => not found
        libabsl_kernel_timeout_internal.so.2401.0.0 => not found
        libabsl_stacktrace.so.2401.0.0 => not found
        libabsl_symbolize.so.2401.0.0 => not found
        libabsl_time.so.2401.0.0 => not found
        libabsl_malloc_internal.so.2401.0.0 => not found
        libabsl_base.so.2401.0.0 => not found
        liblzma.so.5 => /usr/local/lib/liblzma.so.5 (0x00007fa880709000)

absl built use cmake

Steps to reproduce the problem

cmake BUILD_TESTING=OFF -DABSL_PROPAGATE_CXX_STD=ON -DBUILD_SHARED_LIBS=ON ..
make -j
make install

g++ -std=c++17 -D_GLIBCXX_USE_CXX11_ABI=1 config.pb.cc config.pb.h main.cc \
 /usr/local/lib/libfolly.a \
 /usr/local/lib/libiberty.a \
 /usr/local/lib/libprotobuf.a \
 /usr/local/lib/libutf8_range.a \
 /usr/local/lib/libutf8_validity.a \
 -L/usr/local/lib \
 -labsl_bad_any_cast_impl \
 -labsl_bad_optional_access \
 -labsl_bad_variant_access \
 -labsl_civil_time \
 -labsl_cord \
 -labsl_cordz_info \
 -labsl_cordz_sample_token \
 -labsl_crc32c \
 -labsl_crc_cpu_detect \
 -labsl_crc_internal \
 -labsl_debugging_internal \
 -labsl_demangle_internal \
 -labsl_die_if_null \
 -labsl_exponential_biased \
 -labsl_failure_signal_handler \
 -labsl_flags_commandlineflag \
 -labsl_flags_commandlineflag_internal \
 -labsl_flags_config \
 -labsl_flags_internal \
 -labsl_flags_marshalling \
 -labsl_flags_parse \
 -labsl_flags_private_handle_accessor \
 -labsl_flags_program_name \
 -labsl_flags_reflection \
 -labsl_flags_usage \
 -labsl_flags_usage_internal \
 -labsl_graphcycles_internal \
 -labsl_hash \
 -labsl_hashtablez_sampler \
 -labsl_int128 \
 -labsl_kernel_timeout_internal \
 -labsl_leak_check \
 -labsl_log_entry \
 -labsl_log_flags \
 -labsl_log_globals \
 -labsl_log_initialize \
 -labsl_log_internal_check_op \
 -labsl_log_internal_conditions \
 -labsl_log_internal_fnmatch \
 -labsl_log_internal_globals \
 -labsl_log_internal_log_sink_set \
 -labsl_log_internal_message \
 -labsl_log_internal_nullguard \
 -labsl_log_severity \
 -labsl_log_sink \
 -labsl_periodic_sampler \
 -labsl_random_distributions \
 -labsl_random_internal_distribution_test_util \
 -labsl_random_internal_platform \
 -labsl_random_internal_pool_urbg \
 -labsl_random_internal_randen \
 -labsl_random_internal_randen_hwaes \
 -labsl_random_internal_randen_hwaes_impl \
 -labsl_random_internal_randen_slow \
 -labsl_random_internal_seed_material \
 -labsl_random_seed_gen_exception \
 -labsl_random_seed_sequences \
 -labsl_raw_hash_set \
 -labsl_raw_logging_internal \
 -labsl_scoped_set_env \
 -labsl_spinlock_wait \
 -labsl_status \
 -labsl_statusor \
 -labsl_str_format_internal \
 -labsl_string_view \
 -labsl_strings \
 -labsl_strings_internal \
 -labsl_synchronization \
 -labsl_throw_delegate \
 -labsl_time_zone \
 -labsl_vlog_config_internal \
 -lfmt \
 -lglog \
 -lgflags \
 -lunwind \
 -lunwind-generic \
 -ldouble-conversion \
 -Wl,-rpath,/usr/local/lib \
 -o main

What version of Abseil are you using?

20240116.2

What operating system and version are you using?

ubuntu22.04

What compiler and version are you using?

gcc version 11.4.0

What build system are you using?

cmake version 3.22.1

Additional context

No response

@xiedeacc xiedeacc reopened this Aug 10, 2024
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

1 participant