NetBSD Problem Report #24760

Received: (qmail 22180 invoked by uid 605); 13 Mar 2004 00:44:31 -0000
Message-Id: <25168-1079138671@rainier.reedmedia.net>
Date: Fri, 12 Mar 2004 16:44:32 -0800
From: reed@reedmedia.net
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: reed@reedmedia.net
To: gnats-bugs@gnats.netbsd.org
Subject: buildlink3 losing library (libtool: link: cannot find the library `')
X-Send-Pr-Version: 3.95

>Number:         24760
>Category:       pkg
>Synopsis:       buildlink3 losing library (libtool: link: cannot find the library `')
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 13 00:45:00 +0000 2004
>Closed-Date:    Fri Dec 17 06:53:42 +0000 2004
>Last-Modified:  Fri Dec 17 06:53:42 +0000 2004
>Originator:     
>Release:        NetBSD
>Organization:
http://bsd.reedmedia.net/
>Environment:


>Description:
When building misc/yelp or devel/eel2, I get the error:

libtool: link: cannot find the library `'

My misc/yelp/work.puget/.work.log has:

==> Reordering libraries:  -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lpangoft2-1.0 -lgnomevfs-2 -lbonobo-2 -lbonobo-activation -lxslt -lglade-2.0 -lgconf-2 -lORBit-2 -lgthread-2.0 -lgtkhtml-2 -lgtk-x11-2.0 -lxml2 -lz -liconv -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lz -lbz2

<.> /usr/bin/libtool --mode=link gcc -pthread -DORBIT2=1 -I/usr/include/gnome-vfs-2.0 -I/scratch/pkgsrc/misc/yelp/work.puget/.buildlink/lib/gnome-vfs-2.0/include -I/usr/include/bonobo-activation-2.0 -I/usr/include/glib/glib-2.0 -I/scratch/pkgsrc/misc/yelp/work.puget/.buildlink/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gconf/2 -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libart-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/scratch/pkgsrc/misc/yelp/work.puget/.buildlink/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/scratch/pkgsrc/misc/yelp/work.puget/.x11-buildlink/include -I/usr/include/libxml2 -I/usr/include/libglade-2.0 -I/usr/include/gtkhtml-2.0 -g -I/scratch/pkgsrc/misc/yelp/work.puget/.buildlink/include -I/scratch/pkgsrc/misc/yelp/work.puget/.buildlink/gcc3/include -Wall -Wno-uninitialized -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -Wl,-R/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.3 -Wl,-R/usr/gcc3/lib -Wl,-R/usr/X11R6/lib -o yelp-man2html yelp-man2html.o -pthread -Wl,--export-dynamic -L/scratch/pkgsrc/misc/yelp/work.puget/.buildlink/gcc3/lib/gcc-lib/i386-pc-linux/3.3.3 -L/scratch/pkgsrc/misc/yelp/work.puget/.buildlink/gcc3/lib -L/scratch/pkgsrc/misc/yelp/work.puget/.buildlink/lib -L/scratch/pkgsrc/misc/yelp/work.puget/.x11-buildlink/lib -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lpangoft2-1.0 -lgnomevfs-2 -lbonobo-2 -lbonobo-activation -lxslt -lglade-2.0 -lgconf-2 -lORBit-2 -lgthread-2.0 -lgtkhtml-2 -lgtk-x11-2.0 -lxml2 -lz -liconv -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lz -lbz2


I am guessing that the buildlink3 system is removing some parts. So I
diffed some output in the .work.log with the output I saw during the
build, but I didn't see any empty "-L".

Maybe the buildlink3 system can have a check for an empty "-L" or whatever
caused that problem.

This is under Linux with LOCALBASE as /usr.

>How-To-Repeat:
>Fix:
Sorry. Don't know what library was removed.
>Release-Note:
>Audit-Trail:

From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pkg/24760
Date: Fri, 12 Mar 2004 18:04:31 -0800 (PST)

 More information. I made libtool be more verbose with:
           $echo "$modename: cannot find the library \`$lib'
 (lib${name}.la: $deplib)" 1>&2

 And the error in misc/yelp is now:

 libtool: link: cannot find the library `' (libglade-2.0.la:
 /python2p3/config)

 And devel/eel2 dies with same:

 libtool: link: cannot find the library `' (libglade-2.0.la:
 /python2p3/config)

 So I looked at devel/eel2/work.puget/.buildlink/lib/libglade-2.0.la and it
 had:

  # Libraries that this one depends upon.
  dependency_libs='/python2p3/config -lxml2 -lz -lz -lgtk-x11-2.0
  -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lgthread-2.0 -lpthread -lm
  -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0
  -lglib-2.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0'

 The original /usr/lib/libglade-2.0.la has:

  # Libraries that this one depends upon.
  dependency_libs='-L/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.3
  -L/usr/gcc3/lib -L/usr/lib -L/usr/lib/python2p3/config -L/usr/X11R6/lib
  -lxml2 -lz -lz -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0
  -lgthread-2.0 -lpthread -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
  -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lgobject-2.0 -lgmodule-2.0 -ldl
  -lglib-2.0'

 (Everything in /usr is from pkgsrc.)

 This is from libglade2-2.0.1nb14.

 On another box, /usr/pkg/lib/libglade-2.0.la does not have any reference
 to "python". It is same libglade2-2.0.1nb14. It has:

  # Libraries that this one depends upon.
  dependency_libs=' -L/usr/pkg/lib -L/usr/X11R6/lib /usr/pkg/lib/libxml2.la
  -lz /usr/pkg/lib/libgtk-x11-2.0.la /usr/pkg/lib/libgdk-x11-2.0.la
  /usr/pkg/lib/libatk-1.0.la /usr/pkg/lib/libgdk_pixbuf-2.0.la
  /usr/pkg/lib/libgthread-2.0.la /usr/pkg/lib/libpthread.la
  /usr/pkg/lib/libpangoxft-1.0.la /usr/pkg/lib/libpangox-1.0.la
  /usr/pkg/lib/libpango-1.0.la /usr/pkg/lib/libgobject-2.0.la
  /usr/pkg/lib/libgmodule-2.0.la /usr/pkg/lib/libglib-2.0.la -liconv -lintl
  -liconv -lm -lintl'

 I don't know where the "-L/usr/lib/python2p3/config" came from and I don't
 know why it became "/python2p3/config".

 I removed that from my /usr/lib/libglade-2.0.la and mis/yelp
 built fine and devel/eel2 is building.

    Jeremy C. Reed
    http://bsd.reedmedia.net/









From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pkg/24760
Date: Mon, 15 Mar 2004 11:46:43 -0800 (PST)

 More information.

 I updated pkgsrc/mk this morning and rebuilt libglade2 and it was good:

 /usr/lib/libglade-2.0.la:dependency_libs='-L/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.3
 -L/usr/gcc3/lib -L/usr/lib -L/usr/lib/python2p3/config -L/usr/X11R6/lib
 -lxml2 -lz -liconv -lz -liconv -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
 -lgdk_pixbuf-2.0 -lgthread-2.0 -lpthread -lm -lpangoxft-1.0 -lpangox-1.0
 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lgobject-2.0
 -lgmodule-2.0 -ldl -lglib-2.0'

 But then rebuilt libgnomecanvas and it was not good (notice
 "/python2p3/config"):

 /usr/lib/libglade/2.0/libcanvas.la:dependency_libs='-L/usr/lib
 -L/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.3 -L/usr/gcc3/lib
 -L/usr/X11R6/lib -lgnomecanvas-2 -lart_lgpl_2 -lpangoft2-1.0 -lglade-2.0
 /python2p3/config -lxml2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgtk-x11-2.0
 -lxml2 -lz -liconv -lz -liconv -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0
 -lgthread-2.0 -lpthread -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lgobject-2.0 -lgmodule-2.0 -ldl
 -lglib-2.0'


    Jeremy C. Reed
    http://www.reedmedia.net/


From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pkg/24760
Date: Mon, 15 Mar 2004 11:54:52 -0800 (PST)

 More information. The graphics/libgnomecanvas build has:

 work.puget/.buildlink/lib/libglade-2.0.la:dependency_libs='/python2p3/config
 -lxml2 -lz -liconv -lz -liconv -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
 -lgdk_pixbuf-2.0 -lgthread-2.0 -lpthread -lm -lpangoxft-1.0 -lpangox-1.0
 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lgobject-2.0
 -lgmodule-2.0 -ldl -lglib-2.0'

 So the .la file made for the graphics/libgnomecanvas is wrong. It should
 not got changed "-L/usr/lib/python2p3/config" to "/python2p3/config".

 I think that this is a problem with mk/buildlink3/libtool-fix-la.

    Jeremy C. Reed
    http://www.reedmedia.net/


From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pkg/24760
Date: Mon, 15 Mar 2004 13:46:11 -0800 (PST)

 It wasn't buildlink3/libtool-fix-la, but appears to be
 _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT which has:

   -e "/^dependency_libs=/s,-L/usr/lib[^/${_BLNK_SEP}]*[   ]*,,g"

 This removes "-L/usr/lib followed by anything that is optionally not a
 slash, space, back tick, double-quote, single-quote, colon, semicolon or
 comma optionally followed by spaces or tabs.

 So this means that /usr/lib/whatever will become /whatever because it
 matches up to the /.

 I don't understand the purpose of replacing that while keeping the
 starting / .

 The next two sed expressions don't do that:
         -e "/^dependency_libs=/s,-L${X11BASE}/[^${_BLNK_SEP}]*[         ]*,,g" \
         -e "/^dependency_libs=/s,-L${LOCALBASE}/[^${_BLNK_SEP}]*[       ]*,,g"

 I got rid of the / from the set but that makes it lose the entire part
 which appears to be okay.

  -e "/^dependency_libs=/s,-L/usr/lib[^${_BLNK_SEP}]*[   ]*,,g"

    Jeremy C. Reed
    http://www.reedmedia.net/





From: Jan Schaumann <jschauma@netmeister.org>
To: jlam@netbsd.org
Cc: gnats-bugs@netbsd.org, reed@netbsd.org
Subject: pkg/24760
Date: Fri, 11 Jun 2004 14:18:04 -0400

 --PPYy/fEw/8QCHSq3
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable

 Johnny,

 Could you take a look at PR pkg/24760?  I can confirm what Jeremy
 reports, and the attached diff does indeed fix the problem, but since
 I'm not sure if this has any side-effects, I'd like you to look at it.

 Thanks,
 -Jan

 --=20
 Information wants to be free.

 --PPYy/fEw/8QCHSq3
 Content-Type: application/pgp-signature
 Content-Disposition: inline

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.3 (NetBSD)

 iD8DBQFAyfdcfFtkr68iakwRApTdAKCR6AUXL7tSK9bqGeR4oOvU0GAo6ACgs+DZ
 9XYdFg287Us8j3MG0Yk8Gm4=
 =jf+Q
 -----END PGP SIGNATURE-----

 --PPYy/fEw/8QCHSq3--

From: Jan Schaumann <jschauma@netmeister.org>
To: jlam@netbsd.org, gnats-bugs@netbsd.org, reed@netbsd.org
Cc:  
Subject: Re: pkg/24760
Date: Fri, 11 Jun 2004 14:19:01 -0400

 --Sw7tCqrGA+HQ0/zt
 Content-Type: multipart/mixed; boundary="SnV5plBeK2Ge1I9g"
 Content-Disposition: inline


 --SnV5plBeK2Ge1I9g
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable

 Jan Schaumann <jschauma@netmeister.org> wrote:
 =20
 > Could you take a look at PR pkg/24760?  I can confirm what Jeremy
 > reports, and the attached diff does indeed fix the problem, but since
 > I'm not sure if this has any side-effects, I'd like you to look at it.

 Gack.  *Attached.*  This time.  I hope.

 --=20
 I'm not even supposed to be here today!

 --SnV5plBeK2Ge1I9g
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=diff

 Index: bsd.buildlink3.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
 retrieving revision 1.144
 diff -b -u -r1.144 bsd.buildlink3.mk
 --- bsd.buildlink3.mk	4 Jun 2004 15:00:15 -0000	1.144
 +++ bsd.buildlink3.mk	11 Jun 2004 18:12:03 -0000
 @@ -664,7 +664,7 @@
  	-e "/^dependency_libs=/s,${DEPOTBASE}/[^${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*/lib[^/${_BLNK_SEP}]*\.la\),${BUILDLINK_DIR}\\1,g" \
  	-e "/^dependency_libs=/s,${X11BASE}\(/[^${_BLNK_SEP}]*/lib[^/${_BLNK_SEP}]*\.la\),${BUILDLINK_X11_DIR}\\1,g" \
  	-e "/^dependency_libs=/s,${LOCALBASE}\(/[^${_BLNK_SEP}]*/lib[^/${_BLNK_SEP}]*\.la\),${BUILDLINK_DIR}\\1,g" \
 -	-e "/^dependency_libs=/s,-L/usr/lib[^/${_BLNK_SEP}]*[ 	]*,,g"	\
 +	-e "/^dependency_libs=/s,-L/usr/lib[^${_BLNK_SEP}]*[ 	]*,,g"	\
  	-e "/^dependency_libs=/s,-L${X11BASE}/[^${_BLNK_SEP}]*[ 	]*,,g" \
  	-e "/^dependency_libs=/s,-L${LOCALBASE}/[^${_BLNK_SEP}]*[ 	]*,,g"
  .  if (${PKG_INSTALLATION_TYPE} == "overwrite") ||			\

 --SnV5plBeK2Ge1I9g--

 --Sw7tCqrGA+HQ0/zt
 Content-Type: application/pgp-signature
 Content-Disposition: inline

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.3 (NetBSD)

 iD8DBQFAyfeVfFtkr68iakwRAgYYAKCN5rS4VNibft8kLHQOFaGL1uIWqgCgt0qD
 7sq+U+fu3KvR+oYV1kt5j10=
 =S+kT
 -----END PGP SIGNATURE-----

 --Sw7tCqrGA+HQ0/zt--

From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/24760 CVS commit: pkgsrc/regress/buildlink-transform
Date: Fri, 27 Aug 2004 21:45:54 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jlam
 Date:		Fri Aug 27 21:45:54 UTC 2004

 Modified Files:
 	pkgsrc/regress/buildlink-transform: Makefile

 Log Message:
 Don't run the *-slashdot tests using the current buildlink3 framework,
 since they're known to be broken (see PR pkg/24760 and PR pkg/25500).


 To generate a diff of this commit:
 cvs rdiff -r1.2 -r1.3 pkgsrc/regress/buildlink-transform/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/24760 CVS commit: pkgsrc/mk
Date: Tue, 21 Sep 2004 15:01:41 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jlam
 Date:		Tue Sep 21 15:01:41 UTC 2004

 Modified Files:
 	pkgsrc/mk: bsd.pkg.mk bsd.prefs.mk compiler.mk defs.Interix.mk
 	    defs.UnixWare.mk
 	pkgsrc/mk/buildlink3: BUILDLINK3_DG bsd.buildlink3.mk bsd.builtin.mk
 	    libtool-fix-la
 	pkgsrc/mk/compiler: mipspro.mk sunpro.mk
 Added Files:
 	pkgsrc/mk/buildlink3: buildcmd-libtool cleanup-libtool cmd-sink-libtool
 	    scan-libtool transform-libtool
 	pkgsrc/mk/wrapper: NOTES arg-source bsd.wrapper.mk buildcmd
 	    cache-footer cache-header cmd-sink cmd-sink-aix-xlc
 	    cmd-sink-interix-gcc cmd-sink-interix-ld cmd-sink-ld
 	    cmd-sink-unixware-gcc gen-reorder.sh gen-transform.sh logic
 	    transform-mipspro-cc transform-mipspro-ucode-cc transform-sunpro-cc
 	    wrapper.sh
 Removed Files:
 	pkgsrc/mk/buildlink3: buffer buildcmd gen-transform.sh ld-post-cache
 	    ld-post-logic libtool-post-cache libtool-post-logic libtool.sh
 	    logic marshall mipspro-cc-post-cache mipspro-cc-post-logic
 	    mipspro-ucode-cc-post-cache mipspro-ucode-cc-post-logic post-cache
 	    pre-cache quotearg sunpro-cc-post-cache sunpro-cc-post-logic
 	    wrapper.sh

 Log Message:
 Initial commit of a new wrapper script framework that encapsulates
 the non-buildlink-related code and moves it out of mk/buildlink3 into
 mk/wrapper.  The buildlink3 code is modified to simply hook its
 transformations into the wrapper script framework.

 The wrapper script framework has some new features:

 * Support automatically passing "ABI" flags to the compiler and linker
   depending on the value of ${ABI}.  Currently supports the SunPro
   compiler with ${ABI} == 64 and the MIPSPro compiler with ${ABI} as
   any of 32, n32, o32, and 64.

 * making UnixWare GCC accept -rpath options and silently converting
   them into an appropriate LD_RUN_PATH

 * Add cmd-sink-interix-gcc and cmd-sink-interix-ld that errors out
   when it sees -fpic/-fPIC and -shared/-Bshareable, respectively
   (requested by <tv>).

 * Much improved debugging output.  It's possible to output the wrapper
   work log in-line with normal output by setting WRAPPER_LOG to
   "stderr".

 Important differences in behaviour from the old buildlink3 code include:

 * Only move the -l options to the end of the command line, leaving the
   -L options in-place.

 * Extend the autodetection of the libtool mode to detect "compile" and
   "uninstall".

 * Fix problem noted in both PR pkg/24760 and PR pkg/25500, where
   -L/usr/lib/* was being mangled improperly.

 * Remove the top-level "buildlink" target; instead, make buildlinking
   occur as part of the "wrapper" target.

 * mangle and sub-mangle are only meant to transform directories in
   -I, -L, and rpath options, so remove the lines in
   buildlink3/gen-transform.sh that transformed bare directories.

 * Add the ability for the libtool wrapper to be called just to unwrap
   an existing libtool archive by running:

 	libtool --mode=unwrap -o libfoo.la

   The old --fix-la syntax no longer works.

 20040818
 ========
 * Initial release of a new wrapper script framework that encapsulates
   the non-buildlink-related code and moves it out of mk/buildlink3.
   These features include:

    * making MIPSpro accept GCC options
    * making MIPSpro "ucode" accept GCC options
    * making SunPro accept GCC options
    * making "ld" accept -Wl,* options and silently removing the "-Wl,"
    * (NEW) making UnixWare GCC accept -rpath options and silently
      converting them into an appropriate LD_RUN_PATH

   One major benefit of this is that the buildlink3 code is now much
   tighter and easier to understand since it concerns itself solely
   with buildlink-related details.  I haven't yet optimized the wrapper
   cache, so the new wrapper scripts may take slightly longer to execute
   than the old buildlink3 wrapper scripts, but I'll be improving this
   over time.

 20040821
 ========
 * Move the inclusion of $cmd_sink outside of the main loop in wrapper.sh
   so that the $cmd_sink script can be used to globally scan and process
   the arguments.  Move the LD_RUN_PATH code to a cmd-sink-unixware-gcc
   script.  Garbage-collect the now unused export_vars-related code.

 * Add cmd-sink-aix-xlc for AIX xlc that munges -Wl,-R* into an
   appropriate -blibpath option.

 * Add cmd-sink-interix-gcc and cmd-sink-interix-ld that errors out
   when it sees -fpic/-fPIC and -shared/-Bshareable, respectively
   (requested by <tv>).

 * Move the code that converts full paths to shared libraries into the
   "-Ldir -llib" equivalents from the buildlink3 code into wrapper/logic.
   Remove the same from bsd.buildlink3.mk and gen-transform.sh.

 * Move the code that checks for absolute rpaths from the buildlink3
   code into wrapper/arg-source.  Remove the same from bsd.buildlink3.mk
   and gen-transform.sh.

 * Only move the -l options to the end of the command line, leaving the
   -L options in-place.

 * Add more debugging code.

 20040824
 ========
 * Fix quoting problems after arguments are transformed.  Remove the
   hack that was inserted that magically made almost everything work
   because we do it the right way now.

 * Move the inclusion of $logic outside of the main loop in wrapper.sh
   so that the $logic script doesn't have to worry about underflowing
   the argument buffer.

 * Encapsulate the loop in wrapper.sh that fills the argument buffer
   entirely within the arg-source script.

 * Move from the logic script into the arg-source script the
   transformations that merge or split arguments.

 * Fix bug where skipargs was effectively being ignored if it was more
   than 1.

 * Handle the whitespace in transformations in the logic script that
   turn one library option into multiple library options, e.g.
   "-lreadline" -> "-ledit -ltermcap".

 * Allow you to specify an environment variable WRAPPER_SKIP_TRANSFORM
   for whether you wish to skip the transformation step in the logic
   script.  This is intended for testing purposes.

 * Added check_prog() and init_lib() functions to the shell code library
   to make it more reusable outside of the wrapper framework.

 * Allow the msg_log() function to output to "stdout" or "stderr".  If
   you want to have all of the logging appear on the screen, then you
   can now set WRAPPER_LOG=stderr.

 * Make some of the script components not overridable on a per-wrapper
   basis.

 * Add a gen-transform.sh script that generates transformation sedfiles.
   The "transform" script is used to transform arguments, while the
   "untransform" script is used to unwrap files.  Move the no-rpath
   logic from buildlink3/gen-transform.sh into wrapper/gen-transform.sh
   since it's not buildlink3-specific.

 * Check for a non-empty blibpath before adding the option in
   cmd-sink-aix-xlc.

 * Extend the autodetection of the libtool mode to detect "compile" and
   "uninstall".

 * Add a cmd-sink-libtool script that doesn't pass linker options to
   libtool unless we're in "link" mode.

 * Set _USE_RPATH to "yes" for UnixWare so that the wrappers will see the
   rpath options and convert them to a LD_RUN_PATH definition.

 * Add more debugging code.

 20040826
 ========
 * Rewrite buildlink3/gen-transform.sh to produce more precise sed commands.
   Drop some unused commands from the mini-language, and add a few more
   that are more restrictive in their scope.

 * Fix problem where repeated options weren't properly handled by some
   of sed commands.  It's not enough that they're "global replace",
   since some patterns match separator characters before and after each
   option.  We must repeat those patterns twice to catch all instances
   correctly.

 * Fix problem noted in both PR pkg/24760 and PR pkg/25500, where
   -L/usr/lib/* was being mangled improperly.

 * Remove the top-level "buildlink" target; instead, make buildlinking
   occur as part of the "wrapper" target.

 * Add more debugging code.

 20040828
 ========
 * Added a head_queue function to shell-lib that returns the head of the
   named queue without popping it off the front of the queue.

 * Strip consecutive, repeated library options from the command line when
   we read it in the logic script.

 * Be more careful about not underflowing the argument buffer.

 20040906
 ========
 * shell-lib was moved into pkgsrc/mk/scripts; correct references to that
   file in the wrapper code.

 * Use opt-sub instead of sub-mangle when protecting -I/usr/include/*
   and -L/usr/lib/* from buildlink transformations.  This avoids adding
   lines that look like "-I-I..." in the transformation sedfiles.

 * mangle and sub-mangle are only meant to transform directories in
   -I, -L, and rpath options, so remove the lines in
   buildlink3/gen-transform.sh that transformed bare directories.

 * Fix bug in strip-slashdot where the "." wasn't backquoted and thus
   matched all characters instead of only the "." character.

 * Change the libtool wrapper to use a modified buildcmd script that
   doesn't rearrange any of the arguments.  This should fix spurious
   problems where libtool doesn't understand how to parse the command
   line when the -l options are moved to the end of the argument list.

 * Fix bug in the logic script where the $cachearg and $cachedarg
   weren't being properly set at all times, which caused the cache to
   contain the wrong transformed argument.

 20040907
 ========
 * Support automatically passing "ABI" flags to the compiler and linker
   depending on the value of ${ABI}.  Currently supports the SunPro
   compiler with ${ABI} == 64 and the MIPSPro compiler with ${ABI} as
   any of 32, n32, o32, and 64.

 * Move back the code that splits absolute paths to shared libraries
   from arg-source back into logic.  This allows us to correctly skip
   splitting those paths based on the previous option.  Also add a
   sanity check that the library name in the split argument doesn't
   contain a "/" since shell globs are not as precise as REs.

 * Don't transform the path given after --dynamic-linker (used by GNU
   ld for ELF linkage).

 * Add the ability for the libtool wrapper to be called just to unwrap
   an existing libtool archive by running:

 	libtool --mode=unwrap -o libfoo.la

 20040914
 ========
 * Add a loop in libtool-fix-la to ensure that all of the options listed
   in the dependency_libs lines of *.lai files are processed.  This fixes
   a buildlink3 leakage bug.

 * Merge the gen-transform.sh scripts between buildlink3 and wrapper and
   place them all in wrapper.  This makes sense since the commands simply
   allow for many types of transformations, which buildlink3 takes
   advantage of, but there is nothing inherently buildlink-ish about
   those commands.

 * Don't directly manipulate SUBST_SED.unwrap.  Instead, create the
   value of SUBST_SED.unwrap by combining several other variables
   (currently just _UNWRAP_SED) to ensure that the correct ordering is
   preserved.

 * Correct some confusing debugging messages.


 To generate a diff of this commit:
 cvs rdiff -r1.1498 -r1.1499 pkgsrc/mk/bsd.pkg.mk
 cvs rdiff -r1.165 -r1.166 pkgsrc/mk/bsd.prefs.mk
 cvs rdiff -r1.34 -r1.35 pkgsrc/mk/compiler.mk
 cvs rdiff -r1.27 -r1.28 pkgsrc/mk/defs.Interix.mk
 cvs rdiff -r1.7 -r1.8 pkgsrc/mk/defs.UnixWare.mk
 cvs rdiff -r1.5 -r1.6 pkgsrc/mk/buildlink3/BUILDLINK3_DG
 cvs rdiff -r1.153 -r1.154 pkgsrc/mk/buildlink3/bsd.buildlink3.mk
 cvs rdiff -r1.1 -r1.2 pkgsrc/mk/buildlink3/bsd.builtin.mk
 cvs rdiff -r1.7 -r0 pkgsrc/mk/buildlink3/buffer
 cvs rdiff -r1.4 -r0 pkgsrc/mk/buildlink3/buildcmd
 cvs rdiff -r0 -r1.1 pkgsrc/mk/buildlink3/buildcmd-libtool \
     pkgsrc/mk/buildlink3/cleanup-libtool \
     pkgsrc/mk/buildlink3/cmd-sink-libtool pkgsrc/mk/buildlink3/scan-libtool \
     pkgsrc/mk/buildlink3/transform-libtool
 cvs rdiff -r1.31 -r0 pkgsrc/mk/buildlink3/gen-transform.sh
 cvs rdiff -r1.2 -r0 pkgsrc/mk/buildlink3/ld-post-cache \
     pkgsrc/mk/buildlink3/ld-post-logic \
     pkgsrc/mk/buildlink3/mipspro-ucode-cc-post-logic \
     pkgsrc/mk/buildlink3/post-cache pkgsrc/mk/buildlink3/pre-cache \
     pkgsrc/mk/buildlink3/quotearg
 cvs rdiff -r1.4 -r1.5 pkgsrc/mk/buildlink3/libtool-fix-la
 cvs rdiff -r1.5 -r0 pkgsrc/mk/buildlink3/libtool-post-cache
 cvs rdiff -r1.8 -r0 pkgsrc/mk/buildlink3/libtool-post-logic
 cvs rdiff -r1.18 -r0 pkgsrc/mk/buildlink3/libtool.sh
 cvs rdiff -r1.6 -r0 pkgsrc/mk/buildlink3/logic
 cvs rdiff -r1.12 -r0 pkgsrc/mk/buildlink3/marshall \
     pkgsrc/mk/buildlink3/sunpro-cc-post-logic
 cvs rdiff -r1.1 -r0 pkgsrc/mk/buildlink3/mipspro-cc-post-cache \
     pkgsrc/mk/buildlink3/mipspro-cc-post-logic \
     pkgsrc/mk/buildlink3/mipspro-ucode-cc-post-cache
 cvs rdiff -r1.9 -r0 pkgsrc/mk/buildlink3/sunpro-cc-post-cache
 cvs rdiff -r1.11 -r0 pkgsrc/mk/buildlink3/wrapper.sh
 cvs rdiff -r1.25 -r1.26 pkgsrc/mk/compiler/mipspro.mk
 cvs rdiff -r1.21 -r1.22 pkgsrc/mk/compiler/sunpro.mk
 cvs rdiff -r0 -r1.1 pkgsrc/mk/wrapper/NOTES pkgsrc/mk/wrapper/arg-source \
     pkgsrc/mk/wrapper/bsd.wrapper.mk pkgsrc/mk/wrapper/buildcmd \
     pkgsrc/mk/wrapper/cache-footer pkgsrc/mk/wrapper/cache-header \
     pkgsrc/mk/wrapper/cmd-sink pkgsrc/mk/wrapper/cmd-sink-aix-xlc \
     pkgsrc/mk/wrapper/cmd-sink-interix-gcc \
     pkgsrc/mk/wrapper/cmd-sink-interix-ld pkgsrc/mk/wrapper/cmd-sink-ld \
     pkgsrc/mk/wrapper/cmd-sink-unixware-gcc pkgsrc/mk/wrapper/gen-reorder.sh \
     pkgsrc/mk/wrapper/gen-transform.sh pkgsrc/mk/wrapper/logic \
     pkgsrc/mk/wrapper/transform-mipspro-cc \
     pkgsrc/mk/wrapper/transform-mipspro-ucode-cc \
     pkgsrc/mk/wrapper/transform-sunpro-cc pkgsrc/mk/wrapper/wrapper.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: jlam@netbsd.org
State-Changed-When: Fri, 10 Dec 2004 07:39:39 +0000
State-Changed-Why:
This PR should be fixed now that pkgsrc has been converted to use the
new wrapper script framework.  Please let me know if the problem still
exists with a current pkgsrc.

	Thanks,

	-- Johnny Lam <jlam@NetBSD.org>


State-Changed-From-To: feedback->closed
State-Changed-By: reed@netbsd.org
State-Changed-When: Fri, 17 Dec 2004 06:53:42 +0000
State-Changed-Why:
The problem is fixed. Thank you, jlam.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.