NetBSD Problem Report #18694
Received: (qmail 17378 invoked by uid 605); 18 Oct 2002 14:39:59 -0000
Message-Id: <200210181439.g9IEdrd12282@pl374.nas911.nara.nttpc.ne.jp>
Date: Fri, 18 Oct 2002 23:39:53 +0900 (JST)
From: itohy@netbsd.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: itohy@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: buildlink2 fake-la fails on a.out
X-Send-Pr-Version: 3.95
>Number: 18694
>Category: pkg
>Synopsis: buildlink2 fake-la fails on a.out
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 18 14:40:00 +0000 2002
>Closed-Date: Fri Oct 18 22:35:33 +0000 2002
>Last-Modified: Fri Oct 18 22:35:33 +0000 2002
>Originator: ITOH Yasufumi
>Release: NetBSD 1.6F; pkgsrc Oct 16, 2002
>Organization:
>Environment:
System: NetBSD pino.my.domain 1.6F NetBSD 1.6F (PINO) #351: Sat Aug 31 14:32:04 JST 2002 itohy@pino.my.domain:/w/src/sys/arch/i386/compile/PINO i386
Architecture: i386
Machine: i386
OBJECT_FMT=a.out
>Description:
fake-la doesn't work on a.out environment.
This is because libtool of a.out directly uses ld for creating shlib,
and ld returns an error status if no input file is specified.
>How-To-Repeat:
% cd pkgsrc/graphics/gdk-pixbuf
% make
=> Checksum OK for gdk-pixbuf-0.18.0.tar.gz.
===> Extracting for gdk-pixbuf-0.18.0
(snip)
===> Patching for gdk-pixbuf-0.18.0
===> Applying NetBSD patches for gdk-pixbuf-0.18.0
/usr/bin/sed -e 's/gnome-config/x.gnome-config.x/g' /usr/pkgsrc/graphics/gdk-pixbuf/work.i386/gdk-pixbuf-0.18.0/configure.in >/usr/pkgsrc/graphics/gdk-pixbuf/work.i386/gdk-pixbuf-0.18.0/.tmp && /bin/mv /usr/pkgsrc/graphics/gdk-pixbuf/work.i386/gdk-pixbuf-0.18.0/.tmp /usr/pkgsrc/graphics/gdk-pixbuf/work.i386/gdk-pixbuf-0.18.0/configure.in
===> Buildlinking for gdk-pixbuf-0.18.0
ld: no input files
libtool: install: `libintl.la' is not a valid libtool archive
Try `libtool --help --mode=install' for more information.
sed: /usr/pkgsrc/graphics/gdk-pixbuf/work.i386/.buildlink/.tmp/inst/libintl.la: No such file or directory
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/graphics/gdk-pixbuf
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/graphics/gdk-pixbuf
>Fix:
Fake an input file.
Index: bsd.buildlink2.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink2/bsd.buildlink2.mk,v
retrieving revision 1.41
diff -u -r1.41 bsd.buildlink2.mk
--- bsd.buildlink2.mk 2002/10/13 07:13:42 1.41
+++ bsd.buildlink2.mk 2002/10/18 14:27:09
@@ -944,6 +944,7 @@
-e "s|@DIRNAME@|${DIRNAME:Q}|g" \
-e "s|@ECHO@|${ECHO:Q}|g" \
-e "s|@EGREP@|${EGREP:Q}|g" \
+ -e "s|@ID@|${ID:Q}|g" \
-e "s|@LIBTOOL@|${BUILDLINK_LIBTOOL:Q}|g" \
-e "s|@MKDIR@|${MKDIR:Q}|g" \
-e "s|@MV@|${MV:Q}|g" \
Index: fake-la
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink2/fake-la,v
retrieving revision 1.1
diff -u -r1.1 fake-la
--- fake-la 2002/09/18 00:46:59 1.1
+++ fake-la 2002/10/18 14:27:09
@@ -7,6 +7,7 @@
CP="@CP@"
DIRNAME="@DIRNAME@"
ECHO="@ECHO@"
+ID="@ID@"
LIBTOOL="@LIBTOOL@ --quiet"
MKDIR="@MKDIR@"
MV="@MV@"
@@ -34,7 +35,17 @@
esac
${MKDIR} $tmpdir/inst
cd $tmpdir
- ${LIBTOOL} ${CC} -o $libbase.la -rpath $tmpdir/inst -version-info $version
+
+ # libtool with no input files may cause ld failure
+ echo 'int i;' >foo.c
+ ${LIBTOOL} --mode=compile ${CC} -c foo.c
+ ${LIBTOOL} ${CC} -o $libbase.la -rpath $tmpdir/inst -version-info $version foo.lo
${LIBTOOL} --mode=install ${CP} $libbase.la $tmpdir/inst >/dev/null
+
+ # libtool --mode=install executes ldconfig to add the destination dir.
+ # This is probably no harm but re-run ldconfig just in case.
+ case "`${ID} -u`" in
+ 0) /sbin/ldconfig;;
+ esac 2>/dev/null
fi
${SED} -e "s,$tmpdir/inst,$realdir,g" $tmpdir/inst/$libbase.la
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: jlam
State-Changed-When: Fri Oct 18 08:39:49 PDT 2002
State-Changed-Why:
From the commit log:
----------------------------
revision 1.2
date: 2002/10/18 15:41:08; author: jlam; state: Exp; lines: +10 -2
Make fake-la work on a.out machines. Fix based on patch in pkg/18694
by itohy@netbsd.org.
----------------------------
Could you please test the fix on your machine? "make buildlink" in
pkgsrc/graphics/freetype-lib is a good test. Thanks!
State-Changed-From-To: feedback->closed
State-Changed-By: wiz
State-Changed-When: Fri Oct 18 15:35:19 PDT 2002
State-Changed-Why:
jlam fixed the problem -- thanks for the PR!
>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.