pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
devel/gettext-tools from pkgsrc-2010Q4 fails to build on aix -- patch included
The devel/gettext-tools package from pkgsrc-2010Q4 fails to build on aix 5.3 with gcc. Below is the relevant output:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../lib -I../intl -I/jxr/include -O -I/jxr/include -c m-fgrep.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../lib -I../intl -I/jxr/include -O -I/jxr/include -c m-regex.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../lib -I../intl -I/jxr/include -O -I/jxr/include -c hard-locale.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../lib -I../intl -I/jxr/include -O -I/jxr/include -c regex.c
rm -f libgrep.a
ar cru libgrep.a kwset.o dfa.o m-common.o m-fgrep.o m-regex.o hard-locale.o regex.o
ranlib libgrep.a
Making all in libuniname
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../lib -I/jxr/include -O -I/jxr/include -c uniname.c
rm -f libuniname.a
ar cru libuniname.a uniname.o
ranlib libuniname.a
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../lib -I/jxr/include -O -I/jxr/include -c test-names.c
/bin/sh ../libtool --tag=CC --mode=link gcc -O -I/jxr/include -L/jxr/lib -Wl,-R/jxr/lib -o test-names test-names.o libuniname.a ../lib/libgettextlib.la -lintl -liconv
libtool: link: gcc -O -I/jxr/pkgsrc/devel/gettext-tools/work/.buildlink/include -Wl,-R/jxr/lib -o .libs/test-names test-names.o -L/jxr/pkgsrc/devel/gettext-tools/work/.buildlink/lib libuniname.a -L../lib/.libs -lgettextlib -lintl -lc -liconv -Wl,-blibpath:/jxr/lib:/jxr/pkgsrc/devel/gettext-tools/work/.buildlink/lib:/jxr/pkgsrc/devel/libtool-base/work/.buildlink/lib:/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2:/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/../../..:/usr/lib:/lib
ld: 0706-027 The -R /jxr/lib flag is ignored.
ld: 0706-006 Cannot find or open library file: -l gettextlib
ld:open(): No such file or directory
collect2: ld returned 255 exit status
*** Error code 1
Stop.
bmake: stopped in /jxr/pkgsrc/devel/gettext-tools/work/gettext-0.14.6/gettext-tools/libuniname
*** Error code 1
Stop.
bmake: stopped in /jxr/pkgsrc/devel/gettext-tools/work/gettext-0.14.6/gettext-tools
*** Error code 1
Stop.
bmake: stopped in /jxr/pkgsrc/devel/gettext-tools/work/gettext-0.14.6/gettext-tools
*** Error code 1
Stop.
bmake: stopped in /jxr/pkgsrc/devel/gettext-tools/work/gettext-0.14.6
*** Error code 1
Stop.
bmake: stopped in /jxr/pkgsrc/devel/gettext-tools
*** Error code 1
Stop.
bmake: stopped in /jxr/pkgsrc/devel/gettext-tools
The problem is that SHLIBTOOL_OVERRIDE is set in the Makefile, and the flags needed to link against .so files are not provided. SHLIBTOOL_OVERRIDE prevents the .a library from being built, and since the flags needed to link against .so libs are not there, the build fails even though the .so library was built. Removing SHLIBTOOL_OVERRIDE allows the build to succeed, but it also results in the static library being built and installed. I'm assuming that's not desirable, or SHLIBTOOL_OVERRIDE wouldn't have been set.
The alternative is to provide the LDFLAGS needed to tell aix to link against .so libs. I've included a patch below that will do that. The package builds successfully with this patch:
--- Makefile.orig 2011-01-17 17:39:34.000000000 -0600
+++ Makefile 2011-01-17 17:40:12.000000000 -0600
@@ -28,6 +28,7 @@
CONFIGURE_ENV+= HAVE_JAVAC_IN_PATH=
CONFIGURE_ENV+= HAVE_JIKES_IN_PATH=
CONFIGURE_ENV+= ac_cv_libexpat=no
+LDFLAGS.AIX+= -Wl,-brtl
SHLIBTOOL_OVERRIDE= # empty
INFO_FILES= yes
Home |
Main Index |
Thread Index |
Old Index