ports/161564: [patch] lang/python27: prune __wchar_t define from CFLAGS
Nali Toja
nalitoja at gmail.com
Fri Oct 14 00:30:04 UTC 2011
>Number: 161564
>Category: ports
>Synopsis: [patch] lang/python27: prune __wchar_t define from CFLAGS
>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: Fri Oct 14 00:30:03 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Nali Toja
>Release: FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
>Description:
Many ports py- ports fail to build with clang because python-config
has -D__wchar_t=wchar_t in CFLAGS that's also defined in <sys/_types.h>.
Added by perky@ in lang/python24 (2.4.2) to workaround curses.h configure
check, the fix was merged into 2.4 branch several months later (before 2.4.3).
http://bugs.python.org/issue1244610
>How-To-Repeat:
http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp.20110723205754/py27-pcapy-0.10.5.log
$ cd net/py-pcapy; make
===> Vulnerability check disabled, database not found
===> License check disabled, port has not defined LICENSE
===> Extracting for py27-pcapy-0.10.5
=> SHA256 Checksum OK for pcapy-0.10.5.tar.gz.
===> Patching for py27-pcapy-0.10.5
===> Applying FreeBSD patches for py27-pcapy-0.10.5
===> py27-pcapy-0.10.5 depends on file: /usr/local/bin/python2.7 - found
===> Configuring for py27-pcapy-0.10.5
running config
===> Building for py27-pcapy-0.10.5
running build
running build_ext
building 'pcapy' extension
creating build
creating build/temp.freebsd-9.9-BLAH-amd64-2.7
clang -DNDEBUG -O2 -pipe -D__wchar_t=wchar_t -O2 -pipe -fPIC -I/usr/local/include/python2.7 -c pcapdumper.cc -o build/temp.freebsd-9.9-BLAH-amd64-2.7/pcapdumper.o
In file included from pcapdumper.cc:11:
In file included from /usr/local/include/python2.7/Python.h:33:
In file included from /usr/include/stdio.h:41:
/usr/include/sys/_types.h:90:21: error: cannot combine with previous 'type-name' declaration specifier
typedef __ct_rune_t __wchar_t; /* wchar_t (see above) */
^
<command line>:2:19: note: expanded from:
#define __wchar_t wchar_t
^
1 error generated.
error: command 'clang' failed with exit status 1
*** Error code 1
>Fix:
--- clang.diff begins here ---
Index: lang/python27/Makefile
===================================================================
RCS file: /a/.csup/ports/lang/python27/Makefile,v
retrieving revision 1.179
diff -u -p -r1.179 Makefile
--- lang/python27/Makefile 25 Sep 2011 15:05:18 -0000 1.179
+++ lang/python27/Makefile 13 Oct 2011 23:43:56 -0000
@@ -78,8 +83,5 @@ PLIST_SUB+= IF_DEFAULT=""
PLIST_SUB+= IF_DEFAULT="@comment "
.endif
-# workaround for a bug in base curses.h.
-CFLAGS+= -D__wchar_t=wchar_t
-
.if !defined(WITHOUT_THREADS)
PLIST_SUB+= THREADS=""
--- clang.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list