pkgsrc-Users archive

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

archivers/unzip from pkgsrc-2010Q4 fails to build on aix 5.3 -- patch included

The archivers/unzip package from pkgsrc-2010Q4 fails to build on aix 5.3 with gcc.  Here's the relevant output:

gcc -c -DUNIX -Dunix -DUSE_UNSHRINK -I.   -I/jxr/include -O -I/jxr/include -DUSE_ZLIB unreduce.c
gcc -c -DUNIX -Dunix -DUSE_UNSHRINK -I.   -I/jxr/include -O -I/jxr/include -DUSE_ZLIB unshrink.c
gcc -c -DUNIX -Dunix -DUSE_UNSHRINK -I.   -I/jxr/include -O -I/jxr/include -DUSE_ZLIB zipinfo.c
gcc -c -DUNIX -Dunix -DUSE_UNSHRINK -I.   -I/jxr/include -O -I/jxr/include -DUSE_ZLIB unix/unix.c
gcc -o unzip  -Lbzip2 unzip.o crc32.o  crypt.o envargs.o explode.o extract.o fileio.o globals.o inflate.o list.o match.o process.o ttyio.o ubz2err.o unreduce.o unshrink.o zipinfo.o unix.o  -s   -L/jxr/lib -Wl,-R/jxr/lib -lz
ld: 0706-027 The -R /jxr/lib flag is ignored.
ld: 0711-317 ERROR: Undefined symbol: .lchmod
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
gmake[1]: *** [unzip] Error 1
gmake[1]: Leaving directory `/jxr/pkgsrc/archivers/unzip/work/unzip60'
gmake: *** [generic_zlib] Error 2
*** Error code 2

bmake: stopped in /jxr/pkgsrc/archivers/unzip
*** Error code 1

bmake: stopped in /jxr/pkgsrc/archivers/unzip

The problem is that the lchmod symbol can't be found, and that's because aix doesn't have lchmod.  The following patch to the Makefile resolves the problem:

--- Makefile.orig       2011-01-15 23:59:34.000000000 -0600
+++ Makefile    2011-01-15 23:36:29.000000000 -0600
@@ -28,6 +28,7 @@
 .if (${OPSYS} == "SunOS" || \
      ${OPSYS} == "OSF1"  || \
+     ${OPSYS} == "AIX"   || \
     (${OPSYS} == "Darwin" && !empty(OS_VERSION:M[01234678].*)))

Home | Main Index | Thread Index | Old Index