473,441 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,441 software developers and data experts.

undefined symbol: PyUnicodeUCS2_FromUnicode

/home/me>redhat-config-services

Traceback (most recent call last):
File "/usr/share/redhat-config-services/serviceconf.py", line 26, in ?
import gtk
File "/usr/lib/python2.2/site-packages/rhpl/__init__.py", line 43, in ?
# dummy __init__ so that things work
File "/usr/lib/python2.2/ihooks.py", line 397, in import_module
q, tail = self.find_head_package(parent, name)
File "/usr/lib/python2.2/ihooks.py", line 433, in find_head_package
q = self.import_it(head, qname, parent)
File "/usr/lib/python2.2/ihooks.py", line 486, in import_it
m = self.loader.load_module(fqname, stuff)
File "/usr/lib/python2.2/ihooks.py", line 268, in load_module
m = self.hooks.load_dynamic(name, filename, file)
File "/usr/lib/python2.2/site-packages/gtk-2.0/ltihooks.py", line 51, in
load_dynamic
return ihooks.Hooks.load_dynamic(self, name, filename, file)
File "/usr/lib/python2.2/ihooks.py", line 172, in load_dynamic
return imp.load_dynamic(name, filename, file)
ImportError: /usr/lib/python2.2/site-packages/gtk-2.0/gtk/_gtk.so: undefined
symbol: PyUnicodeUCS2_FromUnicode

I got the above problem after trying to install Pythonol on my (redhat 9)
system, and for that I installed (IIRC) pygtk. Probably also some other
dependencies. I just don't know anymore, because I did not immediately
notice this problem. However after a while I noticed the redhat-config
scripts could no longer be launched. Then I found out the problem pasted
above was causing that.

After noticing this I have reinstalled every python related package on my
system I could find, but this problem won't go away. I have no clue where
to look and what to do to fix this problem.

I am absolutely clueless when it comes to python, so I probably shouldn't
have messed with it (I had no idea python was so frequently used). But now
that just means I have no idea where to look or what to do next to get this
problem solved. Is there anyone who has an idea as to what is wrong and how
it can be solved? It is driving me crazy, and I'd hate to reinstall my
system just to get this fixed.

Eric
Jul 18 '05 #1
4 15331
Eric Moors wrote:
/home/me>redhat-config-services
ImportError: /usr/lib/python2.2/site-packages/gtk-2.0/gtk/_gtk.so: undefined symbol: PyUnicodeUCS2_FromUnicode


Python on RedHat 9 is compiled with 4 byte unicode characters (UCS4), most
other distributions use 2 byte unicode characters (UCS2). So if you install
a rpm compiled on a different system, this error is bound to happen.
Solution: compile the python module from source, but this requires that the
sources of the module have been prepared to deal with UCS4.

Daniel

Jul 18 '05 #2
Daniel Dittmar wrote:
Eric Moors wrote:
/home/me>redhat-config-services
ImportError: /usr/lib/python2.2/site-packages/gtk-2.0/gtk/_gtk.so: undefined
symbol: PyUnicodeUCS2_FromUnicode


Python on RedHat 9 is compiled with 4 byte unicode characters (UCS4), most
other distributions use 2 byte unicode characters (UCS2). So if you
install a rpm compiled on a different system, this error is bound to


I have installed mandrake's synaptic, but that is replaced, and maybe some
fedora core rpms. The rest are RH9 dedicated RPMS or compiled at my machine

Just checked, the only fedora core RPM I had was for wine. I removed it,
just to be sure. No change (None expected)
happen. Solution: compile the python module from source, but this requires
that the sources of the module have been prepared to deal with UCS4.


Thanks, but...
Which module? Is this a gtk thing? (The name does suggest this)
but `rpm -qf _gtk.so` shows that _gtk.so doesn't belong to any package.
Yet gtk is installed by rpm.

Aargh. So this is probably something I installed from a tarball.

I can remove it manually (and _gtk.la), but then the program fails with:

Fatal Python error: could not import pango
/usr/share/redhat-config-services/redhat-config-services: line 4: 13918
Aborted /usr/bin/python
/usr/share/redhat-config-services/serviceconf.py
It must probably also possible to trace this back, but I am severly lacking
python knowledge to do this. Any pointers?

Eric
Jul 18 '05 #3
Eric Moors wrote:
Daniel Dittmar wrote:
happen. Solution: compile the python module from source, but this
requires that the sources of the module have been prepared to deal
with UCS4.


Thanks, but...
Which module? Is this a gtk thing? (The name does suggest this)
but `rpm -qf _gtk.so` shows that _gtk.so doesn't belong to any
package. Yet gtk is installed by rpm.


From
ImportError: /usr/lib/python2.2/site-packages/gtk-2.0/gtk/_gtk.so: undefined
symbol: PyUnicodeUCS2_FromUnicode

I would guess that _gtk.so contains the python bindings to GTK.
PyUnicodeUCS2_FromUnicode is a function that belongs to the Python API.
Perhaps it's best to ask on the PyGTK mailing list on how to install it on
RedHat 9 (http://www.daa.com.au/~james/software/pygtk/).

I don't have much experience with RedHat myself, but from what I've heard on
this mailing list, it could be a good idea to install a second python for
your own programs and leave the system python alone.

Daniel

Jul 18 '05 #4
> Perhaps it's best to ask on the PyGTK mailing list on how to install it on
RedHat 9 (http://www.daa.com.au/~james/software/pygtk/).


Thanks, I'll do that. I realized I was off-topic here, but didn't know of a
better place to go.

Eric
Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stu | last post by:
I am trying to build the xerces shared library with 2.3.0 version of their source code on an AIX 5.1 32 bit machine with the following version of the g++ compiler /usr/local/bin/g++ -v Reading...
0
by: pervinder | last post by:
Hi, I have a c++ application which depends on some other libs which uses stlport When i build the application, it works fine on sun/linux/hp platform. (provided the .a for the dependency libs) ...
8
by: Scott J. McCaughrin | last post by:
The following program compiles fine but elicits this message from the linker: "undefined reference to VarArray::funct" and thus fails. It seems to behave as if the static data-member:...
2
by: el prinCipante | last post by:
I am a total novice. And granted this probably is a very simple question, it still stops me from finishing my thesis. Thanks in advance for any postings. I am using a library routine and...
4
by: r.nikhilk | last post by:
Hi, We are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by including the...
8
by: pavan734 | last post by:
Hello, Please excuse me as Iam not posting this to correct group. I have a parser code obtained from flex command. I have many other files. When I compile them Iam getting a message like:...
1
by: yamitmehta | last post by:
When I compile to code using g++arm of VxWorks 5.5 and put it on my board i get the follwing undefined symbols:- Cpool and Csingleton are template classes. CPool has the static member...
1
by: Justin Johnson | last post by:
Hello, I'm trying to build Python 2.5.0 on AIX 5.3 using IBM's compiler (VisualAge C++ Professional / C for AIX Compiler, Version 6). I run configure and make, but makes fails with undefined...
1
by: Michel Esber | last post by:
People, Environment: Linux AS4 I have just installed db2 v9.5 + Fixpak 2 on a machine that has db2 v8 up and running, but I am unable to create and instance: # ./db2icrt -a SERVER -p...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.