Expects to find libpython2.4.so, should look for libpython2.4.so.1

Bug #44704 reported by Jeff Bailey
60
Affects Status Importance Assigned to Milestone
nautilus-python
Fix Released
Critical
nautilus-python (Debian)
Fix Released
Unknown
nautilus-python (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Debian and Ubuntu don't ship the .so files in the main package, they only ship the target libary (.so.1). So when the python library is initialised:

        libpython = g_module_open("libpython" PYTHON_VERSION "." G_MODULE_SUFFIX, 0);

in nautilus_python_init_python, it doesn't find it. We can't just add the '.1' to the end, as this would break windows installs.

The workaround for now is to install python2.4-dev as a dependancy, but that shouldn't be necessary either.

Tks,
Jeff Bailey

Jeff Bailey (jbailey)
Changed in nautilus-python:
assignee: nobody → jbailey
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I can reproduce this. Without python2.4-dev installed, nautilus reports (on the terminal):
(nautilus:30244): Nautilus-Python-WARNING **: g_module_open libpython failed: libpython2.4.so: kan gedeeld objektbestand niet openen: Onbekend bestand of map (can't open shared object file: Unknown file or directory)
ImportError: /usr/lib/python2.4/site-packages/gtk-2.0/gobject.so: undefined symbol: _Py_TrueStruct

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

See my previous comment.

Changed in nautilus-python:
status: Unconfirmed → Confirmed
Revision history for this message
Dennis Kaarsemaker (dennis) wrote : Re: [Bug 44704] Expects to find libpython2.4.so, should look for libpython2.4.so.1

> in nautilus_python_init_python, it doesn't find it. We can't just add
> the '.1' to the end, as this would break windows installs.

Since when do Debian/Ubuntu packages have to be installed on Windows?
I'd say that a patch in debian/patches to add this .1 is perfectly
reasonable.

Revision history for this message
Jeff Bailey (jbailey) wrote :

True, although if we can come up with a patch that upstream will accept, our lives will be much easier. I'll give it a day and then put in the hack around.

Revision history for this message
Johan Dahlin (jdahlin-deactivatedaccount) wrote :
Revision history for this message
Jeff Bailey (jbailey) wrote :

Ah, I didn't know python-nautilus was in gnome's bugzilla, cool.

In that backtrace, it shows that it's already found the .so.1 file. That doesn't seem to be the problem that we're having.

I'll look through the duplicate bug reports there to make sure, though.

Jeff Bailey (jbailey)
Changed in nautilus-python:
assignee: jbailey → nobody
Revision history for this message
dimitri (dimitri-vanlanduyt) wrote :

This still occurs in Feisty. I solved it by linking /usr/lib/python2.5.so.1 to /usr/lib/python2.5.so, and then the python extensions work in nautilus. Not sure if this a python packaging problem or a nautilus-python problem.

Revision history for this message
Jonathan Rogers (jonner) wrote :

This also still occurs in Gutsy. I also solved it by manually symlinking /usr/lib/python2.5.so.1 to /usr/lib/python2.5.so. However, so far, the extensions aren't working for me. The interpreter seems to be compiling them, since .pyc files appear and there are no error messages in the terminal, but they also have no effect.

Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

Why importance is still low? We have useful programs (like the nautilus bzr extension) which we can't even start, this does not look like a minor issue.

Revision history for this message
Martin Albisetti (beuno) wrote :

nautilus-bzr is suffering heavily from this bug, is there any change it can get some attention?

Changed in nautilus-python:
status: Unknown → New
Revision history for this message
James Westby (james-w) wrote :

Hi,

Here's a patch for this issue.

It uses the workaround of just adding ".1", which isn't great,
but which should be ok for Hardy.

Also it pulls in the patch from the upstream bug to update
the definitions so that they are up-to-date with current
nautilus.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Hi,

Here's a debdiff that also removes debian/dirs to stop
it from creating the obsolete python dir for the old
ABI nautilus-extension.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Hi,

Another debdiff that installs a python dir for the new ABI,
rather than installing none.

Thanks,

James

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus-python - 0.5.0-0ubuntu2

---------------
nautilus-python (0.5.0-0ubuntu2) hardy; urgency=low

  * Add the ".1" to the module name of python that we try and g_module_open
    so that it works without having the python -dev package installed.
    This is fragile as it is hardcoded, and wouldn't be accepted upstream
    as it would break on Windows. However it will work ok for Hardy,
    as it is a more controlled environment. (LP: #44704)
  * Take the patch from http://bugzilla.gnome.org/show_bug.cgi?id=518824
    to catch nautilus-python up with nautilus changes.
  * Change debian/dirs so that it uses /usr/lib/nautilus/extensions-2.0/python
    instead of the old /usr/lib/nautilus/extensions-1.0/python.

 -- James Westby <email address hidden> Mon, 31 Mar 2008 11:32:08 +0100

Changed in nautilus-python:
status: Confirmed → Fix Released
Changed in nautilus-python:
status: New → Fix Released
Changed in nautilus-python:
status: Unknown → New
Changed in nautilus-python:
status: New → Fix Released
Changed in nautilus-python:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.