[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...
Please attach the complete build log and emerge --info, thanks.
Created attachment 615960 [details] build.log.gz Build.log: per request.
Created attachment 615962 [details] emerge.info.gz emerge.info.gz: per request
Note, that meanwhile net-dns/bind-9.14.9 still builds fine. It doesn't include the wrapper stuff 9.16.0 fails with.
Same problem : libtool: error: unsupported warning category: 'l,--as-needed' make[3]: *** [Makefile:482: libwrap.so] Error 1 make[3]: *** Waiting for unfinished jobs....
Created attachment 616396 [details] build.log
Also getting this libtool error.
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
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
This is cmocka tests automatics. Try "with_cmocka=no emerge -1 net-dns/bind". In ebuild - configure with "--without-cmocka" or "--with-cmocka=no".
(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!
Works for me, too, although bug 701114 seems to have come back at the same time...
(In reply to Stephen Mollett from comment #12) > ... bug 701114 seems to have come back at the same time... +1
(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
*** Bug 715118 has been marked as a duplicate of this bug. ***
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(+)