Re: permit Python 2.7 to build with gcc 4.6 on i386

2011-11-17 Thread Remi Pointel
On Thu, 17 Nov 2011 00:12:54 +0100
Remi Pointel  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.inc18 Oct 2011 06:46:24 -  1.86
+++ Makefile.inc17 Nov 2011 10:10:03 -
@@ -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?=0x2
 
 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/Makefile27 Sep 2011 21:27:36 -  1.41
+++ 2.4/Makefile17 Nov 2011 10:10:03 -
@@ -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 -   1.8
+++ 2.4/patches/patch-configure_in  17 Nov 2011 10:10:03 -
@@ -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/Makefile27 Sep 2011 21:27:36 -  1.54
+++ 2.5/Makefile17 Nov 2011 10:10:03 -
@@ -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 -   1.6
+++ 2.5/patches/patch-configure_in  17 Nov 2011 10:10:03 -
@@ -39,7 +39,7 @@ $OpenBSD: patch-configure_in,v 1.6 2009/
 +#   AC_SEARCH_LIBS(sem_init, pthread

Re: permit Python 2.7 to build with gcc 4.6 on i386

2011-11-17 Thread Christian Weisgerber
Remi Pointel  wrote:

> 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).

And how is this related to gcc4.6?
Either Python needs gettext/iconv or it doesn't.  The compiler
version should not matter.

> This diff permits to correctly found libintl.h and linked Python 2.7 to
> libiconv.

This diff seems to add a gettext dependency for all Python ports,
not just 2.7.  This looks all wrong to me.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: permit Python 2.7 to build with gcc 4.6 on i386

2011-11-17 Thread David Coppa
On Thu, Nov 17, 2011 at 11:10 AM, Remi Pointel  wrote:

> Are you ok?

Yes, diff looks sane to me.

ciao,
David



Re: permit Python 2.7 to build with gcc 4.6 on i386

2011-11-17 Thread David Coppa
On Thu, Nov 17, 2011 at 11:15 AM, Christian Weisgerber
 wrote:

> And how is this related to gcc4.6?
> Either Python needs gettext/iconv or it doesn't.  The compiler
> version should not matter.

I think this is because gcc-4.6.x has stricter linking rules

>> This diff permits to correctly found libintl.h and linked Python 2.7 to
>> libiconv.
>
> This diff seems to add a gettext dependency for all Python ports,
> not just 2.7.  This looks all wrong to me.

Look at the other mail from Remi

ciao,
David