Subject: pkg/24853: buildlink3 broken for non-X-pkgs when X11BASE == LOCALBASE
To: None <>
From: None <>
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
>Originator:     Robert Lillack
>Release:        1.6.2
NetBSD sickbox.faraday.home 1.6.2 NetBSD 1.6.2 (GENERIC) #0: Tue Feb 10 21:53:10 UTC 2004 i386

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/
(lines 620--623):

   case ${BUILDLINK_PREFIX.${_pkg_}} in                    \
   ${X11BASE})     buildlink_dir="${BUILDLINK_X11_DIR}" ;; \
   *)              buildlink_dir="${BUILDLINK_DIR}" ;;     \
   esac;                                                   \

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
   $ ls -1 work/.x11-buildlink/lib/ | wc -l

all build links are in .x11-buildlink instead of .buildlink where they
should be because this package is NOT an X package

See PR 23587 or discard work/.x11-buildlink completely and link
everything into work/.buildlink