NetBSD Problem Report #20499

Received: (qmail 2681 invoked by uid 605); 26 Feb 2003 14:08:26 -0000
Message-Id: <20030226140825.0FE2311152@narn.netbsd.org>
Date: Wed, 26 Feb 2003 06:08:25 -0800 (PST)
From: pavel.cahyna@st.mff.cuni.cz
Sender: gnats-bugs-owner@netbsd.org
Reply-To: pavel.cahyna@st.mff.cuni.cz
To: gnats-bugs@gnats.netbsd.org
Subject: libtool requires that LOCALBASE and WRKOBJDIR point to the same filesystem
X-Send-Pr-Version: www-1.0

>Number:         20499
>Category:       pkg
>Synopsis:       libtool requires that LOCALBASE and WRKOBJDIR point to the same filesystem
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    tv
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 26 14:09:00 +0000 2003
>Closed-Date:    Fri Mar 18 15:07:19 +0000 2005
>Last-Modified:  Fri Mar 18 15:11:01 +0000 2005
>Originator:     Pavel Cahyna
>Release:        IRIX 6.5.18
>Organization:
>Environment:
IRIX64 bruin 6.5 6.5.18m 10151453 IP28
>Description:
Seen on IRIX, but probably OS-independent.
/usr/pkg/bin/libtool (it's a shell script) contains this:

    # Lock this critical section if it is needed
    # We use this script file to make the link, it avoids creating a new file
    if test "$need_locks" = yes; then
      until $run ln "$0" "$lockfile" 2>/dev/null; do
        $show "Waiting for $lockfile to be removed"
        sleep 2
      done

The ln command fails if the script itself (/usr/pkg/bin/libtool) 
and the working directory (under ${WRKOBJDIR} if set, under
${PKGSRCDIR} otherwise) are on different filesystems.
>How-To-Repeat:
cd to your ${PKGSRCDIR}

$ cd devel/gettext-lib
$ make (or bmake on IRIX)
...
===> Building for gettext-lib-0.11.5
/bin/sh ../libtool --mode=compile cc -c -DLOCALEDIR=\"/usr/pkg/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/pkg/share/locale\"  -DLIBDIR=\"/usr/pkg/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl -I/usr/pkg/include -O2 -I/usr/pkg/include  intl-compat.c
Waiting for intl-compat.o.lock to be removed
Waiting for intl-compat.o.lock to be removed
Waiting for intl-compat.o.lock to be removed
Waiting for intl-compat.o.lock to be removed
.... ad infinitum.

Assuming ${WRKOBJDIR} and ${LOCALBASE} are on different filesystems.
>Fix:

>Release-Note:
>Audit-Trail:

From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
To: gnats-admin@netbsd.org, pkg-manager@netbsd.org
Cc:  
Subject: Re: pkg/20499
Date: Wed, 26 Feb 2003 16:47:12 +0100

 Correction: this bug won't show up on NetBSD. The code involved is
 executed only if the compiler doesn't support -c and -o together,
 which is true (or configure believes it) for the SGI MIPSpro compiler.
State-Changed-From-To: open->suspended 
State-Changed-By: wiz 
State-Changed-When: Sat Mar 22 07:50:27 PST 2003 
State-Changed-Why:  
Bug in original software; doesn't seem likely to be solved soon. 
Responsible-Changed-From-To: pkg-manager->irix-pkg-people 
Responsible-Changed-By: wiz 
Responsible-Changed-When: Thu Apr 1 18:33:55 UTC 2004 
Responsible-Changed-Why:  
Irix-specific bug. 
State-Changed-From-To: suspended->feedback 
State-Changed-By: jschauma 
State-Changed-When: Thu Jun 10 15:28:53 UTC 2004 
State-Changed-Why:  

What version of MIPSPro do you see this with?  I have MIPSpro Compilers: Version 7.41 
and I can't reproduce the problem at all.  I have WRKOBJDIR in one partition 
and LOCALBASE on another, yet libtool happily builds gettext-lib (and others) 
for me. 

What version of libtool do you have installed? 


From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
To: gnats-bugs@gnats.netbsd.org
Cc: pavel.cahyna@st.mff.cuni.cz, jschauma@netbsd.org,
  irix-pkg-people@netbsd.org
Subject: Re: pkg/20499
Date: Mon, 14 Jun 2004 14:10:11 +0200

 > What version of MIPSPro do you see this with?  I have MIPSpro Compilers: Version 7.41
 > and I can't reproduce the problem at all.  I have WRKOBJDIR in one partition
 > and LOCALBASE on another, yet libtool happily builds gettext-lib (and others)
 > for me.
 > 
 > What version of libtool do you have installed?

 I don't remember the version of MIPSpro used at that time. I do not use
 IRIX anymore. The version of libtool was:

 ltmain.sh (GNU libtool) 1.4a (1.641.2.255 2001/05/22 10:39:30)

 The problem is that libtool (ltmain.in) contains the following gem:

     # Lock this critical section if it is needed
     # We use this script file to make the link, it avoids creating a new
     # file
     if test "$need_locks" = yes; then
       until $run ln "$progpath" "$lockfile" 2>/dev/null; do
 	$show "Waiting for $lockfile to be removed"
 	sleep 2
       done

 The ln command obviously fails if working dorectory is not on the same
 filesystem as libtool itself.

 This bug has not yet been fixed. But maybe this section is never reached
 when using newer MIPSpro compilers, as it isn't with gcc? Could you test 
 if the need_locks variable is set?

Responsible-Changed-From-To: irix-pkg-people->pkg-manager 
Responsible-Changed-By: jschauma 
Responsible-Changed-When: Mon Sep 6 18:00:29 UTC 2004 
Responsible-Changed-Why:  

This problem is not IRIX specific, but a limitation of libtool itself. 
It was mentioned at least once on libtools mailing list in 2002, but 
I couldn't track down more details. 

I have also been unable to create a libtool configuration that actually 
does set 'need_locks=yes', thusly triggering the bug. 

State-Changed-From-To: feedback->analyzed
State-Changed-By: wiz@netbsd.org
State-Changed-When: Mon, 14 Mar 2005 12:18:06 +0000
State-Changed-Why:
Feedback supplied. Problem analyzed by jschauma.


Responsible-Changed-From-To: pkg-manager->tv
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Thu, 17 Mar 2005 16:56:34 +0000
Responsible-Changed-Why:
Over to maintainer.


State-Changed-From-To: analyzed->closed
State-Changed-By: tv@netbsd.org
State-Changed-When: Fri, 18 Mar 2005 15:07:19 +0000
State-Changed-Why:
Worked around this in libtool-1.5.10nb10.


From: Todd Vierling <tv@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/20499 CVS commit: pkgsrc/devel/libtool-base
Date: Fri, 18 Mar 2005 15:06:10 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tv
 Date:		Fri Mar 18 15:06:10 UTC 2005

 Modified Files:
 	pkgsrc/devel/libtool-base: Makefile

 Log Message:
 nb10:  Work around PR pkg/20499 by disabling locking altogether on IRIX.
 This won't hurt gcc-based builds, so it does not need to be compiler type
 conditional.


 To generate a diff of this commit:
 cvs rdiff -r1.58 -r1.59 pkgsrc/devel/libtool-base/Makefile

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

>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.