libcrypto / libz build buglet on Fedora 35
ckreibich opened this issue · 2 comments
ckreibich commented
Unless I say LDFLAGS="-lcrypto -lz" ./configure
, I get the following linker hiccup at the end of the build:
[ 92%] Linking CXX executable ../bin/zeek-agent
/usr/bin/ld: /usr/lib64/libcrypto.a(c_zlib.o): in function `zlib_stateful_expand_block':
(.text+0x41): undefined reference to `inflate'
/usr/bin/ld: /usr/lib64/libcrypto.a(c_zlib.o): in function `zlib_stateful_compress_block':
(.text+0xba): undefined reference to `deflate'
/usr/bin/ld: /usr/lib64/libcrypto.a(c_zlib.o): in function `zlib_stateful_finish':
(.text+0xed): undefined reference to `inflateEnd'
/usr/bin/ld: (.text+0xf6): undefined reference to `deflateEnd'
/usr/bin/ld: /usr/lib64/libcrypto.a(c_zlib.o): in function `zlib_stateful_init':
(.text+0x1c6): undefined reference to `inflateInit_'
/usr/bin/ld: (.text+0x22e): undefined reference to `deflateInit_'
/usr/bin/ld: /usr/lib64/libcrypto.a(c_zlib.o): in function `bio_zlib_ctrl':
(.text+0x390): undefined reference to `deflate'
/usr/bin/ld: (.text+0x49a): undefined reference to `zError'
/usr/bin/ld: /usr/lib64/libcrypto.a(c_zlib.o): in function `bio_zlib_write':
(.text+0x735): undefined reference to `deflate'
/usr/bin/ld: (.text+0x7da): undefined reference to `zError'
/usr/bin/ld: (.text+0x855): undefined reference to `deflateInit_'
/usr/bin/ld: /usr/lib64/libcrypto.a(c_zlib.o): in function `bio_zlib_read':
(.text+0x96c): undefined reference to `inflate'
/usr/bin/ld: (.text+0xa0a): undefined reference to `zError'
/usr/bin/ld: (.text+0xa6c): undefined reference to `inflateInit_'
/usr/bin/ld: /usr/lib64/libcrypto.a(c_zlib.o): in function `bio_zlib_free':
(.text+0xadf): undefined reference to `inflateEnd'
/usr/bin/ld: (.text+0xb08): undefined reference to `deflateEnd'
collect2: error: ld returned 1 exit status
make[3]: *** [src/CMakeFiles/zeek-agent.dir/build.make:557: bin/zeek-agent] Error 1
make[2]: *** [CMakeFiles/Makefile2:1112: src/CMakeFiles/zeek-agent.dir/all] Error 2
make[1]: *** [Makefile:166: all] Error 2
make: *** [Makefile:8: build] Error 2
I'm not sure what's the proper fix, but I came upon the workaround in crystal-lang/crystal#6288.