Opened 10 years ago

Closed 10 years ago

#30031 closed defect (fixed)

python27 @2.7.2_2 has broken exponentiation

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), jaroel (Roel Bruggink), graham.dennis@…, jwm.columbia@…, jmroot (Joshua Root)
Port: python27 python26 python25 python24

Description

I'm having trouble building pypy using MacPorts' python27 (since pypy is not yet installed). It has nothing to do with the selected compiler. This is a python abort before $CC is invoked

--->  Configuring pypy
--->  Building pypy
[translation:info] Translating target as defined by targetpypystandalone
Traceback (most recent call last):
  File "translate.py", line 322, in <module>
    main()
  File "translate.py", line 208, in main
    targetspec_dic, translateconfig, config, args = parse_options_and_load_target()
  File "translate.py", line 153, 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 "/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_lang_pypy/pypy/work/pypy-1.5-src/pypy/interpreter/gateway.py", line 17, in <module>
    from pypy.interpreter import eval
  File "/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_lang_pypy/pypy/work/pypy-1.5-src/pypy/interpreter/eval.py", line 6, in <module>
    from pypy.interpreter.baseobjspace import Wrappable
  File "/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_lang_pypy/pypy/work/pypy-1.5-src/pypy/interpreter/baseobjspace.py", line 3, in <module>
    from pypy.interpreter.executioncontext import ExecutionContext, ActionFlag
  File "/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_lang_pypy/pypy/work/pypy-1.5-src/pypy/interpreter/executioncontext.py", line 2, in <module>
    from pypy.interpreter.miscutils import Stack
  File "/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_lang_pypy/pypy/work/pypy-1.5-src/pypy/interpreter/miscutils.py", line 7, in <module>
    from pypy.rlib.rarithmetic import r_uint
  File "/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_lang_pypy/pypy/work/pypy-1.5-src/pypy/rlib/rarithmetic.py", line 435, in <module>
    longlongmax = r_longlong(LONGLONG_TEST - 1)
  File "/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_lang_pypy/pypy/work/pypy-1.5-src/pypy/rlib/rarithmetic.py", line 360, in __new__
    raise OverflowError("%s does not fit in signed %d-bit integer"%(val, klass.BITS))
OverflowError: -9223372036854775809 does not fit in signed 64-bit integer
shell command " cd "/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_lang_pypy/pypy/work/pypy-1.5-src/pypy/translator/goal" && arch -x86_64 /opt/local/bin/python2.7 translate.py --batch --cc=/Developer/usr/bin/llvm-gcc-4.2 --opt=jit --make-jobs=8 --cflags='-arch x86_64 -I/opt/local/include -L/opt/local/lib' targetpypystandalone.py " returned error 1
Error: Target org.macports.build returned: shell command failed (see log for details)
Warning: the following items did not execute (for pypy): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for pypy is at: /opt/local/var/macports/logs/_Volumes_Home_jeremy_src_macports_trunk_dports_lang_pypy/pypy/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Using Apple's /usr/bin/python2.7 instead of MacPorts' ${prefix}/bin/python2.7 gets past this hiccup.

Attachments (1)

main.log (29.9 KB) - added by graham.dennis@… 10 years ago.
Build log

Download all attachments as: .zip

Change History (17)

comment:1 Changed 10 years ago by jmroot (Joshua Root)

Is this happening right after the build phase starts, before it runs any of the platcheck stuff? If so, I can't reproduce. I'm running a build with pypy deactivated right now.

comment:2 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)

yes, it is happening immediately.

It's probably something odd with my built python27. I'll dig some more...

Changed 10 years ago by graham.dennis@…

Attachment: main.log added

Build log

comment:3 Changed 10 years ago by graham.dennis@…

Cc: graham.dennis@… added

Cc Me!

comment:4 Changed 10 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: newclosed

Let me know if it turns out there's something I need to do in the port.

comment:5 Changed 10 years ago by jwm.columbia@…

Resolution: worksforme
Status: closedreopened

I'd like to reopen this, since it appears I have the exact same problem. It appears the gcc compiler fails, since it for some reason lacks the Darwin-specific -arch option: -- [platform:execute] /opt/local/bin/gcc-mp-4.5 -c -arch x86_64 -O3 -fomit-frame-pointer -mdynamic-no-pic /var/folders/9q/yg5x8qn176s3gcn095qkkn_00000gn/T/usession-unknown-3/gcctest.c -o /var/folders/9q/yg5x8qn176s3gcn095qkkn_00000gn/T/usession-unknown-3/gcctest.o [platform:Error] cc1: error: unrecognized command line option "-arch" --

The shell command that fails during the build is -- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_pypy/pypy/work/pypy-pypy-release-1.6/pypy/translator/goal" && arch -x86_64 /opt/local/bin/python2.7 translate.py --batch --cc=/opt/local/bin/gcc-mp-4.5 --opt=jit --make-jobs=8 --cflags='-m64 -I/opt/local/include -L/opt/local/lib' targetpypystandalone.py --

I am relatively unfamiliar with MacPorts, so I'm unsure of further debugging steps. I'd be happy to supply any further information though.

comment:6 in reply to:  5 Changed 10 years ago by jwm.columbia@…

Apologies for messed up line-breaks, didn't notice that this uses WikiFormatting.

comment:7 Changed 10 years ago by jwm.columbia@…

Cc: jwm.columbia@… added

Cc Me!

comment:8 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: worksforme
Status: reopenedclosed

That's not the "exact same problem" ... please open a separate radar for new issues.

comment:9 in reply to:  8 Changed 10 years ago by jwm.columbia@…

Ah apologies, it seems I jumped to conclusions after looking at the main.log, which shows the build failing in the same command.

Replying to jeremyhu@…:

That's not the "exact same problem" ... please open a separate radar for new issues.

comment:10 Changed 10 years ago by jmroot (Joshua Root)

Port: python27 added; pypy removed
Resolution: worksforme
Status: closedreopened
Summary: pypy fails to build using python27python27 @2.7.2_2 has broken exponentiation

Definitely a bug in the python build. On 10.6 built with Xcode 3.2.6:

>>> 2**64
18446744073709551616L

On 10.7 built with Xcode 4.2:

>>> 2**64
0

comment:11 Changed 10 years ago by jmroot (Joshua Root)

Cc: jmr@… added
Owner: changed from jmr@… to jwa@…
Status: reopenednew

comment:12 Changed 10 years ago by jmroot (Joshua Root)

Port: python26 added

Also affects 2.6 but not 3.1 or 3.2.

comment:13 Changed 10 years ago by jmroot (Joshua Root)

Cc: mcalhoun@… added

comment:14 Changed 10 years ago by ned-deily (Ned Deily)

If the output above is from cpython 2.7, see #32072

comment:15 Changed 10 years ago by jmroot (Joshua Root)

Cc: roel@… added
Port: python25 python24 added

OK, so this is http://bugs.python.org/issue11149 and we should just need to add -fwrapv to CFLAGS.

comment:16 Changed 10 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.