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 560872 - undefined symbol: PyUnicodeUCS2_DecodeUTF8
undefined symbol: PyUnicodeUCS2_DecodeUTF8
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal blocker
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2008-11-14 23:40 UTC by Simon van der Linden
Modified: 2008-11-15 13:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon van der Linden 2008-11-14 23:40:06 UTC
I checkouted jhbuild from SVN tonight and tried to build with the default jhbuilrc, doing 
% jhbuild bootstrap
% jhbuild sanitycheck
% jhbuild build

When trying to configure Alacarte, an error occured:

checking for python2.5... /usr/bin/python2.5
checking whether /usr/bin/python2.5 version is >= 2.5.0... yes
checking for  version... 2.5
checking for  platform... linux2
checking for  script directory... ${prefix}/lib/python2.5/site-packages
checking for  extension module directory... ${exec_prefix}/lib/python2.5/site-packages
checking for pkg-config... /opt/gnome2/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ALACARTE... yes
checking for pygtk 2.8.0 installed for python 2.4... not found
configure: error: required pygtk version not found

First, it seemed rather strange that it was looking for pygtk for python 2.4, after having found python 2.5. In fact, the message is not correct. 

But then, as pygtk seemed to be installed on the system, I tried from the jhbuild shell to run python and check it manually. Here is what happened:

Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
>>> pygtk.require("2.0")
>>> import gobject
Traceback (most recent call last):
  • File "<stdin>", line 1 in <module>
  • File "/opt/gnome2/lib/python2.4/site-packages/gtk-2.0/gobject/__init__.py", line 33 in <module>
    from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
  • File "/opt/gnome2/lib/python2.4/site-packages/gtk-2.0/glib/__init__.py", line 30 in <module>
    from glib._glib import *
ImportError: /opt/gnome2/lib/python2.4/site-packages/gtk-2.0/glib/_glib.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 38, in apport_excepthook
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.5/site-packages/apport/report.py", line 18, in <module>
    from xml.parsers.expat import ExpatError
  File "/opt/gnome2/lib/python2.4/site-packages/_xmlplus/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: /opt/gnome2/lib/python2.4/site-packages/_xmlplus/parsers/pyexpat.so: undefined symbol: PyUnicodeUCS2_Decode

Original exception was:
Traceback (most recent call last):
  • File "<stdin>", line 1 in <module>
  • File "/opt/gnome2/lib/python2.4/site-packages/gtk-2.0/gobject/__init__.py", line 33 in <module>
    from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
  • File "/opt/gnome2/lib/python2.4/site-packages/gtk-2.0/glib/__init__.py", line 30 in <module>
    from glib._glib import *
ImportError: /opt/gnome2/lib/python2.4/site-packages/gtk-2.0/glib/_glib.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8

I'm at your disposal if you need more information.
Comment 1 Frederic Peters 2008-11-15 12:16:10 UTC
It messes things up between local and jhbuild versions of Python; perhaps because of this "/usr/lib/python2.5/site-packages/apport_python_hook.py", which looks like a Ubuntu specific hook.

But then there is a second issue, if you are in a jhbuild shell, it should have jhbuild prefix in its path, and typing python should get you python2.4, not 2.5; did you type "python" or "python2.5" ?

Also, you could try to add the following line to your .jhbuilrc:
  os.environ['PYTHON'] = os.path.join(prefix, 'bin/python')
and run jhbuild buildone alacarte.
Comment 2 Simon van der Linden 2008-11-15 12:57:08 UTC
Indeed, I use Ubuntu 8.10.

When trying to launch python from the jhbuild shell, I get this:
% python
python: error while loading shared libraries: libpython2.4.so.1.0: cannot open shared object file: No such file or directory

Also:
% which python
/opt/gnome2/bin/python
% which python2.4
/opt/gnome2/bin/python2.4
% which python2.5
/usr/bin/python2.5

But, in Alacarte's configure script, the python VM that is being executed is /usr/bin/python2.5. So, I tried with this machine, and I pasted its trace.
Comment 3 Frederic Peters 2008-11-15 13:02:25 UTC
Could you post the output of `ldd /opt/gnome2/bin/python' and `ls -l /opt/gnome2/bin/python'?

And the last tip of my previous comment is of use as well, add the following to your .jhbuilrc: `os.environ['PYTHON'] = os.path.join(prefix, 'bin/python')' and run `jhbuild buildone alacarte'.
Comment 4 Simon van der Linden 2008-11-15 13:30:36 UTC
% ldd /opt/gnome2/bin/python
	linux-gate.so.1 =>  (0xb7fce000)
	libpython2.4.so.1.0 => not found
	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7f85000)
	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7f80000)
	libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0xb7f7c000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7e8d000)
	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7e67000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7e58000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7cfa000)
	/lib/ld-linux.so.2 (0xb7fb4000)

% ls -l /opt/gnome2/bin/python
-rwxr-xr-x 2 sivanderlinden sivanderlinden 11K 2008-11-14 22:00 /opt/gnome2/bin/python*

And, it may be usefull too:
% ls -l /opt/gnome2/lib/libpython2.4.so.1.0
-r-xr-xr-x 1 sivanderlinden sivanderlinden 3.2M 2008-11-14 22:00 /opt/gnome2/lib/libpython2.4.so.1.0*

Regarding the modif in jhbuildrc, I thought it wouldn't work since /opt/gnome2/bin/python seemed broken. But that solved the problem of Alacarte's configuration. Shame on me. Thank you!
Comment 5 Frederic Peters 2008-11-15 13:46:38 UTC
Good, I updated jhbuild to modify the environment when there is a Python installed in its prefix; so it will work without any change to jhbuildrc now.

2008-11-15  Frederic Peters  <fpeters@0d.be>

        * jhbuild/config.py: if there is a Python installed in JHBuild prefix,
        set it in PYTHON environment variable, so it gets picked up by
        configure scripts.  (closes: #560872)