Results 1 to 5 of 5

Thread: Qt4 and Kubuntu coexisting?

  1. #1
    Join Date
    Jan 2006
    Location
    Knivsta, Sweden
    Posts
    153
    Thanks
    30
    Thanked 13 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Qt4 and Kubuntu coexisting?

    I have recently installed kubuntu 8.10, which uses Qt4, and after that downloaded and did make + make install of the latest Qt sources.

    when I try from a command prompt to run i.e. gwenview i get:

    Qt Code:
    1. gwenview: symbol lookup error: /usr/lib/libQtDBus.so.4: undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv
    To copy to clipboard, switch view to plain text mode 

    A web search indicated that the problem is probably due to conflicts between Kubuntu's Qt4 and the Qt4 I compiled.

    Any hint on how to make them coexist peacefully?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt4 and Kubuntu coexisting?

    Where did you install the manually compiled Qt?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Knivsta, Sweden
    Posts
    153
    Thanks
    30
    Thanked 13 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Qt4 and Kubuntu coexisting?

    I did not specify a location to ./configure, so it would be the default

    /usr/local/Trolltech/Qt-4.5.0-tp1

    Did some more research which led me to this:

    Qt Code:
    1. >ldd `which gwenview` | grep Troll
    2. libQtCore.so.4 => /usr/local/Trolltech/Qt-4.5.0-tp1/lib/libQtCore.so.4 (0xb74d2000)
    3. libQtGui.so.4 => /usr/local/Trolltech/Qt-4.5.0-tp1/lib/libQtGui.so.4 (0xb6911000)
    4. libQtXml.so.4 => /usr/local/Trolltech/Qt-4.5.0-tp1/lib/libQtXml.so.4 (0xb6489000)
    5. libQtSvg.so.4 => /usr/local/Trolltech/Qt-4.5.0-tp1/lib/libQtSvg.so.4 (0xb6345000)
    6. libQtNetwork.so.4 => /usr/local/Trolltech/Qt-4.5.0-tp1/lib/libQtNetwork.so.4 (0xb6243000)
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. >env | grep LIBRARY
    2. LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.5.0-tp1/lib:/usr/local/lib
    To copy to clipboard, switch view to plain text mode 

    I tried switching the order of the two paths in LD_LIBRARY_PATH, and then gwenview starts without complaints.. but.. I am also developing Qt apps and I want them to use the manually installed Qt lib. Hmm. I suppose I could either start them like this

    Qt Code:
    1. >LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.5.0-tp1/lib:/usr/local/lib myapp
    To copy to clipboard, switch view to plain text mode 

    or figure out how to statically link everything into the binary. Is that how you gurus would keep two versions of Qt4 separate?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt4 and Kubuntu coexisting?

    Remove /usr/local/Trolltech/Qt-4.5.0-tp1/lib from the environment variable, you probably don't need it there.

  5. The following user says thank you to wysota for this useful post:

    drhex (9th December 2008)

  6. #5
    Join Date
    Jan 2006
    Location
    Knivsta, Sweden
    Posts
    153
    Thanks
    30
    Thanked 13 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Qt4 and Kubuntu coexisting?

    Amazingly, that worked (although I don't understand why). I changed the initial setup of LD_LIBRARY_PATH and logged out+in again to ensure that no traces of previous settings were left.

    ldd on my application still refers to the shiny new 4.5.0-tp1 for libQtGui and libQtCore even after a full recompile, while ldd on the system's standard applications only refer to its own libraries.

    Perfect!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.