Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#40939 closed defect (invalid)

Pypy fails to build on Mavericks

Reported by: tknox@… Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: mavericks Cc: macports.org@…
Port: pypy

Description (last modified by mf2k (Frank Schima))

:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work/.CC_PRINT_OPTIONS' CFLAGS='-arch x86_64 -I/opt/local/include' PYPY_USESSION_DIR='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.9' LDFLAGS='-arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names' PYPY_CC='/usr/bin/clang' PYPY_LOCALBASE='/opt/local'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work/pypy-2.1-src/pypy/goal" && arch -x86_64 /opt/local/lib/pypy/pypy ../../rpython/bin/rpython --batch --translation-verbose --cc=/usr/bin/clang --opt=jit --make-jobs=8 targetpypystandalone'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work/pypy-2.1-src/pypy/goal" && arch -x86_64 /opt/local/lib/pypy/pypy ../../rpython/bin/rpython --batch --translation-verbose --cc=/usr/bin/clang --opt=jit --make-jobs=8 targetpypystandalone
:info:build Traceback (most recent call last):
:info:build   File "app_main.py", line 72, in run_toplevel
:info:build   File "../../rpython/bin/rpython", line 13, in <module>
:info:build     from rpython.translator.goal.translate import main
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work/pypy-2.1-src/rpython/translator/goal/translate.py", line 89, in <module>
:info:build     log = py.log.Producer("translation")
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work/pypy-2.1-src/py/_apipkg.py", line 114, in __makeattr
:info:build     result = importobj(modpath, attrname)
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work/pypy-2.1-src/py/_apipkg.py", line 37, in importobj
:info:build     module = __import__(modpath, None, None, ['__doc__'])
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work/pypy-2.1-src/py/_log/log.py", line 184, in <module>
:info:build     setattr(Syslog, _prio, getattr(py.std.syslog, _prio))
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work/pypy-2.1-src/py/_std.py", line 13, in __getattr__
:info:build     m = __import__(name)
:info:build   File "/opt/local/lib/pypy/lib_pypy/syslog.py", line 68, in <module>
:info:build     lib = ffi.verify("""
:info:build   File "/opt/local/lib/pypy/lib_pypy/cffi/api.py", line 311, in verify
:info:build     lib = self.verifier.load_library()
:info:build   File "/opt/local/lib/pypy/lib_pypy/cffi/verifier.py", line 68, in load_library
:info:build     self.compile_module()
:info:build   File "/opt/local/lib/pypy/lib_pypy/cffi/verifier.py", line 55, in compile_module
:info:build     self._write_source()
:info:build   File "/opt/local/lib/pypy/lib_pypy/cffi/verifier.py", line 117, in _write_source
:info:build     file = open(self.sourcefilename, 'w')
:info:build IOError: [Errno 2] No such file or directory: '/opt/local/lib/pypy/lib_pypy/__pycache__/_cffi__g7019d5d3xad93c709.c'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_pypy/pypy/work/pypy-2.1-src/pypy/goal" && arch -x86_64 /opt/local/lib/pypy/pypy ../../rpython/bin/rpython --batch --translation-verbose --cc=/usr/bin/clang --opt=jit --make-jobs=8 targetpypystandalone
:info:build Exit code: 1
:error:build org.macports.build for port pypy returned: command execution failed
:debug:build Error code: CHILDSTATUS 3888 1
: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"
:info:build Warning: targets not executed for pypy: org.macports.destroot org.macpkrts.build

Attachments (2)

main.log (11.3 KB) - added by tknox@… 10 years ago.
main.log from attempting to build pypy.
main.2.log (6.5 KB) - added by gthb (Gunnlaugur Thor Briem) 10 years ago.
main.log from failing build with pypy 2.1.0 built after Mavericks upgrade

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by tknox@…

Cc: tknox@… added

Cc Me!

comment:2 Changed 10 years ago by mf2k (Frank Schima)

Cc: tknox@… removed
Description: modified (diff)
Owner: changed from macports-tickets@… to jmr@…
Port: pypy added

In the future, please use WikiFormatting, fill in the Port field and Cc the port maintainers (port info --maintainers pypy).

As always, please attach the complete main.log.

comment:3 Changed 10 years ago by macports.org@…

Cc: macports.org@… added

Cc Me!

Changed 10 years ago by tknox@…

Attachment: main.log added

main.log from attempting to build pypy.

comment:4 Changed 10 years ago by tknox@…

Still fails (same error) in 2.2.1

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

Resolution: invalid
Status: newclosed

The log shows that pypy is being used to build. If you have pypy installed, you haven't followed wiki:Migration.

comment:6 Changed 10 years ago by gthb (Gunnlaugur Thor Briem)

I think this resolution is incorrect. It fails to build for me too, in the same way --- but I did follow wiki:Migration and rebuilt MacPorts from scratch after the Mavericks upgrade:

$ pypy --version
Python 2.7.3 (480845e6b1dd219d0944e30f62b01da378437c6c, Oct 24 2013, 13:01:13)
[PyPy 2.1.0]

Will attach main.log

Changed 10 years ago by gthb (Gunnlaugur Thor Briem)

Attachment: main.2.log added

main.log from failing build with pypy 2.1.0 built after Mavericks upgrade

comment:7 Changed 10 years ago by gthb (Gunnlaugur Thor Briem)

It's a problem with the already-installed pypy 2.1.0 itself, not with the build. It fails to import the syslog module, and others:

$ for module in syslog _sqlite3 _curses; do echo; echo $module; pypy -c "import $module"; done

syslog
Traceback (most recent call last):
  File "app_main.py", line 72, in run_toplevel
  File "app_main.py", line 566, in run_it
  File "<string>", line 1, in <module>
  File "/opt/local/lib/pypy/lib_pypy/syslog.py", line 68, in <module>
    lib = ffi.verify("""
  File "/opt/local/lib/pypy/lib_pypy/cffi/api.py", line 311, in verify
    lib = self.verifier.load_library()
  File "/opt/local/lib/pypy/lib_pypy/cffi/verifier.py", line 68, in load_library
    self.compile_module()
  File "/opt/local/lib/pypy/lib_pypy/cffi/verifier.py", line 55, in compile_module
    self._write_source()
  File "/opt/local/lib/pypy/lib_pypy/cffi/verifier.py", line 117, in _write_source
    file = open(self.sourcefilename, 'w')
IOError: [Errno 2] No such file or directory: '/opt/local/lib/pypy/lib_pypy/__pycache__/_cffi__g7019d5d3xad93c709.c'

_sqlite3
...
  File "/opt/local/lib/pypy/lib_pypy/_sqlite3.py", line 273, in <module>
    """, libraries=['sqlite3']
...
IOError: [Errno 2] No such file or directory: '/opt/local/lib/pypy/lib_pypy/__pycache__/_cffi__gd44677d0xe752c2be.c'

_curses
...
  File "/opt/local/lib/pypy/lib_pypy/_curses.py", line 319, in <module>
    """, libraries=['ncurses', 'panel'])
...
IOError: [Errno 2] No such file or directory: '/opt/local/lib/pypy/lib_pypy/__pycache__/_cffi__g3b3d68b9x310af836.c'

(Repeated parts skipped)

comment:8 Changed 10 years ago by gthb (Gunnlaugur Thor Briem)

Ah, one can fix that by importing as root:

sudo pypy -c 'import _sqlite3, _curses, syslog'

as noted in #40458, and now the build of pypy 2.2.0 is chugging along.

comment:9 Changed 10 years ago by gthb (Gunnlaugur Thor Briem)

So if the pypy port just did the above as a pre-build step (when building with pypy), then this would resolve itself automatically for other users.

Note: See TracTickets for help on using tickets.