Subject: pkg/28868: graphics/tiff does not compile on IRIX 5
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <georg.schwarz@freenet.de>
List: pkgsrc-bugs
Date: 01/04/2005 22:51:00
>Number: 28868
>Category: pkg
>Synopsis: graphics/tiff does not compile on IRIX 5
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 04 22:51:00 +0000 2005
>Originator: Georg Schwarz
>Release: current pkgsrc
>Organization:
>Environment:
IRIX lorenz 5.3 08031225 IP20 mips
>Description:
pkgsrc/tiff fails to compile on IRIX 5:
...
/bin/ksh ../libtool --tag=CXX --mode=link /usr/local/bin/g++ -O2 -I/usr/local/pkg/include -Wl,-rpath,/usr/local/pkg/lib -o libtiff.la -rpath /usr/local/pkg/lib -no-undefined -version-number 3:7:1 tif_aux.lo tif_close.lo tif_codec.lo tif_color.lo tif_compress.lo tif_dir.lo tif_dirinfo.lo tif_dirread.lo tif_dirwrite.lo tif_dumpmode.lo tif_error.lo tif_extension.lo tif_fax3.lo tif_fax3sm.lo tif_flush.lo tif_getimage.lo tif_jpeg.lo tif_luv.lo tif_lzw.lo tif_next.lo tif_ojpeg.lo tif_open.lo tif_packbits.lo tif_pixarlog.lo tif_predict.lo tif_print.lo tif_read.lo tif_strip.lo tif_swab.lo tif_thunder.lo tif_tile.lo tif_unix.lo tif_version.lo tif_warning.lo tif_write.lo tif_zip.lo tif_stream.lo -ljpeg -lz -lm -lc
libtool: link: warning: library `/usr/people/schwarz/pkgsrc/graphics/tiff/work/.buildlink/lib/libjpeg.la' was moved.
libtool: link: warning: library `/usr/people/schwarz/pkgsrc/graphics/tiff/work/.buildlink/lib/libz.la' was moved.
/usr/local/bin/g++ -shared -nostdlib .libs/tif_aux.o .libs/tif_close.o .libs/tif_codec.o .libs/tif_color.o .libs/tif_compress.o .libs/tif_dir.o .libs/tif_dirinfo.o .libs/tif_dirread.o .libs/tif_dirwrite.o .libs/tif_dumpmode.o .libs/tif_error.o .libs/tif_extension.o .libs/tif_fax3.o .libs/tif_fax3sm.o .libs/tif_flush.o .libs/tif_getimage.o .libs/tif_jpeg.o .libs/tif_luv.o .libs/tif_lzw.o .libs/tif_next.o .libs/tif_ojpeg.o .libs/tif_open.o .libs/tif_packbits.o .libs/tif_pixarlog.o .libs/tif_predict.o .libs/tif_print.o .libs/tif_read.o .libs/tif_strip.o .libs/tif_swab.o .libs/tif_thunder.o .libs/tif_tile.o .libs/tif_unix.o .libs/tif_version.o .libs/tif_warning.o .libs/tif_write.o .libs/tif_zip.o .libs/tif_stream.o -Wl,-rpath -Wl,/usr/people/schwarz/pkgsrc/graphics/tiff/work/.buildlink/lib:/usr/local/lib -L/usr/local/mips-sgi-irix5.3/lib -L/usr/local/mips-sgi-irix5.3/bin -L/usr/people/schwarz/gccb/gcc -L/usr/people/schwarz/gccb/mips-sgi-irix5.3/libstdc++-v3/src/.libs -L/usr/pe
ople/schwarz/gccb/mips-sgi-irix5.3/libstdc++-v3/src /usr/people/schwarz/pkgsrc/graphics/tiff/work/.buildlink/lib/libjpeg.so /usr/people/schwarz/pkgsrc/graphics/tiff/work/.buildlink/lib/libz.so -lc -L/usr/people/schwarz/pkgsrc/graphics/tiff/work/.buildlink/lib -L/usr/local/lib/gcc/mips-sgi-irix5.3/3.4.3 -L/usr/local/lib/gcc/mips-sgi-irix5.3/3.4.3/../../../../mips-sgi-irix5.3/lib -L/usr/local/lib/gcc/mips-sgi-irix5.3/3.4.3/../../.. /usr/local/lib/libstdc++.so -lm -lgcc_s -Wl,-rpath -Wl,/usr/local/pkg/lib -Wl,-soname -Wl,libtiff.so.3 `test -n "sgi3.6:sgi3.5:sgi3.4:sgi3.3:sgi3.2:sgi3.1:sgi3.0:sgi3.7" && echo -Wl,-set_version -Wl,sgi3.6:sgi3.5:sgi3.4:sgi3.3:sgi3.2:sgi3.1:sgi3.0:sgi3.7` -Wl,-update_registry -Wl,.libs/so_locations -o .libs/libtiff.so.3.7
/usr/bin/../lib/ld:
Picified code size too large, please use a larger text alignment size
collect2: ld returned 1 exit status
*** Error code 1
Stop.
bmake: stopped in /usr/people/schwarz/pkgsrc/graphics/tiff/work/tiff-3.7.1/libtiff
According to the information I found on the web, the error message is probably due to a bug in the linker framework.
Interestingly the problem does not occur when compiling tiff-3.7.1 outside of the pkgsrc framework.
>How-To-Repeat:
>Fix:
I figured out that by not using -lc in the linker the problem is suppressed. Therefore the following patch works around the issue:
--- Makefile.orig 2005-01-01 17:29:01.000000000 +0100
+++ Makefile 2005-01-01 17:29:47.000000000 +0100
@@ -28,6 +28,10 @@
CONFIGURE_ARGS+= --disable-lzw
.endif
+.if !empty(LOWER_OPSYS:Mirix5*)
+CONFIGURE_ENV+= ac_cv_lib_c_main="no"
+.endif
+
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/jpeg/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"