Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, May 2008
application mounts my home directory


Message 1 in thread

I am developing with Qt 3.3.8 on various linux and solaris platforms. I have 
Qt installed and built under my home directory. i.e.,

$QTDIR = "/home/kworland/........"

If I take one of the examples from $QTDIR/examples such as xml/outliner,
and build a directory structure like this

test.qt
   lib
     libgcc_s.so.1  libqt-mt.so.3  libstdc++.so.6

   outliner
     Makefile  main.cpp  outliner.doc  outlinetree.cpp  todos.opml
     env       outliner  outliner.pro  outlinetree.h

env contains

     setenv LD_LIBRARY_PATH ../lib

I can then ldd outliner

    fiat> ldd outliner
        libqt-mt.so.3 =>         ../lib/libqt-mt.so.3
        libXext.so.0 =>  /usr/lib/libXext.so.0
        libX11.so.4 =>   /usr/lib/libX11.so.4
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libSM.so.6 =>    /usr/lib/libSM.so.6
        libICE.so.6 =>   /usr/lib/libICE.so.6
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libpthread.so.1 =>       /usr/lib/libpthread.so.1
        librt.so.1 =>    /usr/lib/librt.so.1
        libstdc++.so.6 =>        ../lib/libstdc++.so.6
        libm.so.1 =>     /usr/lib/libm.so.1
        libgcc_s.so.1 =>         ../lib/libgcc_s.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libaio.so.1 =>   /usr/lib/libaio.so.1
        libthread.so.1 =>        /usr/lib/libthread.so.1
        /usr/platform/SUNW,Sun-Blade-2500/lib/libc_psr.so.1

my home directory does not appear.

I tar this up and give it to a colleague who takes it to yet
another machine I haven't visited and does the following;

   source env
   outliner

It mounts up my home directory.

We then converted a machine to disable the ability for that machine
to mount my home directory. outliner runs.

So, the application is free from $QTDIR but always wants to 
mount up my home direcory if it can. It doesn't care if it cant 
but it tries anyway.

If I do "strings libqt-mt" it has strings which include my home directory
but it doesn't seem to need that.

Is there some kind of compile flag while building qt to keep it
from doing this?

This really annoys my users. 

The only way I can see to eliminate this problem is to create a partition on 
my compile platforms that will never be created on user machines. 
I did a "strings libqt-mt" on a libqt-mt from a well known software 
vendor and it appears that is what they did. 

I do not want to make archive libraries but I do want to make my rather
complicated application self contained, at least as far as the qt libraries
are concerned.

Any ideas?

Thanks,

Ken

--
 [ signature omitted ] 

Message 2 in thread

On Friday 02 May 2008 20:12:53 Ken.Worland wrote:
> Is there some kind of compile flag while building qt to keep it
> from doing this?
>
> This really annoys my users.

No. Qt always tries to open a few files in $HOME. That's where it keeps its 
own configuration.

This is valid for both Qt3 and Qt4.

-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.


Message 3 in thread

Hi,

>> Is there some kind of compile flag while building qt to keep it
>> from doing this?
>>
>> This really annoys my users.
> 
> No. Qt always tries to open a few files in $HOME. That's where it keeps its 
> own configuration.

If I understand correctly, he's not saying Qt tries to access the HOME current 
at run-time. Instead it tries to access /home/kworland which was the HOME at 
compile-time.

Qt looks for plugins in a path specified at compile-time. You need to override 
that path using QApplication::setLibraryPaths():
	http://doc.trolltech.com/3.3/plugins-howto.html

-- 
 [ signature omitted ]