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

bloaty 1.1: building with external libs but bundled abseil results in broken linking (master builds fine) #380

Open
barracuda156 opened this issue Aug 11, 2024 · 1 comment

Comments

@barracuda156
Copy link

[100%] Linking CXX executable bloaty
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/bloaty.dir/link.txt --verbose=ON
/opt/local/bin/g++-mp-14 -std=c++11 -W -Wall -Wno-sign-compare -fdiagnostics-color=always -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport CMakeFiles/bloaty.dir/src/main.cc.o -o bloaty  -Wl,-rpath,/opt/local/lib liblibbloaty.a -lprotobuf -lre2 -lcapstone
Undefined symbols:
  "__ZN3re23RE27ExtractEN4absl11string_viewERKS0_S2_PSs", referenced from:
      __ZNK6bloaty10NameMunger5MungeEN4absl11string_viewE in liblibbloaty.a(bloaty.cc.o)
  "__ZN3re23RE27ReplaceEPSsRKS0_N4absl11string_viewE", referenced from:
      __ZN6bloaty19DisassembleFunctionERKNS_15DisassemblyInfoE in liblibbloaty.a(disassemble.cc.o)
  "__ZN3re23RE213PartialMatchNEN4absl11string_viewERKS0_PKPKNS0_3ArgEi", referenced from:
      __ZN6bloaty6Rollup11AddInternalERKSt6vectorISsSaISsEEmyb in liblibbloaty.a(bloaty.cc.o)
      __ZN6bloaty19DisassembleFunctionERKNS_15DisassemblyInfoE in liblibbloaty.a(disassemble.cc.o)
  "__ZN3re23RE213GlobalReplaceEPSsRKS0_N4absl11string_viewE", referenced from:
      __ZN6bloaty19DisassembleFunctionERKNS_15DisassemblyInfoE in liblibbloaty.a(disassemble.cc.o)
      __ZN6bloaty19DisassembleFunctionERKNS_15DisassemblyInfoE in liblibbloaty.a(disassemble.cc.o)
ld: symbol(s) not found
collect2: error: ld returned 1 exit status

Why is there no option to choose an external abseil? Bundled one is apparently outdated, and fails to work with the current re2.

@barracuda156
Copy link
Author

UPD. Okay, only release (v1.1) fails, the master builds fine:

[100%] Linking CXX executable bloaty
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/bloaty.dir/link.txt --verbose=ON
/opt/local/bin/g++-mp-14 -W -Wall -Wno-sign-compare -fdiagnostics-color=always -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport CMakeFiles/bloaty.dir/src/main.cc.o -o bloaty  -Wl,-rpath,/opt/local/lib liblibbloaty.a -lprotobuf -lre2 -lcapstone /opt/local/lib/libz.dylib
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_bloaty/bloaty/work/build'
[100%] Built target bloaty
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_bloaty/bloaty/work/build'
/opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_bloaty/bloaty/work/build/CMakeFiles 0
make: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_bloaty/bloaty/work/build'

@barracuda156 barracuda156 changed the title Building with external libs but bundled abseil results in broken linking bloaty 1.1: building with external libs but bundled abseil results in broken linking (master builds fine) Aug 11, 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