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

lto-wrapper: warning: using serial compilation of 16 LTRANS jobs #1001

Closed
iz8mbw opened this issue Jan 30, 2024 · 2 comments
Closed

lto-wrapper: warning: using serial compilation of 16 LTRANS jobs #1001

iz8mbw opened this issue Jan 30, 2024 · 2 comments

Comments

@iz8mbw
Copy link

iz8mbw commented Jan 30, 2024

Hello.
Trying to build unbound on Ubuntu 22 using gcc version 12.3.0 and have this issue when make:

lto-wrapper: warning: using serial compilation of 16 LTRANS jobs
lto-wrapper: note: see the '-flto' option documentation for more information
/usr/bin/ld: /opt/ssl3/lib64/libcrypto.a(libcrypto-lib-ui_openssl.o): warning: relocation against `stdin@@GLIBC_2.2.5' in read-only section `.text'
/usr/bin/ld: /opt/ssl3/lib64/libcrypto.a(libcrypto-lib-cryptlib.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [Makefile:366: libunbound.la] Error 1

Configured with:
./configure --sysconfdir=/etc --enable-tfo-client --enable-tfo-server --with-ssl=/opt/ssl3 --with-libnghttp2

having OpenSSL 3.2.0 built from source in /opt/ssl3

@wcawijngaards
Copy link
Member

There could be one of two things wrong here. The lto compilation option could be giving trouble, as it did in the past for Ubuntu compiles, but older Ubuntu versions, and that can be mitigated by using the configure flag --disable-flto. The warning of the relocation, not sure if that is an lto problem or a static versus shared problem. The next error is about use of the static openssl library for a shared compile, and this can be mitigated by using the configure option --disable-shared. That stops the compilation of the shared library, the .so file, but it builds the server executable and a static library.

Perhaps the configure flags --enable-static-exe or --enable-fully-static can be useful. They are used to make static compiles, so the binaries do not depend on shared libraries. But I think perhaps one of the first two configure options could help.

@iz8mbw
Copy link
Author

iz8mbw commented Feb 1, 2024

Hello and thank you for answer.
I confirm adding --disable-shared --disable-flto to configure solve the issue.

Many thanks!

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

No branches or pull requests

2 participants