VerificationError after build

My Linux machine at work is OpenSUSE 12.2, so I couldn't use a pre-built binary. I built PyPy 2.0.2 yesterday, then tried the interpreter. I got a couple VerificationError exceptions and never got a prompt. Looking more closely, I realized I was missing some prerequisites I thought I had. I installed everything I could find from the list and fired up the build process again before heading home. It was done when I got in this morning. I tried again. Same result. Since it was a compilation error, I thought I should mention what I have available: hornet% type cc cc is /usr/bin/cc hornet% type gcc gcc is /opt/TWWfsw/bin/gcc hornet% cc --version cc (SUSE Linux) 4.7.1 20120723 [gcc-4_7-branch revision 189773] Copyright (C) 2012 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. hornet% gcc --version gcc (GCC) 4.4.6 [TWW] Copyright (C) 2010 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. For compatibility with our other bits of software, and with the PyPy build itself, I would prefer to guarantee it uses gcc. The error message wasn't clear about what "cc" failed. I skimmed the --help output of rpython, then built it again with --cc=/.../.../gcc. Third try is a charm? Not so much. Can someone give me some suggestions about debugging these tracebacks? hornet% ./pypy-c Python 2.7.3 (5acfe049a5b0cd0de158f62553a98f5ef364fd29, Jun 28 2013, 15:39:43) [PyPy 2.0.2] on linux3 Type "help", "copyright", "credits" or "license" for more information. /net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/__pycache__/_cffi__g85535e98x310af836.c:27:19: fatal error: panel.h: No such file or directory compilation terminated. Traceback (most recent call last): File "app_main.py", line 72, in run_toplevel File "app_main.py", line 598, in run_it File "/home/skipm/.python.py", line 27, in <module> from save_session import mark, save, load File "/home/skipm/misc/python/save_session.py", line 19, in <module> import readline File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/readline.py", line 9, in <module> from pyrepl.readline import * File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/pyrepl/readline.py", line 33, in <module> from pyrepl.unix_console import UnixConsole, _error File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/pyrepl/unix_console.py", line 25, in <module> from pyrepl import curses File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/pyrepl/curses.py", line 28, in <module> import _curses File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/_curses.py", line 319, in <module> """, libraries=['ncurses', 'panel']) File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/api.py", line 311, in verify lib = self.verifier.load_library() File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/verifier.py", line 68, in load_library self.compile_module() File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/verifier.py", line 56, in compile_module self._compile_module() File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/verifier.py", line 142, in _compile_module outputfilename = ffiplatform.compile(tmpdir, self.get_extension()) File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/ffiplatform.py", line 25, in compile outputfilename = _build(tmpdir, ext) File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/ffiplatform.py", line 50, in _build raise VerificationError('%s: %s' % (e.__class__.__name__, e)) VerificationError: CompileError: command 'cc' failed with exit status 1 And now for something completely different: ``it is the expected behavior, except when you don't expect it'' /net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/__pycache__/_cffi__g85535e98x310af836.c:27:19: fatal error: panel.h: No such file or directory compilation terminated. Traceback (most recent call last): File "app_main.py", line 72, in run_toplevel File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/_pypy_interact.py", line 34, in interactive_console from pyrepl.simple_interact import check File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/pyrepl/simple_interact.py", line 27, in <module> from pyrepl.readline import multiline_input, _error, _get_reader File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/pyrepl/readline.py", line 33, in <module> from pyrepl.unix_console import UnixConsole, _error File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/pyrepl/unix_console.py", line 25, in <module> from pyrepl import curses File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/pyrepl/curses.py", line 28, in <module> import _curses File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/_curses.py", line 319, in <module> """, libraries=['ncurses', 'panel']) File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/api.py", line 311, in verify lib = self.verifier.load_library() File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/verifier.py", line 68, in load_library self.compile_module() File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/verifier.py", line 56, in compile_module self._compile_module() File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/verifier.py", line 142, in _compile_module outputfilename = ffiplatform.compile(tmpdir, self.get_extension()) File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/ffiplatform.py", line 25, in compile outputfilename = _build(tmpdir, ext) File "/net/udesktop267.wacker/export/home/skipm/3rdParty/pypy-2.0.2-src/lib_pypy/cffi/ffiplatform.py", line 50, in _build raise VerificationError('%s: %s' % (e.__class__.__name__, e)) VerificationError: CompileError: command 'cc' failed with exit status 1 Thx, Skip

Skip, SuSE has a somewhat different packaging of curses than do other installation. It'd be ideal if pypy-c would be immune to that, but so lacking I did: 1) symlink tinfo to ncurses: /usr/lib64/libtinfo.so.5 -> libncurses.so 2) symlink panel.h to ncurses/panel.h /usr/include/panel.h -> ncurses/panel.h Live's been good ever since. :) Best regards, Wim -- WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net

SuSE has a somewhat different packaging of curses than do other installation. It'd be ideal if pypy-c would be immune to that, but so lacking I did:
1) symlink tinfo to ncurses: /usr/lib64/libtinfo.so.5 -> libncurses.so
2) symlink panel.h to ncurses/panel.h /usr/include/panel.h -> ncurses/panel.h
Thanks. That seems to have worked. I now have a prompt and many pystones: % ./pypy-c Python 2.7.3 (5acfe049a5b0cd0de158f62553a98f5ef364fd29, Jun 28 2013, 15:39:43) [PyPy 2.0.2] on linux3 Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``PyPy and CPython: they are mortal enemies intent on killing each other''
from test import pystone pystone.main() Pystone(1.1) time for 50000 passes = 0.082987 This machine benchmarks at 602504 pystones/second pystone.main() Pystone(1.1) time for 50000 passes = 0.027996 This machine benchmarks at 1.78597e+06 pystones/second pystone.main() Pystone(1.1) time for 50000 passes = 0.028995 This machine benchmarks at 1.72444e+06 pystones/second
Skip

Hi Skip, On Fri, Jun 28, 2013 at 9:30 PM, Skip Montanaro <skip@pobox.com> wrote:
SuSE has a somewhat different packaging of curses than do other installation. It'd be ideal if pypy-c would be immune to that, but so lacking I did:
I tried yesterday to have it refuse to translate when some dependencies are missing (or just not found, like in this case curses). I also fixed yesterday a bug that prevents the prompt from showing up if curses is missing --- it would just try to fall back to the cffi version of curses, which would fail "spectacularly" like in your example. It seems you've been bitten by the same issues reported yesterday :-) A bientôt, Armin.
participants (3)
-
Armin Rigo
-
Skip Montanaro
-
wlavrijsen@lbl.gov