Subject: pkg/8071: Some ELF fixes for netpbm package
To: None <gnats-bugs@gnats.netbsd.org>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 07/25/1999 13:16:32
>Number: 8071
>Category: pkg
>Synopsis: Some ELF fixes for netpbm package
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager (NetBSD software packages system bug manager)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 25 13:05:01 1999
>Last-Modified:
>Originator: Dave Huang
>Organization:
Name: Dave Huang | Mammal, mammal / their names are called /
INet: khym@bga.com | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 23 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release: July 25, 1999
>Environment:
System: NetBSD dahan.metonymy.com 1.4G NetBSD 1.4G (SPIFF) #304: Sat Jul 24 02:53:00 CDT 1999 khym@dahan.metonymy.com:/usr/src.local/sys/arch/i386/compile/SPIFF i386
NetBSD yerfable.metonymy.com 1.4G NetBSD 1.4G (YERFABLE) #17: Sat Jul 24 02:02:23 CDT 1999 khym@yerfable.metonymy.com:/usr/src.local/sys/arch/alpha/compile/YERFABLE alpha
>Description:
The netpbm-19940301 package doesn't include an rpath when
linking with libtiff and libpng, which causes pnmtopng, pnmtotiff,
etc... to fail.
>How-To-Repeat:
Build the netpbm package on an ELF system, then try to run pnmtopng:
% pnmtopng --version
Shared object "libpng.so.1" not found
% ls -l /usr/pkg/lib/libpng.so.1*
lrwxr-xr-x 1 root wheel 20 May 25 13:34 /usr/pkg/lib/libpng.so.1@ -> ../lib/libpng.so.1.1
-r--r--r-- 1 root wheel 222060 May 25 13:34 /usr/pkg/lib/libpng.so.1.1
>Fix:
--- patch-aa.orig Fri Jun 4 06:25:05 1999
+++ patch-aa Sun Jul 25 14:43:34 1999
@@ -18,7 +18,7 @@
-TIFFINC = -I../libtiff
-TIFFLIB = ../libtiff/libtiff.a
+TIFFINC = -I$(PREFIX)/include
-+TIFFLIB = -L$(PREFIX)/lib -ltiff -ljpeg
++TIFFLIB = -Wl,-R$(PREFIX)/lib -L$(PREFIX)/lib -ltiff -ljpeg
TIFFBINARIES = tifftopnm pnmtotiff
TIFFOBJECTS = tifftopnm.o pnmtotiff.o
--- patch-aj.orig Sun Jan 10 17:52:16 1999
+++ patch-aj Sun Jul 25 14:44:53 1999
@@ -18,7 +18,7 @@
-TIFFINC = -I../libtiff
-TIFFLIB = ../libtiff/libtiff.a
+TIFFINC = -I$(PREFIX)/include
-+TIFFLIB = -L$(PREFIX)/lib -ltiff -ljpeg
++TIFFLIB = -Wl,-R$(PREFIX)/lib -L$(PREFIX)/lib -ltiff -ljpeg
TIFFBINARIES = tifftopnm pnmtotiff
TIFFOBJECTS = tifftopnm.o pnmtotiff.o
-#LDFLAGS = -s
@@ -121,7 +121,7 @@
+ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM)
+
+$(PNGBINARIES): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM)
-+ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) -L${LOCALBASE}/lib -lpng -lz -lm
++ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) -Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib -lpng -lz -lm
+
+$(TIFFBINARIES): $(DEFPNM) $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM)
+ $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) -lm -lz
>Audit-Trail:
>Unformatted: