NetBSD Problem Report #11166

Received: (qmail 29388 invoked from network); 8 Oct 2000 16:44:15 -0000
Message-Id: <200010081644.TAA20360@pyry.gw.com>
Date: Sun, 8 Oct 2000 19:44:07 +0300 (EEST)
From: Kimmo Suominen <kim@tac.nyc.ny.us>
To: gnats-bugs@gnats.netbsd.org
Subject: Tcl does not build on 1.4.3/i386
X-Send-Pr-Version: 3.95

>Number:         11166
>Category:       pkg
>Synopsis:       Tcl does not build on 1.4.3/i386
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    skrll
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 08 16:45:01 +0000 2000
>Closed-Date:    Thu Oct 12 19:36:31 +0000 2000
>Last-Modified:  Thu Oct 12 19:36:31 +0000 2000
>Originator:     Kimmo Suominen
>Release:        1.4.3
>Organization:
<A HREF="http://www.tac.nyc.ny.us/~kim/">Kimmo Suominen</A>
>Environment:
System: NetBSD pyry.gw.com 1.4.3 NetBSD 1.4.3 (GW-GENERIC) #8: Sun Oct 8 05:29:46 EEST 2000 kim@pyry.gw.com:/net/pyry/src-2/NetBSD/cvsroot/src/sys/arch/i386/compile/GW-GENERIC i386

pkgsrc from 2000-10-08 09:12 EEST (Europe/Helsinki)

>Description:
Tcl does not build on 1.4.3/i386.

ranlib .libs/libtcl83.a
creating libtcl83.la
(cd .libs && rm -f libtcl83.la && ln -s ../libtcl83.la libtcl83.la)
: libtcl83.so.1.0
/usr/pkg/bin/libtool  --mode=link cc -Wl,-R/usr/pkg/lib  tclAppInit.o libtcl83.la -lm -lc  -Wl,-rpath,/usr/pkg/lib -o tclsh
cc -R/usr/pkg/lib tclAppInit.o -L.libs -ltcl83 -lm -lc -rpath /usr/pkg/lib -o .libs/tclsh -R/usr/pkg/lib
ld: /usr/pkg/lib: malformed input file (not rel or archive)
collect2: ld returned 1 exit status
*** Error code 1

>How-To-Repeat:
Try to build from yesterday's pkgsrc.
>Fix:
>Release-Note:
>Audit-Trail:

From: Frederick Bruckman <fb@enteract.com>
To: Kimmo Suominen <kim@tac.nyc.ny.us>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/11166: Tcl does not build on 1.4.3/i386
Date: Sun, 8 Oct 2000 13:23:44 -0500 (CDT)

 On Sun, 8 Oct 2000, Kimmo Suominen wrote:

 > creating libtcl83.la (cd .libs && rm -f libtcl83.la && ln -s
 >   ../libtcl83.la libtcl83.la) : libtcl83.so.1.0 /usr/pkg/bin/libtool
 >   --mode=link cc -Wl,-R/usr/pkg/lib tclAppInit.o libtcl83.la -lm -lc
 >   -Wl,-rpath,/usr/pkg/lib -o tclsh
 > cc -R/usr/pkg/lib tclAppInit.o -L.libs -ltcl83 -lm -lc -rpath /usr/pkg/lib -o .libs/tclsh -R/usr/pkg/lib
 > ld: /usr/pkg/lib: malformed input file (not rel or archive)
 > collect2: ld returned 1 exit status
 > *** Error code 1

 This looks like a libtool goof. It's stripping the '-Wl,' prefix
 inappropriately. It doesn't do that on 1.5_ALPHA/i386; maybe it's an
 a.out thing. I'm trying to reproduce this now on 1.4.3/m68k.

 Which libtool do you have? This seems to be the latest one...

 fredb@corwin-> pkg_info -b libtool
 Information for libtool-1.3.5nb5:

 Build version:
 devel/libtool/Makefile:# $NetBSD: Makefile,v 1.20 2000/09/14 10:20:46 skrll Exp $
 devel/libtool/files/md5:$NetBSD: md5,v 1.5 2000/05/31 17:25:55 rh Exp $
 devel/libtool/files/patch-sum:$NetBSD: patch-sum,v 1.11 2000/09/14 10:20:46 skrll Exp $
 devel/libtool/pkg/PLIST:@comment $NetBSD: PLIST,v 1.6 2000/02/12 16:07:10 fredb Exp $


 Frederick


From: Kimmo Suominen <kim@tac.nyc.ny.us>
To: Frederick Bruckman <fb@enteract.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/11166: Tcl does not build on 1.4.3/i386
Date: Sun, 08 Oct 2000 14:30:43 -0400

 I have the latest libtool from pkgsrc (this matches your output):

     pyry:/usr/pkgsrc> pkg_info -b libtool
     Information for libtool-1.3.5nb5:

     Build version:
     /net/pyry/src-2/NetBSD/cvsroot/pkgsrc/devel/libtool/Makefile:# $NetBSD: Makefile,v 1.20 2000/09/14 10:20:46 skrll Exp $
     /net/pyry/src-2/NetBSD/cvsroot/pkgsrc/devel/libtool/files/md5:$NetBSD: md5,v 1.5 2000/05/31 17:25:55 rh Exp $
     /net/pyry/src-2/NetBSD/cvsroot/pkgsrc/devel/libtool/files/patch-sum:$NetBSD: patch-sum,v 1.11 2000/09/14 10:20:46 skrll Exp $
     /net/pyry/src-2/NetBSD/cvsroot/pkgsrc/devel/libtool/pkg/PLIST:@comment $NetBSD: PLIST,v 1.6 2000/02/12 16:07:10 fredb Exp $

 Thanks for looking into this.  If you would like access to my 1.4.3/i386
 system let me know.

 + Kim

From: Frederick Bruckman <fb@enteract.com>
To: Kimmo Suominen <kim@tac.nyc.ny.us>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/11166: Tcl does not build on 1.4.3/i386
Date: Sun, 8 Oct 2000 13:53:41 -0500 (CDT)

 On Sun, 8 Oct 2000, Kimmo Suominen wrote:

 > Thanks for looking into this.  If you would like access to my 1.4.3/i386
 > system let me know.

 Thanks, but that's OK. I could always dial up my computer at work, but
 in this case the identical problem occurs on 1.4.3/m68k.

 I just noticed, the package passes "-Wl,-rpath,/usr/pkg/lib" to
 libtool, instead of "-Wl,-rpath -Wl,/usr/pkg/lib". It's curious that
 this would "do what I mean" on 1.5, but not 1.4.3.


 Frederick


From: Kimmo Suominen <kim@tac.nyc.ny.us>
To: Frederick Bruckman <fb@enteract.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/11166: Tcl does not build on 1.4.3/i386
Date: Sun, 08 Oct 2000 15:05:24 -0400

 I thought commas turn into spaces there, i.e. for me the single -Wl is
 more intuitive than the two separate ones (I'm not even sure if the
 ordering of multiple -Wl switches is guaranteed to be preserved).

 Actually, I just looked this up on the gcc manual page:

        -Wl,option
               Pass option as an option to the linker.  If  option
               contains  commas, it is split into multiple options
               at the commas.

 If libtool assumes otherwise then it is a bug in libtool.

 + Kim


 | From:    Frederick Bruckman <fb@enteract.com>
 | Date:    Sun, 08 Oct 2000 13:53:41 -0500
 |
 | On Sun, 8 Oct 2000, Kimmo Suominen wrote:
 |
 | > Thanks for looking into this.  If you would like access to my 1.4.3/i386
 | > system let me know.
 |
 | Thanks, but that's OK. I could always dial up my computer at work, but
 | in this case the identical problem occurs on 1.4.3/m68k.
 |
 | I just noticed, the package passes "-Wl,-rpath,/usr/pkg/lib" to
 | libtool, instead of "-Wl,-rpath -Wl,/usr/pkg/lib". It's curious that
 | this would "do what I mean" on 1.5, but not 1.4.3.
 |
 |
 | Frederick
 |

From: Frederick Bruckman <fb@enteract.com>
To: Kimmo Suominen <kim@tac.nyc.ny.us>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/11166: Tcl does not build on 1.4.3/i386
Date: Sun, 8 Oct 2000 16:02:26 -0500 (CDT)

 On Sun, 8 Oct 2000, Kimmo Suominen wrote:

 > I thought commas turn into spaces there, i.e. for me the single -Wl is
 > more intuitive than the two separate ones (I'm not even sure if the
 > ordering of multiple -Wl switches is guaranteed to be preserved).

 I see the problem now. Libtool is broken for making executables
 (rather than libraries) on a.out. It's blanking out the "-Wl" switches
 whenever mode=link, even though the linking, in the executables case,
 is done by "cc". The problem is obscured on ELF, since we always use
 the compiler and leave the "-Wl" switches in. I seem to recall that it
 always did that, and that most of our libtool hacked packages
 therefore never tried to use libtool to link the final executable.

 As a matter of fact, I seem to remember this problem coming up with
 tcl-8.05. It went unnoticed with tcl-8.3.2 because we had a respite,
 for a little while, while libtool/a.out was using the compiler for all
 linking. Now it's back.

 I can see where "$wl" is being emptied unconditionally, in line 2258
 of ltmain.in, but I can't figure out what the condition is supposed to
 be, so I better leave this one to our libtool expert(s).


 Frederick

State-Changed-From-To: open->analyzed 
State-Changed-By: fredb 
State-Changed-When: Sun Oct 8 16:29:04 CDT 2000 
State-Changed-Why:  
This is a long-standing libtool bug. 


Responsible-Changed-From-To: pkg-manager->skrll 
Responsible-Changed-By: fredb 
Responsible-Changed-When: Sun Oct 8 16:29:04 CDT 2000 
Responsible-Changed-Why:  
Nick Hudson is our resident libtool expert. Nick, 
would you please take a look at this? 

From: Nick Hudson <nick@nthcliff.demon.co.uk>
To: Kimmo Suominen <kim@tac.nyc.ny.us>, gnats-bugs@netbsd.org
Cc: fredb@netbsd.org, pkg-manager@netbsd.org
Subject: Re: pkg/11166
Date: Mon, 09 Oct 2000 22:11:57 +0100

 Kimmo Suominen wrote:
 > 
 > pyry:~> libtool --config | grep "^wl="
 > wl=""

 That's the problem.

 It stems from ltconfig.in setting "wl=" in the libtool build. I'll
 commit the fix as soon as I can.

 This wasn't picked up sooner as -Rpath gets passed down to ld properly
 whereas --rpath path doesn't.

 Nick
State-Changed-From-To: analyzed->closed 
State-Changed-By: kim 
State-Changed-When: Thu Oct 12 12:35:50 PDT 2000 
State-Changed-Why:  
Nick fixed this in libtool-1.3.5nb6 
>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.