[SRU]PythonMagick is not usable because of undefined symbols

Bug #345208 reported by Stepan Bakshaev
54
This bug affects 5 people
Affects Status Importance Assigned to Milestone
pythonmagick (Ubuntu)
Fix Released
Medium
Unassigned
Jaunty
Fix Released
Undecided
Unassigned

Bug Description

Impact of the bug:
The pythonMagick package is unusable as the python objects fail to load (missing functions)

Solution in Development branch:
Newer version of pythonmagick (0.9.0-1) has been or will be synced from Debian

Solution in current version (Jaunty):
Patch the Makefile to fix the incorrect linked libraries (see attached debdiff)

TEST CASE:
- run ipython
- within ipython, load PythonMagick. The output should be the following:
In [1]: import PythonMagick
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)

/home/vdejager/<ipython console> in <module>()

/var/lib/python-support/python2.6/PythonMagick/__init__.py in <module>()
      2
      3 class Image(_PythonMagick.Image):
      4 pass
      5
      6 class Blob(_PythonMagick.Blob):

ImportError: /var/lib/python-support/python2.6/PythonMagick/_PythonMagick.so: undefined symbol: _ZTIN5boost6python15instance_holderE

Risk of regressions:
None as the package is not usable in the actual state.

Revision history for this message
Philip Muškovac (yofel) wrote :

confirmed on Jaunty alpha6 x86_64

Changed in pythonmagick:
status: New → Confirmed
Revision history for this message
Oliver Marks (oly) wrote :

same problem jaunty x86_32

Revision history for this message
Michael Bienia (geser) wrote :

I tried a rebuild of the package (after modifying debian/rules to point to the python2.6 includes) but it failed:

make[3]: Entering directory `/tmp/buildd/pythonmagick-0.8'
/bin/bash ./libtool --tag=CXX --mode=link g++ -g -O2 -g -Wall -O2 -DBOOST_PYTHON_DYNAMIC_LIB -avoid-version -module -L/usr/lib -lMagick++ -lMagickCore -l -Wl,-Bsymbolic-functions -o _PythonMagick.la -rpath /usr/lib/python2.6/dist-packages/PythonMagick pythonmagick_src/libpymagick.la helpers_src/libhelper.la
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtbeginS.o -Wl,--whole-archive pythonmagick_src/.libs/libpymagick.a helpers_src/.libs/libhelper.a -Wl,--no-whole-archive -L/usr/lib /usr/lib/libMagick++.so -L/usr/lib/X11 /usr/lib/libMagickWand.so /usr/lib/libMagickCore.so /usr/lib/liblcms.so /usr/lib/libtiff.so /usr/lib/libfreetype.so /usr/lib/libjpeg.so -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lgomp -lpthread /usr/lib/libltdl.so -ldl -l -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.3.3/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crtn.o -Wl,-Bsymbolic-functions -Wl,-soname -Wl,_PythonMagick.so -o .libs/_PythonMagick.so
/usr/bin/ld: cannot find -l-L/usr/lib/gcc/x86_64-linux-gnu/4.3.3
collect2: ld returned 1 exit status
make[3]: *** [_PythonMagick.la] Error 1

Changed in pythonmagick (Ubuntu):
importance: Undecided → Medium
Changed in pythonmagick:
assignee: nobody → fabricesp
status: Confirmed → In Progress
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :
Changed in pythonmagick:
assignee: fabricesp → nobody
status: In Progress → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pythonmagick - 0.8-0ubuntu2

---------------
pythonmagick (0.8-0ubuntu2) jaunty; urgency=low

  * debian/control: added XS-Python-Version: all
  * debian/rules: updated CPPFLAGS to include python2.6
  * debian/patches/python2.6.diff: patch configure to take into account
    python2.6 (LP: #345208)

 -- Fabrice Coutadeur <email address hidden> Fri, 27 Mar 2009 18:48:21 +0000

Changed in pythonmagick:
status: Confirmed → Fix Released
Revision history for this message
Stepan Bakshaev (step2back) wrote :

it's useless

In [1]: import PythonMagick
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)

/home/stepan/<ipython console> in <module>()

/var/lib/python-support/python2.6/PythonMagick/__init__.py in <module>()
      2
      3 class Image(_PythonMagick.Image):
      4 pass
      5
      6 class Blob(_PythonMagick.Blob):

ImportError: /var/lib/python-support/python2.6/PythonMagick/_PythonMagick.so: undefined symbol: _ZTIN5boost6python15instance_holderE

Revision history for this message
Stepan Bakshaev (step2back) wrote :

PythonMagick still "broken"

Changed in pythonmagick:
status: Fix Released → Incomplete
Revision history for this message
Oliver Marks (oly) wrote :

Same problem here, i did find this for an older version but same problem may help who ever fixes this to track it down quicker.

http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=9744&start=0&st=0&sk=t&sd=a

Changed in pythonmagick (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
VidJa (vidja-hunter) wrote :

Same problem here. I went back to 8.04. This has to be fixed before a new lts version

vidja@webserver:~$ ipython
/var/lib/python-support/python2.6/IPython/Magic.py:38: DeprecationWarning: the sets module is deprecated from sets import Set
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import PythonMagick
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)

/home/vdejager/<ipython console> in <module>()

/var/lib/python-support/python2.6/PythonMagick/__init__.py in <module>()
      2
      3 class Image(_PythonMagick.Image):
      4 pass
      5
      6 class Blob(_PythonMagick.Blob):

ImportError: /var/lib/python-support/python2.6/PythonMagick/_PythonMagick.so: undefined symbol: _ZTIN5boost6python15instance_holderE

Revision history for this message
mistr (mstrecke) wrote :

Same problem here. The bug is present in the 32 and 64 bit version of Jaunty.

Revision history for this message
Tobias McNulty (tmcnulty1982) wrote :

same problem here. running 32-bit version of jaunty

Revision history for this message
Martijn Bastiaan (hmb1) wrote :

Confirmed on Jaunty 64

Revision history for this message
VidJa (vidja-hunter) wrote : Re: [Bug 345208] Re: Broken package

As a fix: I compiled PythonMagick 0.9. It works, but of course the package
is out of the update cycles.

On Fri, May 22, 2009 at 8:09 PM, Martijn Bastiaan <
<email address hidden>> wrote:

> Confirmed on Jaunty 64
>
> --
> Broken package
> https://bugs.launchpad.net/bugs/345208
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “pythonmagick” source package in Ubuntu: Confirmed
>
> Bug description:
> $ sudo apt-get install python-pythonmagick
> [sudo] password for stepan:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
> The following information may help to resolve the situation:
>
> The following packages have unmet dependencies:
> python-pythonmagick: Depends: python (< 2.6) but 2.6.1-0ubuntu3 is to be
> installed
> E: Broken packages
>

Revision history for this message
Andrew Tipton (kiwidrew) wrote : Re: Broken package

This issue has now gone unfixed for nearly three months. I can confirm that the latest python-pythonmagick package (0.8-0ubuntu2) on Jaunty 64-bit still reports an undefined symbol "_ZTIN5boost6python15instance_holderE".

Is there something blocking this from being fixed? Is there anything else that can be done to assist the maintainer?

Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

A patch exists in 0.9.0. I will try to adapt it to fix this problem.

Changed in pythonmagick (Ubuntu):
assignee: nobody → fabrice_sp (fabricesp)
status: Confirmed → In Progress
Revision history for this message
Andrew Tipton (kiwidrew) wrote :

The issue stems from libboost_python.so not being linked as part of the _PythonMagick.so build process. Starting Python like:

LD_PRELOAD=/usr/lib/libboost_python.so python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PythonMagick
>>>

works fine. The configure script seems to skip adding -lboost_python to the LDFLAGS because when checking for libboost_python, the test program that it compiles doesn't include -lpython2.6 -- and libboost_python doesn't link to libpython2.6 already. So lots of undefined symbols, the test program fails, and the configure script decides libboost_python doesn't exist.

(But it's a twisty maze of buildscripts and so I ultimately didn't figure out what magic line needed changed...)

Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Hi,

That's exactly what I'm trying to do: either fix the libboost detection or force the link with libboost_python

Thanks,

Fabrice

Revision history for this message
Fabrice Coutadeur (fabricesp) wrote : Re: [SRU]PythonMagick is not usable because of missing functions

Debdiff with the fix:
- debian/rules: added LDFLAGS to link with python2.6 and fix this way the libboost_python library detection
- debian/patches/libboost-python_link_fix.diff: fix Makefile.in to use the correct variable for libboost_python library in _PythonMagick_la_LDFLAGS

description: updated
summary: - Broken package
+ [SRU]PythonMagick is not usable because of missing functions
summary: - [SRU]PythonMagick is not usable because of missing functions
+ [SRU]PythonMagick is not usable because of undefined symbols
Changed in pythonmagick (Ubuntu):
assignee: fabrice_sp (fabricesp) → nobody
status: In Progress → Confirmed
Revision history for this message
Grzegorz "McCartney" Oledzki (grzegon) wrote :

I confirm the problem disappeared after upgrading to Version: 0.9.1-1 from Karmic.

Revision history for this message
Joubert (joubert-joubster) wrote :

Confirmed that pythonmagick_0.8-0ubuntu3.debdiff by fabrice_sp (post #18 above) works. I'm running Jaunty AMD64.

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

motu-sru ACK, please upload the debdiff (comment #18) uploaded by fabrice_sp.

Changed in pythonmagick (Ubuntu):
status: Confirmed → Fix Released
Changed in pythonmagick (Ubuntu Jaunty):
status: New → Confirmed
Revision history for this message
Benjamin Drung (bdrung) wrote :

uploading, unsubscribing sponsors

Changed in pythonmagick (Ubuntu Jaunty):
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted pythonmagick into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Uroš Gaber (uros-gaber) wrote :

I have ceramic ubuntu and i also get:
/var/lib/python-support/python2.6/PythonMagick/_PythonMagick.so: undefined symbol: _ZTIN5boost6python15instance_holderE

Revision history for this message
Uroš Gaber (uros-gaber) wrote :

No i wrote whrong version. This error happens on ubuntu server 9.04.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

I can confirm, that the version from jaunty-proposed fixes the problem.

Using the version from jaunty-release:
root@miraculix:/# python -c 'import PythonMagick'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/var/lib/python-support/python2.6/PythonMagick/__init__.py", line 1, in <module>
    import _PythonMagick
ImportError: /var/lib/python-support/python2.6/PythonMagick/_PythonMagick.so: undefined symbol: _ZTIN5boost6python15instance_holderE

And using the version from jaunty-proposed this (as expected) produces no output:
root@miraculix:/# python -c 'import PythonMagick'

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pythonmagick - 0.8-0ubuntu2.1

---------------
pythonmagick (0.8-0ubuntu2.1) jaunty-proposed; urgency=low

  * debian/rules: added LDFLAGS to link with python2.6 and fix this way the
    libboost_python library detection (LP: #345208)
  * debian/patches/libboost-python_link_fix.diff: fix Makefile.in to use the
    correct variable for libboost_python library in _PythonMagick_la_LDFLAGS

 -- Fabrice Coutadeur <email address hidden> Wed, 17 Jun 2009 06:27:17 +0200

Changed in pythonmagick (Ubuntu Jaunty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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