Opened 7 years ago

Closed 7 years ago

#42929 closed defect (worksforme)

Error building python3.4

Reported by: andy47@… Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: hapaguy (Brian Kurt Fujikawa), ryandesign (Ryan Schmidt)
Port: python34

Description (last modified by ryandesign (Ryan Schmidt))

When trying to install the latest python34 port today I get the following error message;

--->  Applying patches to python34
--->  Configuring python34
--->  Building python34
Error: org.macports.build for port python34 returned: command execution failed
Please see the log file for port python34 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python34/python34/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port python34 failed

The referenced log file includes these lines;

:info:build   File "<frozen importlib._bootstrap>", line 1554, in get_code
:info:build   File "<frozen importlib._bootstrap>", line 672, in _code_to_bytecode
:info:build ValueError: unmarshallable object
:info:build make: *** [pybuilddir.txt] Segmentation fault: 11
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python34/python34/work/Python-3.4.0'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python34/python34/work/Python-3.4.0" && /usr/bin/make -j4 -w all MAKE="/usr/bin/make CC=/usr/bin/llvm-gcc-4.2" 
:info:build Exit code: 2
:error:build org.macports.build for port python34 returned: command execution failed
:debug:build Error code: CHILDSTATUS 63879 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"

I have attached the full log file to the ticket if that helps.

I already have the python33 port installed but got the same errors messages after I had uninstalled it so I don't think that the problem is across Python versions

Attachments (1)

main.log (110.5 KB) - added by andy47@… 7 years ago.

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by andy47@…

Attachment: main.log added

comment:1 Changed 7 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Keywords: python removed
Owner: changed from macports-tickets@… to jwa@…

comment:2 Changed 7 years ago by ned-deily (Ned Deily)

One suspicious thing I notice in the log:

CC='/usr/bin/llvm-gcc-4.2'

Upstream, we had to blacklist the Apple llvm-gcc-4.2 compiler (as shipped with Xcode 4) for Python 3.3 because we were getting broken builds out of it. It seemed to work OK with earlier versions of Python but we gave up trying to isolate the problem when it became clear that Apple was understandably not interested in fixing the deprecated compiler. I have not tried Python 3.4 with that compiler but it wouldn't surprise me if it were still a problem. For 10.6, our recommendation is to use the "real" (non-LLVM) Apple gcc-4.2 from Xcode 3. For later releases, use Apple clang.

Last edited 7 years ago by ned-deily (Ned Deily) (previous) (diff)

comment:3 Changed 7 years ago by hapaguy (Brian Kurt Fujikawa)

Cc: brian.fujikawa@… added

Cc Me!

comment:4 Changed 7 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

The log says this was on 10.7, so MacPorts should have chosen clang as the compiler. What version of Xcode is installed, please?

comment:5 Changed 7 years ago by ned-deily (Ned Deily)

As a followup, with access once again to 10.7, I was able to confirm that the build failure is seen on a plain, non-MacPorts source build of Python 3.4.0 when using Apple llvm-gcc:

./configure CC=/usr/bin/llvm-gcc-4.2 && make
...
  File "<frozen importlib._bootstrap>", line 672, in _code_to_bytecode
ValueError: unmarshallable object
make: *** [pybuilddir.txt] Segmentation fault: 11

and builds correctly and tests pass as expected with clang (both from the most recent Xcode 4 for 10.7) :

./configure CC=/usr/bin/clang && make

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.7.5
BuildVersion:	11G63
$ xcodebuild -version
Xcode 4.6.3
Build version 4H1503
$ /usr/bin/llvm-gcc-4.2 --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ /usr/bin/clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix

comment:6 in reply to:  4 ; Changed 7 years ago by andy47@…

Replying to ryandesign@…:

The log says this was on 10.7, so MacPorts should have chosen clang as the compiler. What version of Xcode is installed, please?

I have Xcode 4.2.1 (Build 4D502)

comment:7 Changed 7 years ago by andy47@…

Just tried again and Python 3.4.0.2 downloads and installs correctly.

comment:8 in reply to:  6 Changed 7 years ago by ryandesign (Ryan Schmidt)

Resolution: worksforme
Status: newclosed

Replying to andy47@…:

Just tried again and Python 3.4.0.2 downloads and installs correctly.

Ok, glad it worked this time.

Replying to andy47@…:

I have Xcode 4.2.1 (Build 4D502)

Consider updating to Xcode 4.6.3, the last version for OS X 10.7.

Note: See TracTickets for help on using tickets.