Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710840 - net-dns/bind-9.16.0 fails to compile with: "libtool: error: unsupported warning category: 'l,-O1'"
Summary: net-dns/bind-9.16.0 fails to compile with: "libtool: error: unsupported war...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
: 715118 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-25 21:14 UTC by Attila Tóth
Modified: 2020-05-05 06:21 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (build.log.gz,24.74 KB, application/x-gzip)
2020-02-26 17:11 UTC, Attila Tóth
Details
emerge.info.gz (emerge.info.gz,9.13 KB, application/x-gzip)
2020-02-26 17:12 UTC, Attila Tóth
Details
build.log (build.log.gz,23.89 KB, application/gzip)
2020-02-27 20:05 UTC, Alesc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Tóth 2020-02-25 21:14:14 UTC
[ebuild     U ~] net-dns/bind-9.16.0::gentoo [9.14.9::gentoo] USE="caps fixed-rrset json lmdb python xml zlib -berkdb -dlz -dnsrps -dnstap -doc -geoip -geoip2 -gssapi -ldap -libressl -mysql -odbc -postgres (-selinux) -static-libs -urandom" PYTHON_TARGETS="python3_6 python3_7" 0 KiB

While compiling the package it fails with:

libtool: compile:  x86_64-pc-linux-gnu-gcc -include /var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/config.h -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0 -I../../.. -I. -Iinclude -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns/include -I../../../lib/ns/include -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/dns/include -I../../../lib/dns/include -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/isc/include -I../../../lib/isc -I../../../lib/isc/include -I../../../lib/isc/unix/include -I../../../lib/isc/pthreads/include -DTESTS=\"/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns/tests/\" -DNAMED_PLUGINDIR=\"/usr/lib64/named\" -O2 -march=native -pipe -pthread -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing -c nstest.c -o nstest.o >/dev/null 2>&1
libtool:   error: unsupported warning category: 'l,-O1'
make[3]: *** [Makefile:482: libwrap.so] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns/tests'
make[2]: *** [Makefile:186: testdirs] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns'
make[1]: *** [Makefile:84: subdirs] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib'
make: *** [Makefile:87: subdirs] Error 1
 * ERROR: net-dns/bind-9.16.0::gentoo failed (compile phase):
 *   emake failed

Any ideas?

Reproducible: Always

Steps to Reproduce:
If I add ${CC} and ${CFLAGS} to the Makefile for wrap it stops with this:
libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -pthread -Wl,-O1 -Wl,-z -Wl,interpose -o libwrap.so .libs/wrap.o  -Wl,--as-needed -L/usr/lib64 -llmdb -luv -lrt -lpthread -lnsl -ldl -lcmocka -pthread
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib64/Scrt1.o: in function `_start':
(.text+0x20): undefined reference to `main'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/wrap.o: in function `isc_nmhandle_unref':
wrap.c:(.text+0x1): undefined reference to `__wrap_isc_nmhandle_unref'
collect2: error: ld returned 1 exit status

I cannot solve this situation with either supplying -shared or -nostartfiles.
And that's the point I run out of time to spend on this...
Comment 1 Tomáš Mózes 2020-02-26 06:31:14 UTC
Please attach the complete build log and emerge --info, thanks.
Comment 2 Attila Tóth 2020-02-26 17:11:28 UTC
Created attachment 615960 [details]
build.log.gz

Build.log: per request.
Comment 3 Attila Tóth 2020-02-26 17:12:11 UTC
Created attachment 615962 [details]
emerge.info.gz

emerge.info.gz: per request
Comment 4 Attila Tóth 2020-02-26 17:13:48 UTC
Note, that meanwhile net-dns/bind-9.14.9 still builds fine. It doesn't include the wrapper stuff 9.16.0 fails with.
Comment 5 Alesc 2020-02-27 20:04:31 UTC
Same problem :

libtool:   error: unsupported warning category: 'l,--as-needed'
make[3]: *** [Makefile:482: libwrap.so] Error 1
make[3]: *** Waiting for unfinished jobs....
Comment 6 Alesc 2020-02-27 20:05:49 UTC
Created attachment 616396 [details]
build.log
Comment 7 Maciej S. Szmigiero 2020-03-01 15:42:40 UTC
Also getting this libtool error.
Comment 8 Techwolf 2020-03-20 04:58:36 UTC
Getting the same error. Relative info follows:

libtool: compile:  x86_64-pc-linux-gnu-gcc -include /var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/config.h -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0 -I../../.. -I. -Iinclude -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns/include -I../../../lib/ns/include -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/dns/include -I../../../lib/dns/include -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/isc/include -I../../../lib/isc -I../../../lib/isc/include -I../../../lib/isc/unix/include -I../../../lib/isc/pthreads/include -DTESTS=\"/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns/tests/\" -DNAMED_PLUGINDIR=\"/usr/lib64/named\" -march=native -O2 -pipe -ggdb -pthread -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing -c wrap.c  -fPIC -DPIC -o .libs/wrap.o


libtool: compile:  x86_64-pc-linux-gnu-gcc -include /var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/config.h -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0 -I../../.. -I. -Iinclude -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns/include -I../../../lib/ns/include -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/dns/include -I../../../lib/dns/include -I/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/isc/include -I../../../lib/isc -I../../../lib/isc/include -I../../../lib/isc/unix/include -I../../../lib/isc/pthreads/include -DTESTS=\"/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns/tests/\" -DNAMED_PLUGINDIR=\"/usr/lib64/named\" -march=native -O2 -pipe -ggdb -pthread -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing -c wrap.c -o wrap.o >/dev/null 2>&1


/bin/sh /var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/libtool --mode=link  -Wl,-O1 -Wl,--as-needed -L/usr/lib64 -ldl  -Wl,-z,interpose  -o libwrap.so wrap.lo -luv -lrt -lpthread -lnsl -ldl  -lcmocka


libtool:   error: unsupported warning category: 'l,-O1'
make[3]: *** [Makefile:482: libwrap.so] Error 1
make[3]: Leaving directory '/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns/tests'
make[2]: *** [Makefile:186: testdirs] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib/ns'
make[1]: *** [Makefile:84: subdirs] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-dns/bind-9.16.0/work/bind-9.16.0/lib'
make: *** [Makefile:87: subdirs] Error 1
 * ERROR: net-dns/bind-9.16.0::gentoo failed (compile phase):
 *   emake failed
Comment 9 Stephen Mollett 2020-03-23 17:37:53 UTC
Also applies to bind-9.16.1.

Much-abbreviated tail of the build messages (can provide full if needed):

/bin/sh /var/tmp/portage/net-dns/bind-9.16.1/work/bind-9.16.1/libtool --mode=link  -Wl,-O1 -Wl,--as-needed -L/usr/lib64 -ldl  -Wl,-z,interpose  -o libwrap.so wrap.lo -luv -lrt -lpthread -lnsl -ldl  -lcmocka
libtool:   error: unsupported warning category: 'l,-O1'
make[3]: *** [Makefile:482: libwrap.so] Error 1
make[3]: Leaving directory '/var/tmp/portage/net-dns/bind-9.16.1/work/bind-9.16.1/lib/ns/tests'
make[2]: *** [Makefile:186: testdirs] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-dns/bind-9.16.1/work/bind-9.16.1/lib/ns'
make[1]: *** [Makefile:84: subdirs] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-dns/bind-9.16.1/work/bind-9.16.1/lib'
make: *** [Makefile:87: subdirs] Error 1
 * ERROR: net-dns/bind-9.16.1::gentoo failed (compile phase):
 *   emake failed
Comment 10 Denis Kaganovich 2020-03-25 06:52:12 UTC
This is cmocka tests automatics. Try "with_cmocka=no emerge -1 net-dns/bind". In ebuild - configure with "--without-cmocka" or "--with-cmocka=no".
Comment 11 Attila Tóth 2020-03-25 07:14:42 UTC
(In reply to Denis Kaganovich from comment #10)
> This is cmocka tests automatics. Try "with_cmocka=no emerge -1
> net-dns/bind". In ebuild - configure with "--without-cmocka" or
> "--with-cmocka=no".

Nice one! It works for me: thanks!
Comment 12 Stephen Mollett 2020-03-25 11:26:12 UTC
Works for me, too, although bug 701114 seems to have come back at the same time...
Comment 13 Tomáš Mózes 2020-03-25 12:44:19 UTC
(In reply to Stephen Mollett from comment #12)
> ... bug 701114 seems to have come back at the same time...

+1
Comment 14 Denis Kaganovich 2020-03-25 23:31:06 UTC
(In reply to Stephen Mollett from comment #12)
> Works for me, too, although bug 701114 seems to have come back at the same
> time...

Answered in bug 701114
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2020-05-05 06:07:47 UTC
*** Bug 715118 has been marked as a duplicate of this bug. ***
Comment 16 Larry the Git Cow gentoo-dev 2020-05-05 06:21:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10a51f6a197f8b6b8e146ca16bb458288943cc08

commit 10a51f6a197f8b6b8e146ca16bb458288943cc08
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2020-05-05 06:17:43 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2020-05-05 06:21:22 +0000

    net-dns/bind: build fix for LDFLAGS=-Wl,-O1
    
    The cmocka component introduced as a unit test framework in BIND 9.16
    series does not link correctly if LDFLAGS include -Wl,-O1. It can be
    triggered directly, or via any pkg-config dependencies that includes
    that in LDFLAGS.
    
    This does not fix other QA errors already present, just disables
    building cmocka as the testing is already disabled in the ebuild.
    
    Closes: https://bugs.gentoo.org/710840
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 net-dns/bind/bind-9.16.1.ebuild | 2 ++
 1 file changed, 2 insertions(+)