[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: python-enchant is not importable in python 2.6 on armhf. Any idea which package is at fault?



        Hey

On Sun, Dec 25, 2011, peter green wrote:
> While investigating the build failure of scim-python on armhf I
> discovered that importing enchant with python 2.6 fails on armhf
> 
> root@debian:/# python2.6 -c "import enchant"
[...]
> ImportError: enchant C library not found

 We faced this in the Ubuntu armhf port as well; the bug is described in
 details there:
    https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/898172

 Essentially ctypes' "find_library" is very wrong and should not be used
 (it tries to emulate ld.so's search behavior but does so with many
 scary shortcuts...).  find_library breaks on armhf because its ldconfig
 output parsing isn't ready for the ",hard-float" suffix on libraries in
 the cache.

 Not only is find_library poorly implemented, but it also encourages
 upstreams to try loading *any* SONAME from a library (in fact the first
 one which comes in the ldconfig output), and with *whatever*
 architecture ABI.  So if you have the 32-bits libenchant12, 32-bits
 libenchant13, 64-bits libenchant12 and 64-bits libenchant13, and you
 find_library("enchant"), any of these libraries might be loaded
 depending on the ldconfig output ordering...

 I've opened an upstream bug (see the Launchpad meta-bug) and AFAIK the
 python2.x patches will be uploaded to Debian with next uploads.

 It would be best if we would patch python programs and modules to stop
 using find_library.

    Cheers,
-- 
Loïc Minier


Reply to: