[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:


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"):


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

[oberstet at tvd_build_txpypy ~]$ which 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>

More information about the pypy-issue mailing list