pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bzip 2 fails to build on IRIX 6.5




The native IRIX ld supports the -set_version option. In hindsight this
is obvious since the GNU linker would not use an underscore in its
option names.

@joerg: Is it possible (just as a quick local workaround) to tell
cwrappers to ignore the -set_version option including its string
argument? In the pkglint test code I found a little hint:

   CWRAPPERS_TRANSFORM.cc+= rm-optarg:-set_version
   CWRAPPERS_TRANSFORM.cc+= rm-optarg:-Wl,-set_version

The rm-optarg command is only supported by the old wrapper framework and
additionally requires that the option and its argument are merged into a
single word (see mk/wrapper/gen-transform.sh), so this doesn't work. A
variant that does work (although ugly) is:

   CWRAPPERS_TRANSFORM.cc+=        rm:-Wl,-set_version
   CWRAPPERS_TRANSFORM.cc+=        rm:-Wl,sgi1.0

Independent of any workaround, the proper solution would be to research
why GCC 8.2.0 thinks that its own ld would be the native IRIX ld.

Having dug some more into this the -set_version is set in /usr/pkg/bin/libtool in the archive cmds= flag.

archive_cmds="\$CC -shared \$pic_flag -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \$wl-soname \$wl\$soname \\\`test -n \\\"\$verstring\\\" && func_echo_all \\\"\$wl-set_version \$wl\$verstring\\\"\\\` \$wl-update_registry \$wl\$output_objdir/so_locations -o \$lib"

if i edit those lines to read
archive_cmds="\$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"

then i obviously don’t get the set version error but it fails with

=> Unwrapping files-to-be-installed.
===> install-message [bzip2-1.0.8] ===> Installing for bzip2-1.0.8
=> Generating pre-install file lists
=> Creating installation directories
ld --mode=install /usr/pkg/bin/install-sh -c -o root -g sys -m 755 /build/pkgsrc/archivers/bzip2/work/bzip2-1.0.8/libbz2.la /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/lib
libtool: install: /usr/pkg/bin/install-sh -c -o root -g sys -m 755 /build/pkgsrc/archivers/bzip2/work/bzip2-1.0.8/.libs/libbz2.so.1.0 /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/lib/libbz2.so.1.0
libtool: install: (cd /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/lib && { ln -s -f libbz2.so.1.0 libbz2.so.1 || { rm -f libbz2.so.1 && ln -s libbz2.so.1.0 libbz2.so.1; }; })
libtool: install: (cd /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/lib && { ln -s -f libbz2.so.1.0 libbz2.so || { rm -f libbz2.so && ln -s libbz2.so.1.0 libbz2.so; }; })
libtool: install: (cd /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/lib && { ln -s -f libbz2.so.1.0 libbz2.so || { rm -f libbz2.so && ln -s libbz2.so.1.0 libbz2.so; }; })
libtool: install: /usr/pkg/bin/install-sh -c -o root -g sys -m 755 /build/pkgsrc/archivers/bzip2/work/bzip2-1.0.8/.libs/libbz2.lai /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/lib/libbz2.la
libtool: install: /usr/pkg/bin/install-sh -c -o root -g sys -m 755 /build/pkgsrc/archivers/bzip2/work/bzip2-1.0.8/.libs/libbz2.a /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/lib/libbz2.a
libtool: install: chmod 644 /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/lib/libbz2.a
libtool: install: true /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/lib/libbz2.a
libtool: warning: remember to run 'libtool --finish /usr/pkg/lib'
ld --mode=install /usr/pkg/bin/install-sh -c -S -f -o root -g sys -m 755 /build/pkgsrc/archivers/bzip2/work/bzip2-1.0.8/bzip2 /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/bin
libtool: install: (cd /build/pkgsrc/archivers/bzip2/work/bzip2-1.0.8; { test -z "" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z "" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z "" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; LD_LIBRARYN32_PATH=/usr/lib32:/lib32:/usr/lib32/internal:/usr/nekoware/lib:/usr/nekoware/libexec:/usr/nekoware/lib/firefox-2.0.0.20:/usr/nekoware/lib/seamonkey-1.1.14:/usr/nekoware/lib/gimp/2.0:/usr/freeware/lib32:/usr/java/lib32; export LD_LIBRARYN32_PATH; PATH=/build/pkgsrc/archivers/bzip2/work/.wrapper/bin:/build/pkgsrc/archivers/bzip2/work/.buildlink/bin:/build/pkgsrc/archivers/bzip2/work/.tools/bin:/build/pkgsrc/archivers/bzip2/work/.gcc/bin:/usr/pkg/bin:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/bin:/etc:/usr/etc:/usr/bin/X11:/usr/gfx:/usr/java/bin:/usr/java/bin32:/usr/nekoware/bin:/usr/nekoware/sbin:/usr/nekoware/drqueue/bin:/usr/local/bin:/usr/demos/Inventor:/usr/local/blender-2.44-irix-6.5-mips:/lib:/usr/lib:/usr/lib32/cmplrs:/usr/local/games/quake2:/usr/local/games/Quake3:/usr/local/ChangeSysId:/usr/local/RealPlayer8:/usr/local/RealPlayer8:/usr/local/divx:/usr/local/ayam/bin:/usr/pegamento:/usr/adobe/Acrobat4.0/bin:/usr/freeware/bin:/usr/pkg/bin:/usr/pkg/sbin:/opt/local/gcc-8.2.0/bin:/usr/lightwave/Bin:/usr/explorer/bin:.; export PATH; gcc -Wl,-R/usr/pkg/lib -O2 -I/build/pkgsrc/archivers/bzip2/work/.buildlink/include -Wall -Winline -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -o /var/tmp/libtool-1951105061/bzip2 bzip2.o  -L/build/pkgsrc/archivers/bzip2/work/.buildlink/lib -L/usr/pkg/lib -lbz2 -Wl,-rpath -Wl,/usr/pkg/lib)
/opt/local/gcc-8.2.0/lib/gcc/mips-sgi-irix6.5/8.2.0/../../../../mips-sgi-irix6.5/bin/ld: cannot find -lbz2
collect2: error: ld returned 1 exit status
libtool:   error: error: relink 'bzip2' with the above command before installing it
/sbin/ln -f /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/bin/bzip2 /build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/bin/bunzip2
/build/pkgsrc/archivers/bzip2/work/.destdir/usr/pkg/bin/bzip2 - No such file or directory
*** Error code 2

Stop.
bmake[1]: stopped in /mnt/pkgsrc/archivers/bzip2
*** Error code 1

Stop.
bmake: stopped in /mnt/pkgsrc/archivers/bzip2

mark



Home | Main Index | Thread Index | Old Index