On Thu, 17 Nov 2011 00:12:54 +0100 Remi Pointel <remi.poin...@xiri.fr> wrote: > Hi, > > as reported by pstumpf@ (thanks), Python 2.7 can't build on i386 with gcc 4.6. > > Analysing the logs, problem is that Python is not linked with libiconv (and > do not found libintl.h). > > This diff permits to correctly found libintl.h and linked Python 2.7 to > libiconv. > > pstumpf@ has tested and this diff permits to correcly build on i386 with gcc > 4.6. > > Are you ok?
New diff, I added the ${MODGETTEXT_WANTLIB} / ${MODGETTEXT_LIB_DEPENDS} instead of using iconv/intl(thanks sthen@). Also, I modified python 2.4, 2.5, and 3.2 too (don't work too with gcc 4.6 on i386). I tried make regress on amd64 and I didn't see any regressions with this diff. Are you ok? Cheers, Remi.
Index: Makefile.inc =================================================================== RCS file: /cvs/ports/lang/python/Makefile.inc,v retrieving revision 1.86 diff -u -p -r1.86 Makefile.inc --- Makefile.inc 18 Oct 2011 06:46:24 -0000 1.86 +++ Makefile.inc 17 Nov 2011 10:10:03 -0000 @@ -63,14 +63,17 @@ ONLY_FOR_ARCHS-bsddb= amd64 i386 .endif # All subpackages depend on the main python package. +MODULES = devel/gettext + RUN_DEPENDS= ${FULLPKGNAME-main}:lang/python/${VERSION},-main LIB_DEPENDS= -LIB_DEPENDS-main = archivers/bzip2 +LIB_DEPENDS-main = archivers/bzip2 \ + ${MODGETTEXT_LIB_DEPENDS} RUN_DEPENDS-main = WANTLIB-main = ssl panelw m crypto c util z readline pthread \ - ncursesw stdc++ expat ossaudio bz2 + ncursesw stdc++ expat ossaudio bz2 ${MODGETTEXT_WANTLIB} .if ${VERSION} != "2.4" LIB_DEPENDS-main += databases/sqlite3 WANTLIB-main += sqlite3 @@ -128,14 +131,14 @@ CONFIGURE_ARGS+= --enable-ipv6 THREAD_STACK_SIZE?=0x20000 CONFIGURE_ENV+= OPT='${CFLAGS} -DTHREAD_STACK_SIZE=${THREAD_STACK_SIZE} -fPIC' \ - LDFLAGS='-L${LOCALBASE}/lib/' SVNVERSION=no \ + CFLAGS='-I${LOCALBASE}/include/' LDFLAGS='-L${LOCALBASE}/lib/' SVNVERSION=no \ LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MAKE_ENV+= LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} .if ${VERSION} < 3.2 MAKE_FLAGS+= LDLIBRARY=libpython${VERSION}.so.${LIBpython${VERSION}_VERSION} .endif MAKE_FLAGS+= LD_LIBRARY_PATH=${WRKSRC} PATH="${WRKDIST}:${PORTPATH}" -MAKE_FLAGS+= LDFLAGS='-L${WRKSRC}' +MAKE_FLAGS+= LDFLAGS='-L${WRKSRC} -L${LOCALBASE}/lib' FAKE_FLAGS+= RANLIB=: ALL_TARGET?= everything ./Lib/plat-openbsd5 Index: 2.4/Makefile =================================================================== RCS file: /cvs/ports/lang/python/2.4/Makefile,v retrieving revision 1.41 diff -u -p -r1.41 Makefile --- 2.4/Makefile 27 Sep 2011 21:27:36 -0000 1.41 +++ 2.4/Makefile 17 Nov 2011 10:10:03 -0000 @@ -2,8 +2,8 @@ VERSION= 2.4 PATCHLEVEL= .6 -REVISION= 10 -REVISION-bsddb= 12 +REVISION= 11 +REVISION-bsddb= 13 SHARED_LIBS= python2.4 1.0 VERSION_SPEC= >=2.4,<2.5 Index: 2.4/patches/patch-configure_in =================================================================== RCS file: /cvs/ports/lang/python/2.4/patches/patch-configure_in,v retrieving revision 1.8 diff -u -p -r1.8 patch-configure_in --- 2.4/patches/patch-configure_in 1 Jan 2009 21:03:27 -0000 1.8 +++ 2.4/patches/patch-configure_in 17 Nov 2011 10:10:03 -0000 @@ -18,7 +18,7 @@ $OpenBSD: patch-configure_in,v 1.8 2009/ +# AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris # posix4 on Solaris 2.6 # pthread (first!) on Linux -+ LIBS="-pthread $(LIBS)" ++ LIBS="-pthread -liconv $(LIBS)" fi # check if we need libintl for locale functions Index: 2.5/Makefile =================================================================== RCS file: /cvs/ports/lang/python/2.5/Makefile,v retrieving revision 1.54 diff -u -p -r1.54 Makefile --- 2.5/Makefile 27 Sep 2011 21:27:36 -0000 1.54 +++ 2.5/Makefile 17 Nov 2011 10:10:03 -0000 @@ -2,8 +2,8 @@ VERSION= 2.5 PATCHLEVEL= .4 -REVISION= 15 -REVISION-bsddb= 16 +REVISION= 16 +REVISION-bsddb= 17 SHARED_LIBS= python2.5 1.0 VERSION_SPEC= >=2.5,<2.6 Index: 2.5/patches/patch-configure_in =================================================================== RCS file: /cvs/ports/lang/python/2.5/patches/patch-configure_in,v retrieving revision 1.6 diff -u -p -r1.6 patch-configure_in --- 2.5/patches/patch-configure_in 1 Jan 2009 21:03:27 -0000 1.6 +++ 2.5/patches/patch-configure_in 17 Nov 2011 10:10:03 -0000 @@ -39,7 +39,7 @@ $OpenBSD: patch-configure_in,v 1.6 2009/ +# AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris # posix4 on Solaris 2.6 # pthread (first!) on Linux -+ LIBS="-pthread $(LIBS)" ++ LIBS="-pthread -liconv $(LIBS)" fi # check if we need libintl for locale functions Index: 2.7/Makefile =================================================================== RCS file: /cvs/ports/lang/python/2.7/Makefile,v retrieving revision 1.16 diff -u -p -r1.16 Makefile --- 2.7/Makefile 27 Sep 2011 21:27:36 -0000 1.16 +++ 2.7/Makefile 17 Nov 2011 10:10:03 -0000 @@ -2,8 +2,8 @@ VERSION = 2.7 PATCHLEVEL = .1 -REVISION = 12 -REVISION-bsddb = 13 +REVISION = 13 +REVISION-bsddb = 14 SHARED_LIBS = python2.7 0.0 VERSION_SPEC = >=2.7,<2.8 Index: 2.7/patches/patch-configure_in =================================================================== RCS file: /cvs/ports/lang/python/2.7/patches/patch-configure_in,v retrieving revision 1.5 diff -u -p -r1.5 patch-configure_in --- 2.7/patches/patch-configure_in 7 Jul 2011 21:32:39 -0000 1.5 +++ 2.7/patches/patch-configure_in 17 Nov 2011 10:10:03 -0000 @@ -56,7 +56,7 @@ Wrong value of LDSHARED in sysconfig, cf +# AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris # posix4 on Solaris 2.6 # pthread (first!) on Linux -+ LIBS="-pthread $(LIBS)" ++ LIBS="-pthread -liconv $(LIBS)" fi # check if we need libintl for locale functions Index: 3.2/Makefile =================================================================== RCS file: /cvs/ports/lang/python/3.2/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- 3.2/Makefile 27 Sep 2011 21:27:36 -0000 1.5 +++ 3.2/Makefile 17 Nov 2011 10:10:03 -0000 @@ -3,7 +3,7 @@ VERSION = 3.2 PATCHLEVEL = .2 SHARED_LIBS = python3.2m 1.0 -REVISION = 1 +REVISION = 2 VERSION_SPEC = >=3.2,<3.3 MAINTAINER = Remi Pointel <rpoin...@openbsd.org> Index: 3.2/patches/patch-configure_in =================================================================== RCS file: /cvs/ports/lang/python/3.2/patches/patch-configure_in,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-configure_in --- 3.2/patches/patch-configure_in 20 Sep 2011 10:51:26 -0000 1.1.1.1 +++ 3.2/patches/patch-configure_in 17 Nov 2011 10:10:03 -0000 @@ -42,7 +42,7 @@ $OpenBSD: patch-configure_in,v 1.1.1.1 2 - # pthread (first!) on Linux + case $ac_sys_system/$ac_sys_release in + OpenBSD*) -+ LIBS="-pthread $(LIBS)" ;; ++ LIBS="-pthread -liconv $(LIBS)" ;; + *) + AC_SEARCH_LIBS(sem_init, pthread rt posix4) ;; # 'Real Time' functions on Solaris + # posix4 on Solaris 2.6