-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
error: version script assignment of 'local' to symbol 'gz_intmax' failed: symbol not defined #856
Comments
A fix for me was to edit the https://github.com/madler/zlib/blob/develop/zlib.map file and remove gz_intmax in line 18 ZLIB_1.2.0 {
global:
compressBound;
deflateBound;
inflateBack;
inflateBackEnd;
inflateBackInit_;
inflateCopy;
local:
deflate_copyright;
inflate_copyright;
inflate_fast;
inflate_table;
zcalloc;
zcfree;
z_errmsg;
gz_error;
- gz_intmax;
_*;
}; |
Same issue when building latest zlib with LLVM clang 17.0.2 on Ubuntu 22.04 x86_64. The exact error from clang is:
|
The workaround suggested in the upstream issue is to add I think the problem here with zlib is that the symbol |
Note that I have, a few days ago, posted a proposal for a proper fix for this issue. |
@madler: Can you look this ticket? |
Patch proposed upstream to fix the following issue ld.lld: error: version script assignment of 'local' to symbol 'gz_intmax' failed: symbol not defined clang: error: linker command failed with exit code 1 (use -v to see invocation) Upstream issue: madler/zlib#856 Upstream patch: madler/zlib#865
Patch proposed upstream to fix the following issue ld.lld: error: version script assignment of 'local' to symbol 'gz_intmax' failed: symbol not defined clang: error: linker command failed with exit code 1 (use -v to see invocation) Upstream issue: madler/zlib#856 Upstream patch: madler/zlib#865
Patch proposed upstream to fix the following issue ld.lld: error: version script assignment of 'local' to symbol 'gz_intmax' failed: symbol not defined clang: error: linker command failed with exit code 1 (use -v to see invocation) Upstream issue: madler/zlib#856 Upstream patch: madler/zlib#865
Patch proposed upstream to fix the following issue ld.lld: error: version script assignment of 'local' to symbol 'gz_intmax' failed: symbol not defined clang: error: linker command failed with exit code 1 (use -v to see invocation) Upstream issue: madler/zlib#856 Upstream patch: madler/zlib#865
Patch proposed upstream to fix the following issue ld.lld: error: version script assignment of 'local' to symbol 'gz_intmax' failed: symbol not defined clang: error: linker command failed with exit code 1 (use -v to see invocation) Upstream issue: madler/zlib#856 Upstream patch: madler/zlib#865
@madler: Can you look this ticket? |
|
Merged commit: |
According to the documentation [1] it's only useful for shared libraries. With recent Android NDK this leads to linking issues with gz_intmax similar to madler#856. In autotools it's only set with LDSHARED. [1]https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_chapter/ld_3.html
With NDK 26-rc1, Zlib fails to compile for this:
Reason was most likely was:
https://reviews.llvm.org/D135402
That means, the error (for now) could be ignored with passing this:
The text was updated successfully, but these errors were encountered: