PyPy cannot be translated on OS X 10.11 (El Capitan)
Created originally on Bitbucket by jafd (Yaroslav Fedevych)
No matter if I use a fresh install or upgrade from Yosemite, with a Homebrew-installed OpenSSL, I always get this error upon trying to translate PyPy.
[platform:execute] clang -arch x86_64 -c -O3 -fomit-frame-pointer -mmacosx-version-min=10.5 -mdynamic-no-pic /var/folders/qr/n0s9dqcs1yj5vcb_5fbfphc80000gn/T/usession-default-5/platcheck_27.c -o /var/folders/qr/n0s9dqcs1yj5vcb_5fbfphc80000gn/T/usession-default-5/platcheck_27.o
[translation:info] Error:
[translation:info] File "/Users/jafd/git/pypy/rpython/translator/goal/translate.py", line 284, in main
[translation:info] default_goal='compile')
[translation:info] File "/Users/jafd/git/pypy/rpython/translator/driver.py", line 564, in from_targetspec
[translation:info] spec = target(driver, args)
[translation:info] File "targetpypystandalone.py", line 301, in target
[translation:info] return self.get_entry_point(config)
[translation:info] File "targetpypystandalone.py", line 352, in get_entry_point
[translation:info] space = make_objspace(config)
[translation:info] File "/Users/jafd/git/pypy/pypy/tool/option.py", line 35, in make_objspace
[translation:info] return Space(config)
[translation:info] File "/Users/jafd/git/pypy/pypy/interpreter/baseobjspace.py", line 397, in __init__
[translation:info] self.initialize()
[translation:info] File "/Users/jafd/git/pypy/pypy/objspace/std/objspace.py", line 99, in initialize
[translation:info] self.make_builtins()
[translation:info] File "/Users/jafd/git/pypy/pypy/interpreter/baseobjspace.py", line 588, in make_builtins
[translation:info] self.install_mixedmodule(mixedname, installed_builtin_modules)
[translation:info] File "/Users/jafd/git/pypy/pypy/interpreter/baseobjspace.py", line 619, in install_mixedmodule
[translation:info] modname = self.setbuiltinmodule(mixedname)
[translation:info] File "/Users/jafd/git/pypy/pypy/interpreter/baseobjspace.py", line 459, in setbuiltinmodule
[translation:info] None, None, ["Module"]).Module
[translation:info] File "/Users/jafd/git/pypy/pypy/module/_hashlib/__init__.py", line 2, in <module>
[translation:info] from pypy.module._hashlib.interp_hashlib import algorithms, fetch_names
[translation:info] File "/Users/jafd/git/pypy/pypy/module/_hashlib/interp_hashlib.py", line 3, in <module>
[translation:info] from rpython.rlib import rgc, ropenssl
[translation:info] File "/Users/jafd/git/pypy/rpython/rlib/ropenssl.py", line 51, in <module>
[translation:info] include_dir='inc32', library_dir='out32'),
[translation:info] File "/Users/jafd/git/pypy/rpython/rtyper/tool/rffi_platform.py", line 838, in configure_external_library
[translation:info] raise last_error
[translation:ERROR] CompilationError: CompilationError(err="""
[translation:ERROR] /var/folders/qr/n0s9dqcs1yj5vcb_5fbfphc80000gn/T/usession-default-5/platcheck_27.c:79:10: fatal error: 'openssl/ssl.h' file not found
[translation:ERROR] #include <openssl/ssl.h>
[translation:ERROR] ^
[translation:ERROR] 1 error generated.
[translation:ERROR] """)
[translation] start debugger...
> /Users/jafd/git/pypy/rpython/rtyper/tool/rffi_platform.py(838)configure_external_library()
-> raise last_error
The backtrace from debugger:
/Users/jafd/git/pypy/rpython/bin/rpython(20)<module>()
-> main()
/Users/jafd/git/pypy/rpython/translator/goal/translate.py(325)main()
-> debug(True)
/Users/jafd/git/pypy/rpython/translator/driver.py(564)from_targetspec()
-> spec = target(driver, args)
/Users/jafd/git/pypy/pypy/goal/targetpypystandalone.py(301)target()
-> return self.get_entry_point(config)
/Users/jafd/git/pypy/pypy/goal/targetpypystandalone.py(352)get_entry_point()
-> space = make_objspace(config)
/Users/jafd/git/pypy/pypy/tool/option.py(35)make_objspace()
-> return Space(config)
/Users/jafd/git/pypy/pypy/interpreter/baseobjspace.py(397)__init__()
-> self.initialize()
/Users/jafd/git/pypy/pypy/objspace/std/objspace.py(99)initialize()
-> self.make_builtins()
/Users/jafd/git/pypy/pypy/interpreter/baseobjspace.py(588)make_builtins()
-> self.install_mixedmodule(mixedname, installed_builtin_modules)
/Users/jafd/git/pypy/pypy/interpreter/baseobjspace.py(619)install_mixedmodule()
-> modname = self.setbuiltinmodule(mixedname)
/Users/jafd/git/pypy/pypy/interpreter/baseobjspace.py(459)setbuiltinmodule()
-> None, None, ["Module"]).Module
/Users/jafd/git/pypy/pypy/module/_hashlib/__init__.py(2)<module>()
-> from pypy.module._hashlib.interp_hashlib import algorithms, fetch_names
/Users/jafd/git/pypy/pypy/module/_hashlib/interp_hashlib.py(3)<module>()
-> from rpython.rlib import rgc, ropenssl
/Users/jafd/git/pypy/rpython/rlib/ropenssl.py(51)<module>()
-> include_dir='inc32', library_dir='out32'),
> /Users/jafd/git/pypy/rpython/rtyper/tool/rffi_platform.py(838)configure_external_library()
-> raise last_error
The system no longer ships OpenSSL in any form, so the include files are not available from vendor.
So far, I have tried:
- Setting $PKG_CONFIG_PATH
- Setting $CFLAGS, $CPPFLAGS, $LDFLAGS
- Using CPython and not a nightly build of PyPy
The crash is still consistent and persistent, like a Kirby salesman desperate to sell you a vacuum cleaner.