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? -- 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 16 Nov 2011 23:11:47 -0000 @@ -67,10 +67,11 @@ ONLY_FOR_ARCHS-bsddb= amd64 i386 RUN_DEPENDS= ${FULLPKGNAME-main}:lang/python/${VERSION},-main LIB_DEPENDS= -LIB_DEPENDS-main = archivers/bzip2 +LIB_DEPENDS-main = archivers/bzip2 \ + devel/gettext RUN_DEPENDS-main = WANTLIB-main = ssl panelw m crypto c util z readline pthread \ - ncursesw stdc++ expat ossaudio bz2 + ncursesw stdc++ expat ossaudio bz2 iconv intl .if ${VERSION} != "2.4" LIB_DEPENDS-main += databases/sqlite3 WANTLIB-main += sqlite3 @@ -128,14 +129,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.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 16 Nov 2011 23:11:47 -0000 @@ -2,13 +2,15 @@ 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 AUTOCONF_VERSION = 2.65 CONFIGURE_ARGS += --with-cxx_main \ --with-system-expat + +MODULES = devel/gettext .include <bsd.port.mk> 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 16 Nov 2011 23:11:47 -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