ports/165451: lang/python27 has incorrect CFLAGS when building with clang resulting in problems with pow() [patch] [redports]

Volodymyr Kostyrko c.kworr at gmail.com
Fri Feb 24 15:50:07 UTC 2012


>Number:         165451
>Category:       ports
>Synopsis:       lang/python27 has incorrect CFLAGS when building with clang resulting in problems with pow() [patch] [redports]
>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 Feb 24 15:50:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Volodymyr Kostyrko
>Release:        RELENG_9
>Organization:
None
>Environment:
FreeBSD green.tandem.local 9.0-STABLE FreeBSD 9.0-STABLE #0 r231994: Wed Feb 22 10:44:52 EET 2012     arcade at green.tandem.local:/usr/obj/usr/src/sys/MINIMAL_4BSD  amd64
>Description:
Building of lang/pypy fails when lang/python27 is compiled with clang:

===>  Building for pypy-1.8
/bin/rm -rf build_pypy
/bin/mkdir -p build_pypy
(cd /tmp/ports/.amd_mnt/faz/host/usr/ports/lang/pypy/work/pypy-pypy-2346207d9946/pypy/translator/goal;  /usr/bin/env TMPDIR=/tmp
/ports/.amd_mnt/faz/host/usr/ports/lang/pypy/work/build_pypy  /usr/local/bin/python2.7 translate.py --source  -Ojit  targetpypys
tandalone.py  )
[platform:msg] Setting platform to 'host' cc=None
[translation:info] Translating target as defined by targetpypystandalone
Traceback (most recent call last):
  File "translate.py", line 325, in <module>
    main()
  File "translate.py", line 210, in main
    targetspec_dic, translateconfig, config, args = parse_options_and_load_target()
  File "translate.py", line 158, in parse_options_and_load_target
    targetspec_dic = load_target(targetspec)
  File "translate.py", line 105, in load_target
    mod = __import__(specname)
  File "targetpypystandalone.py", line 5, in <module>
    from pypy.interpreter import gateway
  File "/tmp/ports/.amd_mnt/faz/host/usr/ports/lang/pypy/work/pypy-pypy-2346207d9946/pypy/interpreter/gateway.py", line 17, in <
module>
    from pypy.interpreter import eval
  File "/tmp/ports/.amd_mnt/faz/host/usr/ports/lang/pypy/work/pypy-pypy-2346207d9946/pypy/interpreter/eval.py", line 6, in <modu
le>
    from pypy.interpreter.baseobjspace import Wrappable
  File "/tmp/ports/.amd_mnt/faz/host/usr/ports/lang/pypy/work/pypy-pypy-2346207d9946/pypy/interpreter/baseobjspace.py", line 2, 
in <module>
    from pypy.interpreter.executioncontext import ExecutionContext, ActionFlag
  File "/tmp/ports/.amd_mnt/faz/host/usr/ports/lang/pypy/work/pypy-pypy-2346207d9946/pypy/interpreter/executioncontext.py", line
 3, in <module>
    from pypy.rlib.rarithmetic import LONG_BIT
  File "/tmp/ports/.amd_mnt/faz/host/usr/ports/lang/pypy/work/pypy-pypy-2346207d9946/pypy/rlib/rarithmetic.py", line 421, in <mo
dule>
    longlongmax = r_longlong(LONGLONG_TEST - 1)
  File "/tmp/ports/.amd_mnt/faz/host/usr/ports/lang/pypy/work/pypy-pypy-2346207d9946/pypy/rlib/rarithmetic.py", line 346, in __n
ew__
    raise OverflowError("%s does not fit in signed %d-bit integer"%(val, klass.BITS))
OverflowError: -9223372036854775809 does not fit in signed 64-bit integer
*** Error code 1
>How-To-Repeat:

>Fix:
Incorporate fix from http://bugs.python.org/issue11149

Redports build pending: https://redports.org/buildarchive/20120224162832-24451/

Patch attached with submission follows:

diff -urN python27/files/patch-clang-fwrapw /home/arcade/svn/redports/lang/python27/files/patch-clang-fwrapw
--- python27/files/patch-clang-fwrapw	1970-01-01 03:00:00.000000000 +0300
+++ /home/arcade/svn/redports/lang/python27/files/patch-clang-fwrapw	2012-02-24 17:25:14.398434545 +0200
@@ -0,0 +1,34 @@
+diff -ur x/configure y/configure
+--- x/configure	2011-06-11 18:46:28.000000000 +0300
++++ y/configure	2012-02-24 17:23:44.249434823 +0200
+@@ -5418,6 +5418,13 @@
+         if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
+            WRAP="-fwrapv"
+         fi
++
++	# Clang also needs -fwrapv
++	case $CC in
++		*clang*) WRAP="-fwrapv"
++			;;
++	esac
++
+ 	case $ac_cv_prog_cc_g in
+ 	yes)
+ 	    if test "$Py_DEBUG" = 'true' ; then
+diff -ur x/configure.in y/configure.in
+--- x/configure.in	2011-06-11 18:46:28.000000000 +0300
++++ y/configure.in	2012-02-24 17:24:48.137434378 +0200
+@@ -931,6 +931,13 @@
+         if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
+            WRAP="-fwrapv"
+         fi
++
++	# Clang also needs -fwrapv
++	case $CC in
++		*clang*) WRAP="-fwrapv"
++			;;
++	esac
++
+ 	case $ac_cv_prog_cc_g in
+ 	yes)
+ 	    if test "$Py_DEBUG" = 'true' ; then


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list