Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2009 08:26:15 +0400
From:      Anonymous <swell.k@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/136917: [patch] lang/python26: gettext detection
Message-ID:  <86hbx8f09k.fsf@gmail.com>
Resent-Message-ID: <200907200430.n6K4U2E6053597@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         136917
>Category:       ports
>Synopsis:       [patch] lang/python26: gettext detection
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 20 04:30:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD luffy 8.0-BETA2 FreeBSD 8.0-BETA2 #2 r195754M: Sat Jul 18 18:20:53 UTC 2009     root@luffy:/usr/obj/usr/src/sys/PHOENIX  amd64
>Description:
When using external compiler from ports ${LOCALBASE}/include is
implicitly searched for header files. Because of this HAVE_LIBINTL_H
gets defined iff devel/gettext is installed. As a consequence _locale.so
module fails to build.

To mimic base compiler one can disable ac_cv_header_libintl_h.

However, the solution would be to use gettext when it's
available/specified. Not ignore gettext like base compiler currently
does because it cannot find libintl.h inside /usr/include.
>How-To-Repeat:
install devel/gettext
install lang/gcc42

$ cd lang/python26
$ make configure CC=gcc42
[...]

$ fgrep -m1 HAVE_LIBINTL_H $(make -V WRKSRC)/config.log
| #define HAVE_LIBINTL_H 1

$ make CC=gcc42
[...]
*** WARNING: renaming "_locale" since importing it failed: build/lib.freebsd-8.0-BETA2-amd64-2.6/_locale.so: Undefined symbol "libintl_bindtextdomain"
[...]
Failed to build these modules:
_locale
>Fix:
This is actually a workaround
--- python26.diff begins here ---
Index: lang/python26/Makefile
===================================================================
RCS file: /home/csup/ports/lang/python26/Makefile,v
retrieving revision 1.160
diff -u -p -r1.160 Makefile
--- lang/python26/Makefile	14 Jul 2009 09:29:02 -0000	1.160
+++ lang/python26/Makefile	20 Jul 2009 04:04:39 -0000
@@ -84,6 +84,8 @@ PLIST_SUB+=	IF_DEFAULT="@comment "
 
 # workaround for a bug in base curses.h.
 CFLAGS+=	-D__wchar_t=wchar_t
+# workaround for gcc from ports
+CONFIGURE_ENV+=	ac_cv_header_libintl_h=no
 
 .if !defined(WITHOUT_THREADS)
 .if defined(WITH_PTH)
--- python26.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86hbx8f09k.fsf>