[suggest] Re: suggest Digest, Vol 60, Issue 13

Yury V. Zaytsev yury at shurup.com
Mon Jun 21 21:33:43 CEST 2010


On Mon, 2010-06-21 at 18:50 +0200, Bjarne Saltbaek wrote:

> --- cut ---
> ### Workaround to make -lX11 work on 64bit
> export LDFLAGS="-L/usr/X11R6/%{_lib}"
> export QTDIR="$(/usr/bin/pkg-config --variable=prefix QtGui)"
> export PATH="$QTDIR/bin:$PATH"
> export QTINC="$QTDIR/include"
> export QTLIB="$QTDIR/lib"
> --- cut ---
> So, if we build a Qt under ie. /usr/lib/vlc/qt4 and change the above QTDIR 
> (from /usr/lib/qt4)  - will this work?

The build itself has a potential to work, but what will happen is that
vlc will be linked dynamically against a set of libraries that are not
exposed to ld, so the application will fail to run (unless you set the
RPATH to /usr/lib/vlc/qt4, which is a whole another story). 

If you do a static build of qt (I don't remember the details anymore,
but all it takes, I guess, is to add the -static switch to the *.pro
file), it will get linked directly in the executables and will not
require to have qt installed in order to run.

The whole debate about static vs. dynamic linking can be summarized this
way, I guess: "if we do dynamic linking, we have to make a separate
proper parallel-installable package of qt for everything, if we do
static linking, probably we don't".
Sincerely yours,
Yury V. Zaytsev

More information about the users mailing list