On 18/12/13 14:12, Sebastian Ramacher wrote:
> On 2013-12-18 13:56:57, Daniel Pocock wrote:
>> Package: python-ldap
>> Version: 2.4.10-1
>> Severity: important
>>
>> When trying to use python-ldap from an embedded python inside another
>> application, I get errors such as this:
>>
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/dist-packages/ldap/__init__.py", line 22, in
>> <module>
>>     import _ldap
>> ImportError: /usr/lib/python2.7/dist-packages/_ldap.so: undefined
>> symbol: PyExc_SystemError
>>
>>
>> Looking at _ldap.so with ldd, I notice it is not linked to Python:
>>
>>    ldd /usr/lib/python2.7/dist-packages/_ldap.so | grep py
>>
>> As a hack, I add an explicit
>>
>>    dlopen("libpython2.7.so", RTLD_LAZY |RTLD_GLOBAL);
>>
>> into my own code (a C++ app embedding Python) before Py_Initialize and
>> then everything works nicely - but this is a hack and probably needs to
>> be fixed by linking _ldap.so with -lpython2.7
> No. Extensions modules do not link against libpythonX.Y in Debian.
> Please check with Python Policy 2.1.
>
> It looks like the embedding application is built incorrectly.

Is there any documentation on how such applications should be built/linked?

I've found various discussion threads but many of them just contain
things that look like hacks and that left me feeling that _ldap.so was
not correct


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to