Subject: pkg/18156: buildlink2 wrapper scripts cause major build problems
To: None <>
From: Matthias Scheler <>
List: netbsd-bugs
Date: 09/03/2002 17:18:11
>Number:         18156
>Category:       pkg
>Synopsis:       buildlink2 wrapper scripts cause major build problems
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 03 08:19:00 PDT 2002
>Release:        NetBSD 1.6G 2002-09-03 package sources
Matthias Scheler                        
System: NetBSD 1.6G NetBSD 1.6G (LYSSA) #0: Tue Sep 3 11:48:21 CEST 2002 i386
Architecture: i386
Machine: i386
The "configure" script of "mutt" invokes "gcc" like this:

configure:7953: gcc -o conftest -Wall -pedantic -I/usr/pkg/include -O2 -I/usr/pkg/include   -I/usr/pkg/include -I/usr/pkg/include -I$(top_srcdir)/intl -L/usr/pkg/lib -L/usr/pkg/lib  -s -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -L/usr/pkg/lib conftest.c -lsocket -lnsl  -L/usr/pkgsrc/mail/mutt/work/.buildlink/lib -Wl,-R/usr/pkg/lib -lintl 1>&5

This call is of course bogus because "-I$(top_srcdir)/intl" wasn't replaced
properly. But before "buildlink2" was added to "pkgsrc" this worked
nevertheless because "gcc" just ignored the bougs "-I" argument. With
"buildlink2" however the wrapper shell script for "gcc" fails:

top_srcdir: not found

As the result the "configure" script makes many incorrect assumptions e.g.
that "wctype.h" is missing.

cd /usr/pkgsrc/mail/mutt
make configure

Add proper quoting to the buildlink2 wrapper scripts.