[pypy-issue] [issue1641] FreeBSD and dlopen: not possible with statically linked binaries

Tobias Oberstein tracker at bugs.pypy.org
Thu Nov 21 09:22:17 CET 2013


Tobias Oberstein <tobias.oberstein at gmail.com> added the comment:

The patch has been backed out, since it broke other platforms and didn't solve
the issue on FreeBSD:

https://bitbucket.org/pypy/pypy/commits/55b6a37713d964b69c6fd222f4b574a58cc1f6f7

It would be great if we could find a solution: the issue ranks number one in
terms of resulting fails on FreeBSD.

Here is a recent log (grep for "libm.so"):

http://buildbot.pypy.org/builders/pypy-c-jit-freebsd-9-x86-64/builds/21/steps/shell_2/logs/pytestLog

Just for assurance, loading libs via CFFI does indeed work in the final produced
PyPy executable:

[oberstet at tvd_build_txpypy ~]$ which pypy
/home/oberstet/pypy-c-jit-68238-4369d6c2378e-freebsd64/bin/pypy
[oberstet at tvd_build_txpypy ~]$ pypy
Python 2.7.3 (4369d6c2378e, Nov 19 2013, 23:00:19)
[PyPy 2.3.0-alpha0 with GCC 4.2.1 Compatible FreeBSD Clang 3.3
(tags/RELEASE_33/final 183502)] on freebsd9
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``<fijal> I love pypy''
>>>> from cffi import FFI
>>>> ffi = FFI()
>>>> ffi.dlopen('libm.so')
<cffi.api.FFILibrary_libm.so object at 0x0000000804b50138>
>>>> import _rawffi
>>>> _rawffi.CDLL('libm.so')
<CDLL object at 0x0000000804e3cb20>

----------
status: resolved -> chatting

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1641>
________________________________________


More information about the pypy-issue mailing list