On 22.10.2017 22:15, Karsten Hilbert wrote:
> On Sat, Oct 21, 2017 at 07:10:31PM +0200, M.-A. Lemburg wrote:
> 
>>> Running a debug build of py27 gave me a first lead: this
>>> Debian system (Testing, upgraded all the way from various
>>> releases ago) carries an incompatible mxDateTime which I'll
>>> take care of.
>>>
>>>     *** You don't have the (right) mxDateTime binaries installed !
>>>     Traceback (most recent call last):
>>>       File "./bootstrap_gm_db_system.py", line 87, in <module>
>>>         from Gnumed.pycommon import gmCfg2, gmPsql, gmPG2, gmTools, gmI18N
>>>       File 
>>> "/home/ncq/Projekte/gm-git/gnumed/gnumed/Gnumed/pycommon/gmPG2.py", line 
>>> 34, in <module>
>>>         from Gnumed.pycommon import gmDateTime
>>>       File 
>>> "/home/ncq/Projekte/gm-git/gnumed/gnumed/Gnumed/pycommon/gmDateTime.py", 
>>> line 52, in <module>
>>>         import mx.DateTime as mxDT
>>>       File "/usr/lib/python2.7/dist-packages/mx/DateTime/__init__.py", line 
>>> 8, in <module>
>>>         from DateTime import *
>>>       File "/usr/lib/python2.7/dist-packages/mx/DateTime/DateTime.py", line 
>>> 9, in <module>
>>>         from mxDateTime import *
>>>       File 
>>> "/usr/lib/python2.7/dist-packages/mx/DateTime/mxDateTime/__init__.py", line 
>>> 13, in <module>
>>>         raise ImportError, why
>>>     ImportError: 
>>> /usr/lib/python2.7/dist-packages/mx/DateTime/mxDateTime/mxDateTime.so: 
>>> undefined symbol: Py_InitModule4
>>
>> This error suggests that you have 32- and 64-bit versions of
>> Python and mxDateTime mixed in your installation.
>>
>> Py_InitModule4 is only available in the 32-bit build of
>> Python. With the 64-bit build, it's called Py_InitModule4_64.
>>
>> Since you're getting the same error from faulthandler,
>> this is where I'd start to investigate.
>>
>> "nm" will list all exported and required symbols. As first step,
>> you should probably check the python binary for its symbols and
>> see whether it exports Py_InitModule* symbols.
> 
> Thanks for your input !
> 
> The python2.7-dbg build is 32 bits:
> 
>       root@hermes:~# nm /usr/bin/python2.7-dbg | grep Py_InitM
>       00155b9f T Py_InitModule4TraceRefs
> 
> 
>       python2.7-dbg:
>         Installiert:           2.7.14-2
>         Installationskandidat: 2.7.14-2
>         Versionstabelle:
>        *** 2.7.14-2 500
>               500 http://httpredir.debian.org/debian unstable/main i386 
> Packages
>               100 /var/lib/dpkg/status
>            2.7.13-2 990
>               500 http://httpredir.debian.org/debian stretch/main i386 
> Packages
>               990 http://httpredir.debian.org/debian buster/main i386 Packages
> 
> The python2.7 build (no -dbg) does not have symbols.
> 
> mxDateTime really should be 32 bits, too:
> 
>       python-egenix-mxdatetime:
>         Installiert:           3.2.9-1
>         Installationskandidat: 3.2.9-1
>         Versionstabelle:
>        *** 3.2.9-1 990
>               500 http://httpredir.debian.org/debian stretch/main i386 
> Packages
>               990 http://httpredir.debian.org/debian buster/main i386 Packages
>               500 http://httpredir.debian.org/debian unstable/main i386 
> Packages
>               100 /var/lib/dpkg/status
> 
> Let me check the .so file:
> 
>       root@hermes:~# nm 
> /usr/lib/python2.7/dist-packages/mx/DateTime/mxDateTime/mxDateTime_d.so  | 
> grep Py_InitM
>                U Py_InitModule4TraceRefs
> 
> It seems it is - hm ...

Could you check whether you have similar import errors with
other modules that have C extensions ? E.g. lxml.

What you're seeing appears to be a compilation problem
with Python 2.7.14 on Debian. The executable doesn't appear
to export its symbols to the .so files, or only some of them.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Experts
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> Python Database Interfaces ...           http://products.egenix.com/
>>> Plone/Zope Database Interfaces ...           http://zope.egenix.com/
________________________________________________________________________

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to