undefined symbol: PyUnicodeUCS4_FromUnicode

Discussion in 'Python' started by Bill Hodges, Aug 13, 2004.

  1. Bill Hodges

    Bill Hodges Guest

    I just build PyQt from sources on Mandrake 10 and tried to run
    a le gacy application from a University that
    runs in several environments. I detectedno errors on the
    configuration or build and the qt.so is the same in the build directory
    as it is in the site-packages/qt.so.

    output is:

    psyco installed and used
    Traceback (most recent call last):
    File "/usr/local/lib/python2.3/site-packages/drt/drt.py", line 40, in ?
    from qt import *
    ImportError: /usr/lib/python2.3/site-packages/qt.so: undefined symbol:
    PyUnicodeUCS4_FromUnicode

    Any pointers on how to resolve?
     
    Bill Hodges, Aug 13, 2004
    #1
    1. Advertising

  2. Bill Hodges wrote:
    > output is:
    >
    > psyco installed and used
    > Traceback (most recent call last):
    > File "/usr/local/lib/python2.3/site-packages/drt/drt.py", line 40, in ?
    > from qt import *
    > ImportError: /usr/lib/python2.3/site-packages/qt.so: undefined symbol:
    > PyUnicodeUCS4_FromUnicode
    >
    > Any pointers on how to resolve?


    It appears that you have built qt.so for UCS-4, but the installed Python
    is UCS-2. Do "nm -D /usr/bin/python2.3|grep UCS" to verify that.

    If so, make sure the pyconfig.h that you are using belongs to the
    /usr/bin/python you are using.

    Regards,
    Martin
     
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Aug 13, 2004
    #2
    1. Advertising

  3. Bill Hodges

    Bill Hodges Guest

    Martin,

    Your dianosis is correct.
    I compiled tcl to include UCS4 and
    Python then compiled to UCS4
    (nm revealed the difference).
    PyQt compiled fine, However, it
    still errors out the same way.
    For some reason PyQt needs to be told to
    include the UCS4 stuff in qt.so na d
    I cannot find the key.

    Do you have another suggestion.
    ----------------------------------------------------------
    drt
    psyco installed and used
    Traceback (most recent call last):
    File "/usr/local/lib/python2.3/site-packages/drt/drt.py", line 40, in ?
    from qt import *
    ImportError: /usr/lib/python2.3/site-packages/qt.so: undefined symbol:
    PyUnicodeUCS4_FromUnicode


    Martin v. Löwis wrote:
    > Bill Hodges wrote:
    >
    >> output is:
    >>
    >> psyco installed and used
    >> Traceback (most recent call last):
    >> File "/usr/local/lib/python2.3/site-packages/drt/drt.py", line 40, in ?
    >> from qt import *
    >> ImportError: /usr/lib/python2.3/site-packages/qt.so: undefined symbol:
    >> PyUnicodeUCS4_FromUnicode
    >>
    >> Any pointers on how to resolve?

    >
    >
    > It appears that you have built qt.so for UCS-4, but the installed Python
    > is UCS-2. Do "nm -D /usr/bin/python2.3|grep UCS" to verify that.
    >
    > If so, make sure the pyconfig.h that you are using belongs to the
    > /usr/bin/python you are using.
    >
    > Regards,
    > Martin
     
    Bill Hodges, Aug 15, 2004
    #3
  4. Bill Hodges wrote:
    > Your dianosis is correct.
    > I compiled tcl to include UCS4 and
    > Python then compiled to UCS4
    > (nm revealed the difference).


    Are you sure about that? Are you absolutely certain that
    the installed Python (/usr/local/bin/python2.3) is UCS-4?
    It appears to me that it is likely UCS-2.

    > PyQt compiled fine, However, it
    > still errors out the same way.
    > For some reason PyQt needs to be told to
    > include the UCS4 stuff in qt.so na d
    > I cannot find the key.


    Do you happen to have Python header files both in /usr/include
    and /usr/local/include? Make sure PyQt is using the ones in
    /usr/local/include, if you plan to use PyQt with that Python
    installation.

    Regards,
    Martin
     
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Aug 16, 2004
    #4
  5. Bill Hodges

    Bill Hodges Guest

    Martin,
    Your diagnosis was correct.
    When I removed the python stuff in /usr
    and rebuilt everything in /usr/local
    I finally got DRT to run.

    Thank you.

    Bill
    Martin v. Löwis wrote:
    > Bill Hodges wrote:
    >
    >> Your dianosis is correct.
    >> I compiled tcl to include UCS4 and
    >> Python then compiled to UCS4
    >> (nm revealed the difference).

    >
    >
    > Are you sure about that? Are you absolutely certain that
    > the installed Python (/usr/local/bin/python2.3) is UCS-4?
    > It appears to me that it is likely UCS-2.
    >
    >> PyQt compiled fine, However, it
    >> still errors out the same way.
    >> For some reason PyQt needs to be told to
    >> include the UCS4 stuff in qt.so na d
    >> I cannot find the key.

    >
    >
    > Do you happen to have Python header files both in /usr/include
    > and /usr/local/include? Make sure PyQt is using the ones in
    > /usr/local/include, if you plan to use PyQt with that Python
    > installation.
    >
    > Regards,
    > Martin
     
    Bill Hodges, Aug 19, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kenneth Kahl
    Replies:
    2
    Views:
    12,153
    Kenneth Kahl
    Feb 22, 2006
  2. Replies:
    1
    Views:
    1,039
    Nigel Wade
    Mar 24, 2006
  3. baumann@pan
    Replies:
    1
    Views:
    746
    Richard Bos
    Apr 15, 2005
  4. Song Ma
    Replies:
    2
    Views:
    235
    Charles Oliver Nutter
    Jul 20, 2008
  5. Replies:
    6
    Views:
    1,802
Loading...

Share This Page