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

Unable to link absl log internal #14500

Closed
dicetrash opened this issue Oct 21, 2023 · 1 comment
Closed

Unable to link absl log internal #14500

dicetrash opened this issue Oct 21, 2023 · 1 comment

Comments

@dicetrash
Copy link

dicetrash commented Oct 21, 2023

While attempting to compile a project with protobuf got
"""
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
""
it looks like some internal implementation detail of abseil that isn't exposed cannot be linked.

What version of protobuf and what language are you using?
Using 24.3-1
Language: C++
Abseil-cpp arch 20230802.1-1

What operating system (Linux, Windows, ...) and version?
Linux arch with protobuf package https://archlinux.org/packages/extra/x86_64/protobuf/

What runtime / compiler are you using (e.g., python version or gcc version)
cmake 3.27.7 -> make -> gcc 13.2.1

What did you do?
Steps to reproduce the behavior:

  1. Compile protobufs for open source project
    https://github.com/opencardev/aasdk
  2. Attempt to compile opencardev/openauto
    What did you expect to see
    successful completion of linking at the end

What did you see instead?
linker error about DSO missing for absl out from usage of protobuf

Anything else we should know about your project / environment
attempted all three in cmake file but no change in output.
find_package(Protobuf REQUIRED)
find_package(Protobuf REQUIRED CONFIG)
find_package(absl REQUIRED)

Worked in earlier versions of protobuf, this is a regression since May (time it worked)

@dicetrash dicetrash added the untriaged auto added to all issues by default when created. label Oct 21, 2023
@dicetrash
Copy link
Author

Was able to pass through DSO missing by adding CMakeFlags

set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--copy-dt-needed-entries")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--copy-dt-needed-entries")
set(CMAKE_STATIC_LINKER_FLAGS "-Wl,--copy-dt-needed-entries")
not exactly sure which one was the right one

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

3 participants
@dicetrash @googleberg and others