After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698214 - can't find libpython on certain 64-bit systems
can't find libpython on certain 64-bit systems
Status: RESOLVED FIXED
Product: nautilus-python
Classification: Other
Component: general
1.1
Other Linux
: Normal normal
: v1.2
Assigned To: Adam Plumb
Adam Plumb
Depends on:
Blocks:
 
 
Reported: 2013-04-17 16:07 UTC by Adam Dingle
Modified: 2017-12-28 13:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adam Dingle 2013-04-17 16:07:28 UTC
On certain 64-bit systems such as Ubuntu, if you build nautilus-python from source, install it and then run Nautilus, it will fail with this error:

===
(nautilus:16635): Nautilus-Python-WARNING **: g_module_open libpython failed: /usr/lib/libpython2.7.so.1.0: cannot open shared object file: No such file or directory
ImportError: could not import gobject (error was: '/usr/lib/x86_64-linux-gnu/libpyglib-gi-2.0-python2.7.so.0: undefined symbol: _Py_ZeroStruct')
===

nautilus-python is looking for libpython2.7.so in /usr/lib, but on this system it lives in /usr/lib/x86_64-linux-gnu/. The nautilus-python sources have a macro in m4/python.m4 which attempts to detect a 64-bit library directory at build time, but it fails on Ubuntu because it only recognizes such directories if their names end in "lib64".

At the very least, it would be nice to check at configure time whether we've correctly guessed the Python library location; we could do this by looking for the libpython shared library there.  A more robust solution would be to extend python.m4 to recognize any 64-bit library directory containing "x86_64".

I also reported this downstream at

https://bugs.launchpad.net/ubuntu/+source/nautilus-python/+bug/1170017
Comment 1 Adam Dingle 2013-04-17 16:20:03 UTC
You can work around this by configuring like this:

$ ./configure PYTHON_LIB_LOC=/usr/lib/x86_64-linux-gnu
Comment 2 Adam Plumb 2017-12-28 13:47:38 UTC
This should be fixed on master in commit bb5eace2e73818318a5f6fb05d571edcba736942.