Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 731224

Summary: net-analyzer/zabbix-5.4.9-r1 with ld.lld fails to configure - configure: error: OpenSSL library libssl or libcrypto not found
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Miroslav Šulc <fordfrog>
Status: RESOLVED OBSOLETE    
Severity: normal CC: alicef
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 731004    
Attachments: build.log
other.tar.bz2

Description Agostino Sarubbo gentoo-dev 2020-07-07 06:32:02 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-analyzer/zabbix fails to compile.
Discovered on: amd64

NOTE:
This machine uses a clang/LLVM toolchain.
If you think that this issue is strictly related to clang/LLVM please block bug 408963. If you think that this issue isstrictly related to the LLD linker, please block bug 731004.
Comment 1 Agostino Sarubbo gentoo-dev 2020-07-07 06:32:08 UTC
Created attachment 648182 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2020-07-07 06:32:11 UTC
Created attachment 648184 [details]
other.tar.bz2

other logs
Comment 3 Miroslav Šulc gentoo-dev 2020-07-07 07:50:13 UTC
looking at the detailed log, it says this:

configure:11660: checking for OpenSSL support
configure:11813: x86_64-pc-linux-gnu-clang -o conftest -O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color -I/usr/include  -rdynamic -Wl,-O1 -Wl,--as-needed -fuse-ld=lld -Wl,--defsym=__gentoo_check_ldflags__=0 -L/usr/lib conftest.c -lssl -lcrypto -lm -ldl  -lresolv >&5
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../lib64/crt1.o is incompatible with elf_x86_64
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../lib64/crti.o is incompatible with elf_x86_64
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/crtbegin.o is incompatible with elf_x86_64
ld.lld: error: /var/tmp/portage/net-analyzer/zabbix-5.0.1/temp/conftest-689392.o is incompatible with elf_x86_64
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../lib64/libssl.so is incompatible with elf_x86_64
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../lib64/libcrypto.so is incompatible with elf_x86_64
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/libgcc_s.so.1 is incompatible with elf_x86_64
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/libgcc_s.so.1 is incompatible with elf_x86_64
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/crtend.o is incompatible with elf_x86_64
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../lib64/crtn.o is incompatible with elf_x86_64
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)

i have no idea why it reports incompatibility.
Comment 4 Agostino Sarubbo gentoo-dev 2020-07-07 08:26:01 UTC
This is because of LLD linker and /usr/lib in the link command
Comment 5 Adam 2020-07-22 04:00:56 UTC
(In reply to Agostino Sarubbo from comment #4)
> This is because of LLD linker and /usr/lib in the link command

Are you sure that's the full reason?  I'm not using the same toolchain, and the build/configure fails at exactly the same spot:

configure:11660: checking for OpenSSL support
configure:11813: x86_64-pc-linux-gnu-gcc -o conftest -march=native -O2 -pipe -I/usr/include  -rdynamic -Wl,-O1 -Wl,--as-needed -static -L/usr/lib conftest.c -lssl -lcrypto -lm -ldl  -lresolv >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(dso_dlfcn.o): in function `dlfcn_globallookup':
(.text+0x13): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(b_addr.o): in function `BIO_lookup_ex':
(.text+0xcee): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(b_sock.o): in function `BIO_gethostbyname':
(.text+0x71): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/libgcc_eh.a(unwind-dw2.o): in function `uw_init_context_1':
(.text+0x1eb5): undefined reference to `pthread_once'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(c_zlib.o): in function `zlib_stateful_expand_block':
(.text+0x39): undefined reference to `inflate'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(c_zlib.o): in function `zlib_stateful_compress_block':
(.text+0xa2): undefined reference to `deflate'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(c_zlib.o): in function `zlib_stateful_finish':
(.text+0xc9): undefined reference to `inflateEnd'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xd2): undefined reference to `deflateEnd'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(c_zlib.o): in function `zlib_stateful_init':
(.text+0x198): undefined reference to `inflateInit_'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x20a): undefined reference to `deflateInit_'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(c_zlib.o): in function `bio_zlib_ctrl':
(.text+0x374): undefined reference to `deflate'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x484): undefined reference to `zError'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(c_zlib.o): in function `bio_zlib_write':
(.text+0x71a): undefined reference to `deflate'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x7cc): undefined reference to `zError'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x83b): undefined reference to `deflateInit_'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(c_zlib.o): in function `bio_zlib_read':
(.text+0x93c): undefined reference to `inflate'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x9dc): undefined reference to `zError'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xa34): undefined reference to `inflateInit_'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(c_zlib.o): in function `bio_zlib_free':
(.text+0xaa6): undefined reference to `inflateEnd'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xad3): undefined reference to `deflateEnd'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_lock_new':
(.text+0x46): undefined reference to `pthread_rwlock_init'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_read_lock':
(.text+0x85): undefined reference to `pthread_rwlock_rdlock'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_write_lock':
(.text+0xa5): undefined reference to `pthread_rwlock_wrlock'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_unlock':
(.text+0xc5): undefined reference to `pthread_rwlock_unlock'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_lock_free':
(.text+0xea): undefined reference to `pthread_rwlock_destroy'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_run_once':
(.text+0x115): undefined reference to `pthread_once'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_init_local':
(.text+0x135): undefined reference to `pthread_key_create'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_set_local':
(.text+0x167): undefined reference to `pthread_setspecific'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_cleanup_local':
(.text+0x187): undefined reference to `pthread_key_delete'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `openssl_init_fork_handlers':
(.text+0x1e3): undefined reference to `pthread_once'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/libcrypto.a(threads_pthread.o): in function `CRYPTO_THREAD_get_local':
(.text+0x153): undefined reference to `pthread_getspecific'
collect2: error: ld returned 1 exit status
Comment 6 Agostino Sarubbo gentoo-dev 2020-07-22 09:52:14 UTC
(In reply to Adam from comment #5)
> (In reply to Agostino Sarubbo from comment #4)
> > This is because of LLD linker and /usr/lib in the link command
> 
> Are you sure that's the full reason?  I'm not using the same toolchain, and
> the build/configure fails at exactly the same spot:

Yes I'm sure. Your failure looks to be different
Comment 7 Adam 2020-07-26 00:03:35 UTC
(In reply to Agostino Sarubbo from comment #6)
> (In reply to Adam from comment #5)
> > (In reply to Agostino Sarubbo from comment #4)
> > > This is because of LLD linker and /usr/lib in the link command
> > 
> > Are you sure that's the full reason?  I'm not using the same toolchain, and
> > the build/configure fails at exactly the same spot:
> 
> Yes I'm sure. Your failure looks to be different

Thanks, apologies for the noise.
Comment 8 Agostino Sarubbo gentoo-dev 2022-01-16 13:21:52 UTC
tinderbox has reproduced this issue with version 5.4.9-r1 - Updating summary.
Comment 9 Miroslav Šulc gentoo-dev 2022-06-10 08:53:02 UTC
5.4 slot is gone, closing