Bug 203273 - dns/bind99 could not be built with poudriere
Summary: dns/bind99 could not be built with poudriere
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-22 23:37 UTC by Lev A. Serebryakov
Modified: 2015-09-26 21:47 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments
src.conf of jail where build failed. (1.45 KB, text/plain)
2015-09-22 23:37 UTC, Lev A. Serebryakov
no flags Details
Options of port in question (1.38 KB, text/plain)
2015-09-22 23:38 UTC, Lev A. Serebryakov
no flags Details
193cf3c0f45bca45ee81a7cc646008bc6c36ca5d.patch (1.03 KB, patch)
2015-09-23 11:15 UTC, Mathieu Arnold
no flags Details | Diff
c02a936180adab7815e1658628cbd6c002370431.diff (757 bytes, patch)
2015-09-23 14:56 UTC, Mathieu Arnold
no flags Details | Diff
c02a936180adab7815e1658628cbd6c002370431.diff (1.27 KB, patch)
2015-09-23 15:17 UTC, Mathieu Arnold
no flags Details | Diff
a951c2a04c40c31451e7ecc930a88bac98e8cb26.diff (2.27 KB, text/plain)
2015-09-24 10:15 UTC, Mathieu Arnold
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lev A. Serebryakov freebsd_committer 2015-09-22 23:37:41 UTC
Created attachment 161289 [details]
src.conf of jail where build failed.

I'm building small set of packages for my NanoBSD image with poudriere on 11-CURRENT system. Before latest update of dns/bind99 from 9.9.7-P3 to 9.9.8 everything worked fine.

9.9.8 failed to build with this error:

cc -pthread  -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8 -I./include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/dns/include  -I../../lib/dns/include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/bind9/include  -I../../lib/bind9/include  -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/isc/include  -I../../lib/isc  -I../../lib/isc/include  -I../../lib/isc/unix/include  -I../../lib/isc/pthreads/include  -I../../lib/isc/x86_32/include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/lwres/include  -I../../lib/lwres/unix/include  -I../../lib/lwres/include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/isccfg/include  -I../../lib/isccfg/include   -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"9.9.8\" -D_THREAD_SAFE -O2 -pipe  -isystem /usr/local/include -fstack-protector -fno-strict-aliasing -I/usr/local/include/libxml2 -I/usr/local/include   -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing  -c nslookup.c
nslookup.c:48:10: fatal error: 'readline/readline.h' file not found
#include <readline/readline.h>
         ^
1 error generated.

I have rather lot WITHOUT_XXX options in my jail (attached as "11x64-gw-src.conf"), but there is system "usr/include/edit/readline/readline.h", and libedit-3.1.20150325_1 is installed by poudriere too.

Options for "dns/bind99" port are attached as "dns_bind99.options".
Comment 1 Lev A. Serebryakov freebsd_committer 2015-09-22 23:38:15 UTC
Created attachment 161290 [details]
Options of port in question
Comment 2 Mathieu Arnold freebsd_committer 2015-09-23 07:55:43 UTC
Does changing the USES=libedit with USES=readline fixes the problem ? (also, does the resulting binary actually link to readline and not libedit ?
Comment 3 Lev A. Serebryakov freebsd_committer 2015-09-23 10:11:42 UTC
replacing "libedit" with "readline" fixes build, but actual binaries are linked with system libedit after that:

nslookup:
        libedit.so.7 => /lib/libedit.so.7 (0x8009e6000)
        libcrypto.so.7 => /lib/libcrypto.so.7 (0x800c1d000)
        libxml2.so.2 => not found (0)
        libz.so.6 => /lib/libz.so.6 (0x801014000)
        libiconv.so.2 => not found (0)
        libm.so.5 => /lib/libm.so.5 (0x80122a000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x801454000)
        libthr.so.3 => /lib/libthr.so.3 (0x801662000)
        libc.so.7 => /lib/libc.so.7 (0x801887000)
        libncursesw.so.8 => /lib/libncursesw.so.8 (0x801c1f000)
nsupdate:
        libedit.so.7 => /lib/libedit.so.7 (0x8009df000)
        libcrypto.so.7 => /lib/libcrypto.so.7 (0x800c16000)
        libxml2.so.2 => not found (0)
        libz.so.6 => /lib/libz.so.6 (0x80100d000)
        libiconv.so.2 => not found (0)
        libm.so.5 => /lib/libm.so.5 (0x801223000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80144d000)
        libthr.so.3 => /lib/libthr.so.3 (0x80165b000)
        libc.so.7 => /lib/libc.so.7 (0x801880000)
        libncursesw.so.8 => /lib/libncursesw.so.8 (0x801c18000)
Comment 4 Lev A. Serebryakov freebsd_committer 2015-09-23 10:12:16 UTC
BTW, looks like "-isystem" parameter to cc breaks build in reported case, as with USES=readline there is no such parameter:

cc -pthread  -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8 -I./include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/dns/include  -I../../lib/dns/include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/bind9/include  -I../../lib/bind9/include  -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/isc/include  -I../../lib/isc  -I../../lib/isc/include  -I../../lib/isc/unix/include  -I../../lib/isc/pthreads/include  -I../../lib/isc/x86_32/include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/lwres/include  -I../../lib/lwres/unix/include  -I../../lib/lwres/include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/isccfg/include  -I../../lib/isccfg/include   -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"9.9.8\" -D_THREAD_SAFE -O2 -pipe  -fstack-protector -fno-strict-aliasing -I/usr/local/include/libxml2 -I/usr/local/include   -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing  -c nslookup.c

USES=libedit enforces localbase, but I don't understand, why it could not pickup headers from port libedit in such case.
Comment 5 Mathieu Arnold freebsd_committer 2015-09-23 11:15:40 UTC
Created attachment 161301 [details]
193cf3c0f45bca45ee81a7cc646008bc6c36ca5d.patch

Could you try reverting to libedit, and with the attached patch ?
Comment 6 Lev A. Serebryakov freebsd_committer 2015-09-23 12:21:10 UTC
Same error with patch:

cc -pthread  -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8 -I./include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/dns/include  -I../../lib/dns/include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/bind9/include  -I../../lib/bind9/include  -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/isc/include  -I../../lib/isc  -I../../lib/isc/include  -I../../lib/isc/unix/include  -I../../lib/isc/pthreads/include  -I../../lib/isc/x86_32/include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/lwres/include  -I../../lib/lwres/unix/include  -I../../lib/lwres/include -I/wrkdirs/usr/ports/dns/bind99/work/bind-9.9.8/lib/isccfg/include  -I../../lib/isccfg/include   -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"9.9.8\" -D_THREAD_SAFE -O2 -pipe  -isystem /usr/local/include -fstack-protector -fno-strict-aliasing -I/usr/local/include/libxml2 -I/usr/local/include   -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing  -c nslookup.c
nslookup.c:48:10: fatal error: 'readline/readline.h' file not found
#include <readline/readline.h>
         ^
1 error generated.
Comment 7 Mathieu Arnold freebsd_committer 2015-09-23 14:56:11 UTC
Created attachment 161306 [details]
c02a936180adab7815e1658628cbd6c002370431.diff

What about this one ? (sorry, I don't have a -CURRENT box to test on)
Comment 8 Lev A. Serebryakov freebsd_committer 2015-09-23 15:12:47 UTC
Are you sure about patch? Looks like here is only changes to PORTREVISION.
Comment 9 Mathieu Arnold freebsd_committer 2015-09-23 15:17:32 UTC
Created attachment 161307 [details]
c02a936180adab7815e1658628cbd6c002370431.diff

Argh, sorry.
Comment 10 Lev A. Serebryakov freebsd_committer 2015-09-23 15:44:09 UTC
Looks to work

nslookup:
        libreadline.so.6 => not found (0)
        libcrypto.so.7 => /lib/libcrypto.so.7 (0x8009e6000)
        libxml2.so.2 => not found (0)
        libz.so.6 => /lib/libz.so.6 (0x800ddd000)
        libiconv.so.2 => not found (0)
        libm.so.5 => /lib/libm.so.5 (0x800ff3000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80121d000)
        libthr.so.3 => /lib/libthr.so.3 (0x80142b000)
        libc.so.7 => /lib/libc.so.7 (0x801650000)

It is "not found" because I'm running ldd on host system, which doesn't have this package (and libiconv) installed.
Comment 11 Mathieu Arnold freebsd_committer 2015-09-24 10:15:35 UTC
Created attachment 161332 [details]
a951c2a04c40c31451e7ecc930a88bac98e8cb26.diff

Ok, good, could you now test this one ? it should link with libedit from ports.
Comment 12 commit-hook freebsd_committer 2015-09-25 10:05:58 UTC
A commit references this bug:

Author: mat
Date: Fri Sep 25 10:05:49 UTC 2015
New revision: 397807
URL: https://svnweb.freebsd.org/changeset/ports/397807

Log:
  Fix build on -CURRENT. [1]

  - Force building with libedit
  - Bump PORTREVISION to account for accidental succesful builds

  PR:		203273 [1]
  Sponsored by:	Absolight

Changes:
  head/dns/bind-tools/Makefile
  head/dns/bind910/Makefile
  head/dns/bind99/Makefile
Comment 13 Peter Wemm freebsd_committer freebsd_triage 2015-09-26 07:20:13 UTC
Absolutely is not fixed.  Now it fails to build on all branche, at least for the slave port dns/bind-tools:

11.x:
cc -pthread  -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3 -I../.. -I./include -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/dns/include  -I../../lib/dns/include -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/bind9/include  -I../../lib/bind9/include  -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/isc/include  -I../../lib/isc  -I../../lib/isc/include  -I../../lib/isc/unix/include  -I../../lib/isc/pthreads/include  -I../../lib/isc/x86_32/include -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/lwres/include  -I../../lib/lwres/unix/include  -I../../lib/lwres/include -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/isccfg/include  -I../../lib/isccfg/include -I/usr/local/include  -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"9.10.3\" -DOPENSSL -DDIG_SIGCHASE=1 -D_THREAD_SAFE -O2 -pipe  -fstack-protector -fno-strict-aliasing -I/usr/local/include/libxml2 -I/usr/include   -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing  -c nslookup.c
nslookup.c:48:10: fatal error: 'editline/readline.h' file not found
#include <editline/readline.h>
         ^
1 error generated.
*** Error code 1

Stop.
make[3]: stopped in /wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/bin/dig


all the way through to 9.x:
cc -pthread  -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3 -I../.. -I./include -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/dns/include  -I../../lib/dns/include -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/bind9/include  -I../../lib/bind9/include  -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/isc/include  -I../../lib/isc  -I../../lib/isc/include  -I../../lib/isc/unix/include  -I../../lib/isc/pthreads/include  -I../../lib/isc/x86_32/include -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/lwres/include  -I../../lib/lwres/unix/include  -I../../lib/lwres/include -I/wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/lib/isccfg/include  -I../../lib/isccfg/include -I/usr/local/include  -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"9.10.3\" -DOPENSSL -DDIG_SIGCHASE=1 -D_THREAD_SAFE -O2 -pipe -fstack-protector -fno-strict-aliasing -I/usr/local/include/libxml2 -I/usr/local/include   -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing -fno-delete-null-pointer-checks  -c nslookup.c
nslookup.c:48:31: error: editline/readline.h: No such file or directory
nslookup.c: In function 'get_next_command':
nslookup.c:780: warning: implicit declaration of function 'readline'
nslookup.c:780: warning: assignment makes pointer from integer without a cast
nslookup.c:782: warning: implicit declaration of function 'add_history'
*** [nslookup.o] Error code 1

Stop in /wrkdirs/usr/ports/dns/bind-tools/work/bind-9.10.3/bin/dig.
*** [subdirs] Error code 1

The solution we're using on the freebsd.org cluster:

Index: Makefile
===================================================================
--- Makefile    (revision 397930)
+++ Makefile    (working copy)
@@ -33,7 +33,7 @@
 
 MAKE_JOBS_UNSAFE=      yes
 
-USES=  cpe libedit
+USES=  cpe
 
 CPE_VENDOR=    isc
 CPE_VERSION=   ${ISCVERSION:C/-.*//}
@@ -48,7 +48,7 @@
                --disable-symtable \
                --with-randomdev=/dev/random \
                --with-libxml2=${LOCALBASE} \
-               --with-readline=-ledit \
+               --without-readline \
                --sysconfdir=${ETCDIR}
 .if defined(BIND_TOOLS_SLAVE)
 CONFIGURE_ARGS+=       --disable-shared
Comment 14 Peter Wemm freebsd_committer freebsd_triage 2015-09-26 07:24:52 UTC
FWIW, the error message above, there is no such include <editline/readline.h>
so the line in post-patch here:
@${REINPLACE_CMD} -e 's|readline/readline.h|editline/readline.h|; \
.. is bogus.

There is a /usr/include/edit/readline/readline.h though on all branches.  I don't know where <editline/readline.h> came from.
Comment 15 Mathieu Arnold freebsd_committer 2015-09-26 21:45:20 UTC
(In reply to Peter Wemm from comment #14)
> FWIW, the error message above, there is no such include <editline/readline.h>
> so the line in post-patch here:
> @${REINPLACE_CMD} -e 's|readline/readline.h|editline/readline.h|; \
> .. is bogus.
> 
> There is a /usr/include/edit/readline/readline.h though on all branches.  I
> don't know where <editline/readline.h> came from.

This comes from the libedit port, that USES=libedit brings in.
Comment 16 Mathieu Arnold freebsd_committer 2015-09-26 21:47:22 UTC
As a side note, I did test this. on all 9, 10 and 11.