Page 1 of 1

Gpell and gpdc

Posted: Mon Jan 14, 2008 2:08 pm
by valerio
I'm trying to run gpell and gpdc under Matlab (as system call), but I encountered some problem.

If I run this command:

>> system('gpell --help');

or identically:

>> !gpell --help

I obtained always this error:

gpell: symbol lookup error: /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/lib/libqtbtools.so.1: undefined symbol: _ZN7QString16fromAscii_helperEPKci

and it stops.
But If I use sudo everything goes fine (...dirty trick!):

>> !sudo gpell --help

Moreover if I run gpell (or gpdc) in a shell everything goes fine....

Have you got any idea of why I receive this system message (indeed it comes not from Matlab)?
Is there something I can modify in gpell (ie. static compile...) to solve this problem?

Gpell and gpdc (part B)

Posted: Mon Jan 14, 2008 2:12 pm
by valerio
This is the configuration I use: ---------------------------------------------------------------------------------------------
SHELL OUTPUT

~$ qmake -v
QMake version 2.01a
Using Qt version 4.3.2 in /usr/lib

~$ echo $PATH
/home/grendel/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/bin

~$ echo $LD_LIBRARY_PATH

~$ which gpell
/home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/bin/gpell

~$ ldd $(which gpell)
linux-gate.so.1 => (0xffffe000)
libqtbtools.so.1 => /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/lib/libqtbtools.so.1 (0xb7ef7000)
libqtbwave.so.0 => /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/lib/libqtbwave.so.0 (0xb7ec3000)
libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0xb771b000)
libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0xb759b000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7583000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7490000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb746b000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7460000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7315000)
libaudio.so.2 => /usr/lib/libaudio.so.2 (0xb72ff000)
libXt.so.6 => /usr/lib/libXt.so.6 (0xb72ae000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb728b000)
libSM.so.6 => /usr/lib/libSM.so.6 (0xb7283000)
libICE.so.6 => /usr/lib/libICE.so.6 (0xb726a000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7255000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb7250000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7247000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb718a000)
libXi.so.6 => /usr/lib/libXi.so.6 (0xb7182000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb717a000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7173000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb716e000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7165000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb7162000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb70f2000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb70c7000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb70b8000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb6fc7000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6fc3000)
/lib/ld-linux.so.2 (0xb7f78000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb6fa3000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb6f9f000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6f9a000)

~$ gpell -version
Versions:
Qt 4.3.2
qtbtools 1.10.0 (200801030037, built key 200801100955)
qtbwave 0.6.0 (200801030038, built key 200801100955)
gpell 0.2.1 (200801030048, built key 200801100955)

---------------------------------------------------------------------------------------------
MATLAB OUTPUT

>> system('echo $PATH');
/home/grendel/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/bin

>> system('echo $LD_LIBRARY_PATH');
/usr/local/matlabR2007/sys/os/glnx86:/usr/local/matlabR2007/bin/glnx86:/usr/local/matlabR2007/extern/lib/glnx86:/usr/local/matlabR2007/sys/java/jre/glnx86/jre1.5.0/lib/i386/native_threads:/usr/local/matlabR2007/sys/java/jre/glnx86/jre1.5.0/lib/i386/client:/usr/local/matlabR2007/sys/java/jre/glnx86/jre1.5.0/lib/i386

Posted: Mon Jan 14, 2008 2:30 pm
by admin
Can you send the answer of:

Code: Select all

system('ldd /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/bin/gpell');
It looks like gpell is not accessing the correct Qt library when it is run from Matlab environment.

Maybe just to test:

Code: Select all

system('LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH gpell -help');
I'm not really convinced that it will help. But just in case of...

Posted: Mon Jan 14, 2008 3:11 pm
by valerio
You are right!

It seems that MATLAB is overwriting the LD_LIBRARY_PATH variable with its own settings.
The output is indeed:

>> system('ldd /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/bin/gpell');
linux-gate.so.1 => (0xffffe000)
libqtbtools.so.1 => /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/lib/libqtbtools.so.1 (0xb7e87000)
libqtbwave.so.0 => /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/lib/libqtbwave.so.0 (0xb7e52000)
libQtGui.so.4 => /usr/local/matlabR2007/bin/glnx86/libQtGui.so.4 (0xb7926000)
libQtCore.so.4 => /usr/local/matlabR2007/bin/glnx86/libQtCore.so.4 (0xb77d8000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb77b4000)
libstdc++.so.6 => /usr/local/matlabR2007/sys/os/glnx86/libstdc++.so.6 (0xb76d7000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb76b1000)
libgcc_s.so.1 => /usr/local/matlabR2007/sys/os/glnx86/libgcc_s.so.1 (0xb76a6000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb755c000)
libz.so.1 => /usr/local/matlabR2007/bin/glnx86/libz.so.1 (0xb754c000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7544000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb74d3000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb74a8000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb749a000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb73a9000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb73a5000)
/lib/ld-linux.so.2 (0xb7f08000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7384000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb7381000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb737c000)

if I use your suggestion everything goes fine.
Now I have to understand how to correctly setup the variable in MATLAB, but this is (of course) out of this topic.

Thanks a lot!

:D

Posted: Mon Jan 14, 2008 4:18 pm
by admin
Ok things were solved by chance. I didn't know that some modules in Matlab were using Qt, but apparently not the same build as in your system, which led to the mismatch.

Maybe try to start matlab with something like:

Code: Select all

LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH matlab
But if you are using modules based on Qt 4, probably they won't work. So the best option is probably the previous one, i.e. specifying the library path at gpell startup.