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

Build failure with recent lld #1427

Closed
aaronmondal opened this issue Feb 6, 2023 · 3 comments · Fixed by #1421
Closed

Build failure with recent lld #1427

aaronmondal opened this issue Feb 6, 2023 · 3 comments · Fixed by #1421

Comments

@aaronmondal
Copy link

aaronmondal commented Feb 6, 2023

Upstream lld flipped --undefined-version(https://reviews.llvm.org/D135402). This causes recent Clang toolchains to break:

Default config:

ld.lld: error: version script assignment of 'ZLIB_NG_2.0.0' to symbol 'zng_adler32_c' failed: symbol not defined
ld.lld: error: version script assignment of 'ZLIB_NG_2.0.0' to symbol 'zng_zlibng_string' failed: symbol not defined
ld.lld: error: version script assignment of 'ZLIB_NG_2.0.0' to symbol 'zng_version' failed: symbol not defined
ld.lld: error: version script assignment of 'local' to symbol 'zng_inflate_fast' failed: symbol not defined
ld.lld: error: version script assignment of 'local' to symbol 'zng_zcalloc' failed: symbol not defined
ld.lld: error: version script assignment of 'local' to symbol 'zng_zcfree' failed: symbol not defined
ld.lld: error: version script assignment of 'local' to symbol 'zng_gz_error' failed: symbol not defined
ld.lld: error: version script assignment of 'ZLIB_NG_GZ_2.0.0' to symbol 'zng_gzoffset64' failed: symbol not defined
ld.lld: error: version script assignment of 'ZLIB_NG_GZ_2.0.0' to symbol 'zng_gzopen64' failed: symbol not defined
ld.lld: error: version script assignment of 'ZLIB_NG_GZ_2.0.0' to symbol 'zng_gzseek64' failed: symbol not defined
ld.lld: error: version script assignment of 'ZLIB_NG_GZ_2.0.0' to symbol 'zng_gztell64' failed: symbol not defined

ZLIB_COMPAT config:

ld.lld: error: version script assignment of 'local' to symbol 'inflate_fast' failed: symbol not defined
ld.lld: error: version script assignment of 'local' to symbol 'inflate_table' failed: symbol not defined
ld.lld: error: version script assignment of 'local' to symbol 'zcalloc' failed: symbol not defined
ld.lld: error: version script assignment of 'local' to symbol 'zcfree' failed: symbol not defined
@mtl1979
Copy link
Collaborator

mtl1979 commented Feb 6, 2023

At least zng_adler32_c should not be exported anymore...
zng_zlibng_string should be zlibng_string and zng_version should be zlibng_version.
zng_inflate_fast and inflate_fast might need workaround as those are in functable now.
inflate_table doesn't exist at all, but zng_inflate_table is internal symbol.
zng_zcalloc should be zng_calloc and zng_zcfree should be zng_cfree.
zng_gz_error should be just gz_error.
zng_gzoffset64, zng_gzopen64, zng_gzseek64 and zng_gztell64 do not exist, functions with 64 suffix only exist in compatibility mode.

@Dead2 @nmoinvaz

@Dead2
Copy link
Member

Dead2 commented Feb 7, 2023

#1421 passes for both normal and compat on my local x86-64 machine.
I did not test any other arches for bugs, but hopefully there are none.

It obviously also fails with WITH_GZFILEOP=OFF, and we'd need a separate set of map files without those (or .in files that we add depending on the need). I am not planning to tackle this one myself at the moment.

Edit: Wrong PR number

@aaronmondal
Copy link
Author

I'm amazed at the swiftness with which this was handled. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants