Subject: pkg/24853: buildlink3 broken for non-X-pkgs when X11BASE == LOCALBASE
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <rob@lillack.de>
List: netbsd-bugs
Date: 03/20/2004 00:59:46
>Number: 24853
>Category: pkg
>Synopsis: buildlink3 broken for non-X-pkgs when X11BASE == LOCALBASE
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 20 01:00:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Robert Lillack
>Release: 1.6.2
>Organization:
http://burningsoda.com
>Environment:
NetBSD sickbox.faraday.home 1.6.2 NetBSD 1.6.2 (GENERIC) #0: Tue Feb 10 21:53:10 UTC 2004 autobuild@tgm.netbsd.org:/autobuild/netbsd-1-6-PATCH002/i386/OBJ/autobuild/netbsd-1-6-PATCH002/src/sys/arch/i386/compile/GENERIC i386
>Description:
The bug described by Jemery C. Reed in #23587 also/still applies
to the buildlink3 mechanism. If one has set X11BASE to be the same
directory as LOCALBASE and wants to build a non-X package (USE_X11 is undefined) the buildlink3 system creates a work/.x11-buildlink directory
instead of only a work/.buildlink dir and makes the build fail.
This is---as pointed out by Jeremy on tech-pkg@---caused by these
bogus lines in pkgsrc/mk/buildlink3/bsd.buildlink3.mk
(lines 620--623):
case ${BUILDLINK_PREFIX.${_pkg_}} in \
${X11BASE}) buildlink_dir="${BUILDLINK_X11_DIR}" ;; \
*) buildlink_dir="${BUILDLINK_DIR}" ;; \
esac; \
>How-To-Repeat:
Set
X11BASE=${LOCALBASE}
in /etc/mk.conf
Try to build a package which uses buildlink3 but not X11:
$ cd /usr/pkgsrc/devel/glib2
$ make
[...]
checking for iconv_open... no
checking for libiconv_open in -liconv... no
checking for iconv_open in -liconv... no
configure: error: *** No iconv() implementation found in C library or libiconv
*** Error code 1
the configure script did not find the libraries, let's find out why:
$ ls -1 work/.buildlink/lib/ | wc -l
0
$ ls -1 work/.x11-buildlink/lib/ | wc -l
20
all build links are in .x11-buildlink instead of .buildlink where they
should be because this package is NOT an X package
>Fix:
See PR 23587 or discard work/.x11-buildlink completely and link
everything into work/.buildlink
>Release-Note:
>Audit-Trail:
>Unformatted: