You are not logged in.

#1 2018-05-28 15:48:29

joaocandre
Member
Registered: 2013-02-23
Posts: 166

[SOLVED] Conflicting Qt libraries

I'm working with a portable simulation program (Webots, if anyone's wondering) that  comes with the necessary run libraries within its installation folder (atm /usr/local/share/webots/lib). The program itself is lauched by a shell script that loads necessary libraries and executes the binary.  I've created a symlink in /usr/local/bin and a .desktop file under /usr/share/applications. However, it only works if I launch it directly from the installation folder, or from the DE's launcher. Otherwise, the fonts on the splash widow look diferent, and it crashes after a few seconds with:

libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
QWidget::create(): Parameter 'window' does not have any effect.
Empty filename passed to function
Empty filename passed to function
....
Empty filename passed to function
Empty filename passed to function
Cannot mix incompatible Qt library (version 0x50201) with this library (version 0x50a01)
/usr/local/share/webots/webots: line 30:  7777 Aborted                 (core dumped) "$webotsBinaryDir"/"$webotsBinary" "$@"

This happens even if launch the launch script from / or from my home folder. So I'm guessing it's something to do with where the system loads the runtime libraries? How can I tell a link in /usr/local/bin the correct library path?

Last edited by joaocandre (2018-05-29 16:47:42)

Offline

#2 2018-05-28 16:48:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: [SOLVED] Conflicting Qt libraries

Replace the symlink with a shell script wrapper that (in doubt enters the target directory and) calls the script provided by the program.
It'll likely inspect the path of the executable (but not its "man realpath") to preload its own libraries.

Offline

#3 2018-05-29 13:39:58

joaocandre
Member
Registered: 2013-02-23
Posts: 166

Re: [SOLVED] Conflicting Qt libraries

Thanks @seth, that did work. An alternative that I was going to try was to directly placing the launcher script under /usr/bin or /usr/local/bin, and editing it to hardcode the absolute paths for the executable and libraries. But what you suggest is simpler and cleaner.

Last edited by joaocandre (2018-05-29 13:40:15)

Offline

#4 2018-05-29 14:43:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,849

Re: [SOLVED] Conflicting Qt libraries

Cool.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB