NetBSD Problem Report #11189
Received: (qmail 8681 invoked from network); 10 Oct 2000 21:09:17 -0000
Message-Id: <200010102109.RAA22081@hilda.bohemians.lexington.ky.us>
Date: Tue, 10 Oct 2000 17:09:13 -0400 (EDT)
From: David Rankin <drankin@bohemians.lexington.ky.us>
Reply-To: drankin@bohemians.lexington.ky.us
To: gnats-bugs@gnats.netbsd.org
Subject: pkg tcl-8.3.2 won't compile on i386 1.4.1
X-Send-Pr-Version: 3.95
>Number: 11189
>Category: pkg
>Synopsis: pkg tcl-8.3.2 won't compile on i386 1.4.1
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: skrll
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 10 21:10:00 +0000 2000
>Closed-Date: Sat Dec 09 17:40:07 +0000 2000
>Last-Modified: Sat Dec 09 17:40:07 +0000 2000
>Originator: David Rankin
>Release: 1.4.1, current pkgsrc (as of today)
>Organization:
Bohemians Unincorporated
>Environment:
System: NetBSD hilda 1.4.1 NetBSD 1.4.1 (HILDA) #0: Thu Feb 10 12:16:21 EST 2000 root@hilda:/usr/src/sys/arch/i386/compile/HILDA i386
>Description:
When attempting to compile tcl, tclsh fails to build as follows:
/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
>How-To-Repeat:
Run above example on 1.4.1 system.
>Fix:
On lines 433 and 437 of the file unix/Makefile.in, remove the
item @TCL_LD_SEARCH_FLAGS@ . This will prevent the bad -rpath insertion.
>Release-Note:
>Audit-Trail:
From: Todd Vierling <tv@wasabisystems.com>
To: David Rankin <drankin@bohemians.lexington.ky.us>
Cc: gnats-bugs@gnats.netbsd.org, tech-pkg@netbsd.org
Subject: Re: pkg/11189: pkg tcl-8.3.2 won't compile on i386 1.4.1
Date: Tue, 10 Oct 2000 17:38:55 -0400 (EDT)
On Tue, 10 Oct 2000, David Rankin wrote:
: /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
I'm not sure where the "-Wl,-rpath" is coming from, as patch-aa shows only
the "libtool --mode=link -Wl,-R", which is actually not correct either.
The suggested fix in the PR may be correct; tcl is trying to do its own
handling, and botching it:
: On lines 433 and 437 of the file unix/Makefile.in, remove the
: item @TCL_LD_SEARCH_FLAGS@ . This will prevent the bad -rpath insertion.
If anything, this variable should directly supply "-rpath" or "-R" to
libtool, because libtool is smart enough to figure out what to do with it.
The extra "-Wl,-R" in patch-aa is probably not needed if this is fixed.
* Note to pkg maintainers: You do not need to do --mode= with libtool in
almost every case. It's actually smart enough to figure out the mode based
on "cc" vs. "cc -c" vs. "install" automatically.
--
-- Todd Vierling <tv@wasabisystems.com> * http://www.wasabisystems.com/
-- Speed, stability, security, and support. Wasabi NetBSD: Run with it.
Responsible-Changed-From-To: pkg-manager->skrll
Responsible-Changed-By: skrll
Responsible-Changed-When: Tue Oct 10 15:06:40 PDT 2000
Responsible-Changed-Why:
I'm dealing with this one.
From: Nick Hudson <nick@nthcliff.demon.co.uk>
To: Todd Vierling <tv@wasabisystems.com>
Cc: David Rankin <drankin@bohemians.lexington.ky.us>,
gnats-bugs@gnats.netbsd.org, tech-pkg@netbsd.org
Subject: Re: pkg/11189: pkg tcl-8.3.2 won't compile on i386 1.4.1
Date: Tue, 10 Oct 2000 23:18:48 +0100
Todd Vierling wrote:
>
> On Tue, 10 Oct 2000, David Rankin wrote:
>
> : /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
This is a duplicate of PR/11166 which I have a fix for.
>
> I'm not sure where the "-Wl,-rpath" is coming from, as patch-aa shows only
> the "libtool --mode=link -Wl,-R", which is actually not correct either.
Why is -Wl,-R incorrect? Or do you mean that -R would suffice?
Nick
From: Todd Vierling <tv@wasabisystems.com>
To: Nick Hudson <nick@nthcliff.demon.co.uk>
Cc: David Rankin <drankin@bohemians.lexington.ky.us>,
gnats-bugs@gnats.netbsd.org, tech-pkg@netbsd.org
Subject: Re: pkg/11189: pkg tcl-8.3.2 won't compile on i386 1.4.1
Date: Tue, 10 Oct 2000 18:47:10 -0400 (EDT)
On Tue, 10 Oct 2000, Nick Hudson wrote:
: > I'm not sure where the "-Wl,-rpath" is coming from, as patch-aa shows only
: > the "libtool --mode=link -Wl,-R", which is actually not correct either.
:
: Why is -Wl,-R incorrect? Or do you mean that -R would suffice?
The latter. See prior message; libtool has its own knowledge of mapping -R
to the right thing automatically.
--
-- Todd Vierling <tv@wasabisystems.com> * http://www.wasabisystems.com/
-- Speed, stability, security, and support. Wasabi NetBSD: Run with it.
From: David Rankin <drankin@bohemians.lexington.ky.us>
To: Todd Vierling <tv@wasabisystems.com>
Cc: David Rankin <drankin@bohemians.lexington.ky.us>,
gnats-bugs@gnats.netbsd.org, tech-pkg@netbsd.org
Subject: Re: pkg/11189: pkg tcl-8.3.2 won't compile on i386 1.4.1
Date: Tue, 10 Oct 2000 21:34:42 -0400
On Tue, Oct 10, 2000 at 05:38:55PM -0400, Todd Vierling wrote:
> On Tue, 10 Oct 2000, David Rankin wrote:
> : /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
> I'm not sure where the "-Wl,-rpath" is coming from, as patch-aa shows only
> the "libtool --mode=link -Wl,-R", which is actually not correct either.
> The suggested fix in the PR may be correct; tcl is trying to do its own
> handling, and botching it:
configure is trying this and "figuring out" that cc "needs" these values.
Since our patches put libtool in outside of configure's knowledge, I would
suggest deleting the references to TCL_LD_SEARCH_FLAGS. If we really do need
the -rpath flags, they should go in the same place as the -R flags.
> : On lines 433 and 437 of the file unix/Makefile.in, remove the
> : item @TCL_LD_SEARCH_FLAGS@ . This will prevent the bad -rpath insertion.
While compiling x11/tk 8.2.3, I've discovered the same problem under
unix/Makefile.in. In line 213, you have
TK_CC_SEARCH_FLAGS = -Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/X11R6/lib
which again sends libtool for a loop, and can be commented out (or moved
to the libtool call). Should I open another PR for this, or is this one
good enough?
Thanks,
David
--
David W. Rankin, Jr. Husband, Father, and UNIX Sysadmin.
Email: drankin@bohemians.lexington.ky.us Address/Phone Number: Ask me.
From: Frederick Bruckman <fb@enteract.com>
To: David Rankin <drankin@bohemians.lexington.ky.us>
Cc: Todd Vierling <tv@wasabisystems.com>, gnats-bugs@gnats.netbsd.org,
tech-pkg@netbsd.org
Subject: Re: pkg/11189: pkg tcl-8.3.2 won't compile on i386 1.4.1
Date: Tue, 10 Oct 2000 22:10:14 -0500 (CDT)
On Tue, 10 Oct 2000, David Rankin wrote:
> On Tue, Oct 10, 2000 at 05:38:55PM -0400, Todd Vierling wrote:
> > On Tue, 10 Oct 2000, David Rankin wrote:
>
> > : /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
>
> > I'm not sure where the "-Wl,-rpath" is coming from, as patch-aa shows only
> > the "libtool --mode=link -Wl,-R", which is actually not correct either.
> > The suggested fix in the PR may be correct; tcl is trying to do its own
> > handling, and botching it:
>
> configure is trying this and "figuring out" that cc "needs" these values.
> Since our patches put libtool in outside of configure's knowledge, I would
> suggest deleting the references to TCL_LD_SEARCH_FLAGS. If we really do need
> the -rpath flags, they should go in the same place as the -R flags.
The real problem is that libtool-1.3.5nb5 is stripping the "-Wl,"
arguments to "cc" on a.out. [It doesn't do that on ELF because it
doesn't have to -- on ELF, linking is always done with "cc". On a.out,
the new old behavior with nb5 is to link shared libraries with "ld",
while executables are evidently still linked with "cc".] Even if you
work around the broken libtool for this package, if you leave libtool
broken, there's going to be a lot of packages broken for a.out.
Frederick
From: Todd Vierling <tv@wasabisystems.com>
To: Frederick Bruckman <fb@enteract.com>
Cc: David Rankin <drankin@bohemians.lexington.ky.us>,
gnats-bugs@gnats.netbsd.org, tech-pkg@netbsd.org
Subject: Re: pkg/11189: pkg tcl-8.3.2 won't compile on i386 1.4.1
Date: Wed, 11 Oct 2000 00:38:07 -0400 (EDT)
On Tue, 10 Oct 2000, Frederick Bruckman wrote:
: The real problem is that libtool-1.3.5nb5 is stripping the "-Wl,"
: arguments to "cc" on a.out.
Part of the real problem is that nothing should be passing "-Wl," to
libtool. The purpose of libtool is to eliminate hacks such as -Wl and to
use a standard set of compile options.
The fact that tcl was "converted" from a non-libtooled package contributes
to this problem showing up here, however.
: [It doesn't do that on ELF because it doesn't have to -- on ELF, linking
: is always done with "cc". On a.out, the new old behavior with nb5 is to
: link shared libraries with "ld", while executables are evidently still
: linked with "cc".]
Which is as it should be. Only *some* versions of the a.out "cc" can cope
with "cc -shared"; older versions must use "ld -Bshareable". However, given
that, libtool probably shouldn't strip "-Wl" on any platform, as it's a
cc-specific option (and needs to stay that way when calling cc).
--
-- Todd Vierling <tv@wasabisystems.com> * http://www.wasabisystems.com/
-- Speed, stability, security, and support. Wasabi NetBSD: Run with it.
State-Changed-From-To: open->analyzed
State-Changed-By: skrll
State-Changed-When: Wed Oct 11 13:55:46 PDT 2000
State-Changed-Why:
This is a known problem. Fix is pending additional tests to libtool for
another problem - I want to minimise version number bumps.
State-Changed-From-To: analyzed->feedback
State-Changed-By: skrll
State-Changed-When: Thu Nov 2 08:43:26 PST 2000
State-Changed-Why:
libtool-1.3.5nb6 should fix this problem.
State-Changed-From-To: feedback->closed
State-Changed-By: skrll
State-Changed-When: Sat Dec 9 09:39:36 PST 2000
State-Changed-Why:
Fix committed and timed out and response.
>Unformatted:
(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.