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

Linking issue with libunwind and zlib on aarch64 #169

Open
gbryant-arm opened this issue Oct 6, 2023 · 0 comments
Open

Linking issue with libunwind and zlib on aarch64 #169

gbryant-arm opened this issue Oct 6, 2023 · 0 comments

Comments

@gbryant-arm
Copy link

On arm and aarch64, libunwind is configured to use debug frames (CONFIG_DEBUG_FRAME), but this feature requires zlib. This is what happens when building sandboxed-api on aarch64:

...
[ 89%] Linking CXX executable forkserver_bin
/usr/bin/ld: ../../libunwind_ptrace.a(Gfind_proc_info-lsb.c.o): in function `load_debug_frame':
Gfind_proc_info-lsb.c:(.text+0x157c): undefined reference to `uncompress'
collect2: error: ld returned 1 exit status
make[2]: *** [sandboxed_api/sandbox2/CMakeFiles/sandbox2_forkserver_bin.dir/build.make:197: sandboxed_api/sandbox2/forkserver_bin] Error 1
make[1]: *** [CMakeFiles/Makefile2:9407: sandboxed_api/sandbox2/CMakeFiles/sandbox2_forkserver_bin.dir/all] Error 2

Looks like neither libunwind nor sandboxed-api resolves the zlib symbols.
As a dirty workaround I've added z to target_link_libraries in cmake/libunwind.cmake.

Can anyone confirm it's a bug?

To reproduce

Run this on aarch64:

git clone --recursive https://github.com/google/sandboxed-api
mkdir build
cd build
cmake ..
make -j 8
gbryant-arm added a commit to veracruz-project/sandboxed-api that referenced this issue Oct 11, 2023
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