From python: import fltk fails

Bug #779340 reported by Andy Fraser
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pyfltk (Debian)
Fix Released
Unknown
pyfltk (Ubuntu)
Fix Released
Undecided
Unassigned
Natty
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-fltk

After upgrading to 11.04, running the following from python or ipython fails:

fix in branch https://code.launchpad.net/~jtaylor/ubuntu/natty/pyfltk/fix-779340

TEST CASE:
>>>import fltk

expected result:
import succeeds
real result:
import fails with undefined symbol error

Version of python-fltk: 1.1.5-3

Here is the error message:
In [2]: import fltk
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)

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

/usr/lib/python2.7/dist-packages/fltk/__init__.py in <module>()
     29 fp.close()
     30 return _mod
---> 31 _fltk = swig_import_helper()
     32 del swig_import_helper
     33 else:

/usr/lib/python2.7/dist-packages/fltk/__init__.py in swig_import_helper()
     25 if fp is not None:
     26 try:
---> 27 _mod = imp.load_module('_fltk', fp, pathname, description)
     28 finally:
     29 fp.close()

ImportError: /usr/lib/python2.7/dist-packages/fltk/_fltk.so: undefined symbol: glEnd

In [3]:

Related branches

Revision history for this message
Julian Taylor (jtaylor) wrote :

linkage against against openGL seems to be missing. Probably due to the new default linker flag --no-copy-dt-needed
As this flag change has been reverted for natty a simple rebuild fixes the problem.

For oneiric where its default again it needs a fix.

Revision history for this message
Andy Fraser (andy-fraserphysics) wrote :

How should I fix the problem on my system?

Should I wait for an update of 11.4? IE, is it likely that someone else will take care of it for me? Or should I implement the fix that Julian suggests myself? I have not built a package on my own in many years.

Please pardon me if this is an inappropriate post, and let me know.

Thanks

Revision history for this message
Julian Taylor (jtaylor) wrote :

attached debdiff for oneiric.
natty only needs a no change rebuild SRU but this patch could also be applied there in case someone wants to rebuild it with --as-needed.

Description: Fix build with opengl
 builds with fltk_config --use-gl but does not set doOpenGL to True in setup.py due to a bug
 so it uses opengl stubs which lead to --as-needed removing the opengl linkage

description: updated
Revision history for this message
Dave Walker (davewalker) wrote :

Hi Julian,

Thanks for the patch/debdiff, which looks really good! As this introduces a new delta between Ubuntu and Debian, i'd quite like to give the Debian Maintainer a chance to look at the patch first in Debian, before sponsoring it into Ubuntu.

Thanks!

Revision history for this message
Charlie_Smotherman (cjsmo) wrote :

Julian,

Thanks for the patch. I am uploading to ubuntu a fixed version of pyfltk. IMHO it will be ok to carry this small delta until I can get your patch into debian.

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

This bug was fixed in the package pyfltk - 1.1.5-3ubuntu1

---------------
pyfltk (1.1.5-3ubuntu1) oneiric; urgency=low

  * Added debian/patches/opengl_fix. This corrects the inability to import pyfltk when
     compiled with the new g++ linker. Thx Julian Taylor for the patch. LP: #779340
 -- Charlie Smotherman <email address hidden> Tue, 17 May 2011 06:24:21 -0500

Changed in pyfltk (Ubuntu):
status: New → Fix Released
Julian Taylor (jtaylor)
description: updated
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

SRU Request:

Impact: pyfltk is currently broken in natty. A fix has been uploaded to Oneiric. This SRU contains a minimal patch to fix the issue.

See bug description for instructions on reproducing.

Thanks!

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Accepted pyfltk into natty-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!

Changed in pyfltk (Ubuntu Natty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Julian Taylor (jtaylor) wrote :

the issue is solved by the update in proposed and the some examples installed in /usr/share/pyshared/fltk/test/ which I tested work well

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Julian thanks for verifying it. We need somebody who didn't develop the fix to try the proposed package and verify that it works.

Andy, I know you were looking for a way to get the fix onto your system. If you follow the instructions at https://wiki.ubuntu.com/Testing/EnableProposed , you should be able to test if this bug is fixed.

Revision history for this message
Andy Fraser (andy-fraserphysics) wrote : Re: [Bug 779340] Re: From python: import fltk fails

>>>>> "C" == Clint Byrum <email address hidden> writes:

    C> Julian thanks for verifying it. We need somebody who didn't
    C> develop the fix to try the proposed package and verify that it
    C> works.

    C> Andy, I know you were looking for a way to get the fix onto your
    C> system. If you follow the instructions at
    C> https://wiki.ubuntu.com/Testing/EnableProposed , you should be
    C> able to test if this bug is fixed.

I have forgotten how, but a while ago I hacked some work-around.
Looking at my sole 11.04 system, I see that I built and installed an
ubuntu source package on May 19. I looked at
https://wiki.ubuntu.com/Testing/EnableProposed and I don't see how the
pinning will interact with my source package. Today I am packing for a
trip that will take me off of the net for couple of weeks. If you want
me to verify the fix, I'll look at it when I get back.

Andy

Changed in pyfltk (Debian):
status: Unknown → Fix Released
Revision history for this message
Stéphane Fillod (fillods) wrote :

Good to see this bug was already been taken care of.

I've experienced it on Natty. Following Clint's direction, I've enabled natty-proposed,
and I can confirm you the bug is resolved with python-fltk 1.1.5-3ubuntu0.1 on my system.

Thanks guys.

PS: I'll come bug you later in a separate RFP for python-fltk1.3.

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 pyfltk - 1.1.5-3ubuntu0.1

---------------
pyfltk (1.1.5-3ubuntu0.1) natty-proposed; urgency=low

  * Added debian/patches/opengl_fix. This corrects the inability to import
    pyfltk when compiled with the new g++ linker (LP: #779340)
 -- Julian Taylor <email address hidden> Mon, 18 Jul 2011 00:41:21 +0200

Changed in pyfltk (Ubuntu Natty):
status: Fix Committed → Fix Released
tags: added: testcase
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.