Can't compile Wget2 with static libraries only #424

Open
opened 2026-01-29 20:43:37 +00:00 by claunia · 0 comments
Owner

Originally created by @Coool on GitHub (May 19, 2022).

If try to compile wget with static libraries only on macOS, getting error:

/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libwget_decompress.a(xsize.o) has no symbols
CCLD test_linking_encoding
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
"_BrotliDefaultAllocFunc", referenced from:
_BrotliDecoderStateInit in libbrotlidec.a(state.c.o)
"_BrotliDefaultFreeFunc", referenced from:
_BrotliDecoderStateInit in libbrotlidec.a(state.c.o)
"_BrotliGetDictionary", referenced from:
_BrotliDecoderStateInit in libbrotlidec.a(state.c.o)
"_BrotliGetTransforms", referenced from:
_BrotliDecoderStateInit in libbrotlidec.a(state.c.o)
"_BrotliTransformDictionaryWord", referenced from:
_ProcessCommands in libbrotlidec.a(decode.c.o)
_SafeProcessCommands in libbrotlidec.a(decode.c.o)
"__kBrotliContextLookupTable", referenced from:
_BrotliDecoderDecompressStream in libbrotlidec.a(decode.c.o)
_SafeDecodeLiteralBlockSwitch in libbrotlidec.a(decode.c.o)
_DecodeLiteralBlockSwitch in libbrotlidec.a(decode.c.o)
"__kBrotliPrefixCodeRanges", referenced from:
_BrotliDecoderDecompressStream in libbrotlidec.a(decode.c.o)
_SafeDecodeCommandBlockSwitch in libbrotlidec.a(decode.c.o)
_DecodeCommandBlockSwitch in libbrotlidec.a(decode.c.o)
_SafeDecodeLiteralBlockSwitch in libbrotlidec.a(decode.c.o)
_DecodeLiteralBlockSwitch in libbrotlidec.a(decode.c.o)
_SafeDecodeDistanceBlockSwitch in libbrotlidec.a(decode.c.o)
_DecodeDistanceBlockSwitch in libbrotlidec.a(decode.c.o)
...
ld: symbol(s) not found for architecture x86_64

Can compile fine if lib folder contains dynamic and static libraries. But wget don't compile brotli libraries staticly, but relay on dynamic libraries.

Originally created by @Coool on GitHub (May 19, 2022). If try to compile wget with static libraries only on macOS, getting error: > /Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libwget_decompress.a(xsize.o) has no symbols CCLD test_linking_encoding clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] Undefined symbols for architecture x86_64: "_BrotliDefaultAllocFunc", referenced from: _BrotliDecoderStateInit in libbrotlidec.a(state.c.o) "_BrotliDefaultFreeFunc", referenced from: _BrotliDecoderStateInit in libbrotlidec.a(state.c.o) "_BrotliGetDictionary", referenced from: _BrotliDecoderStateInit in libbrotlidec.a(state.c.o) "_BrotliGetTransforms", referenced from: _BrotliDecoderStateInit in libbrotlidec.a(state.c.o) "_BrotliTransformDictionaryWord", referenced from: _ProcessCommands in libbrotlidec.a(decode.c.o) _SafeProcessCommands in libbrotlidec.a(decode.c.o) "__kBrotliContextLookupTable", referenced from: _BrotliDecoderDecompressStream in libbrotlidec.a(decode.c.o) _SafeDecodeLiteralBlockSwitch in libbrotlidec.a(decode.c.o) _DecodeLiteralBlockSwitch in libbrotlidec.a(decode.c.o) "__kBrotliPrefixCodeRanges", referenced from: _BrotliDecoderDecompressStream in libbrotlidec.a(decode.c.o) _SafeDecodeCommandBlockSwitch in libbrotlidec.a(decode.c.o) _DecodeCommandBlockSwitch in libbrotlidec.a(decode.c.o) _SafeDecodeLiteralBlockSwitch in libbrotlidec.a(decode.c.o) _DecodeLiteralBlockSwitch in libbrotlidec.a(decode.c.o) _SafeDecodeDistanceBlockSwitch in libbrotlidec.a(decode.c.o) _DecodeDistanceBlockSwitch in libbrotlidec.a(decode.c.o) ... ld: symbol(s) not found for architecture x86_64 Can compile fine if lib folder contains dynamic and static libraries. But wget don't compile brotli libraries staticly, but relay on dynamic libraries.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#424