Can't compile Wget2 with static libraries only #427

Closed
opened 2026-01-29 20:43:44 +00:00 by claunia · 2 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.
Author
Owner

@eustas commented on GitHub (Dec 29, 2022):

His, could you try again, please; recently the dynamic / static libraries compilation has been changed.

@eustas commented on GitHub (Dec 29, 2022): His, could you try again, please; recently the dynamic / static libraries compilation has been changed.
Author
Owner

@eustas commented on GitHub (Jan 6, 2023):

tried bootstrap + configure + make; got a bunch of warnings, no errors =)
(configure reported brotli compression: yes)

@eustas commented on GitHub (Jan 6, 2023): tried bootstrap + configure + make; got a bunch of warnings, no errors =) (configure reported brotli compression: yes)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#427