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/ 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: ---------------------------------------------------------------------------------------------

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

~$ echo $PATH


~$ which gpell

~$ ldd $(which gpell) => (0xffffe000) => /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/lib/ (0xb7ef7000) => /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/lib/ (0xb7ec3000) => /usr/lib/ (0xb771b000) => /usr/lib/ (0xb759b000) => /lib/tls/i686/cmov/ (0xb7583000) => /usr/lib/ (0xb7490000) => /lib/tls/i686/cmov/ (0xb746b000) => /lib/ (0xb7460000) => /lib/tls/i686/cmov/ (0xb7315000) => /usr/lib/ (0xb72ff000) => /usr/lib/ (0xb72ae000) => /usr/lib/ (0xb728b000) => /usr/lib/ (0xb7283000) => /usr/lib/ (0xb726a000) => /usr/lib/ (0xb7255000) => /usr/lib/ (0xb7250000) => /lib/tls/i686/cmov/ (0xb7247000) => /usr/lib/ (0xb718a000) => /usr/lib/ (0xb7182000) => /usr/lib/ (0xb717a000) => /usr/lib/ (0xb7173000) => /usr/lib/ (0xb716e000) => /usr/lib/ (0xb7165000) => /usr/lib/ (0xb7162000) => /usr/lib/ (0xb70f2000) => /usr/lib/ (0xb70c7000) => /usr/lib/ (0xb70b8000) => /usr/lib/ (0xb6fc7000) => /lib/tls/i686/cmov/ (0xb6fc3000)
/lib/ (0xb7f78000) => /usr/lib/ (0xb6fa3000) => /usr/lib/ (0xb6f9f000) => /usr/lib/ (0xb6f9a000)

~$ gpell -version
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)


>> system('echo $PATH');

>> system('echo $LD_LIBRARY_PATH');

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'); => (0xffffe000) => /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/lib/ (0xb7e87000) => /home/grendel/programs/sesarray-bin-2.0.0-snapshot-20080103/lib/ (0xb7e52000) => /usr/local/matlabR2007/bin/glnx86/ (0xb7926000) => /usr/local/matlabR2007/bin/glnx86/ (0xb77d8000) => /lib/tls/i686/cmov/ (0xb77b4000) => /usr/local/matlabR2007/sys/os/glnx86/ (0xb76d7000) => /lib/tls/i686/cmov/ (0xb76b1000) => /usr/local/matlabR2007/sys/os/glnx86/ (0xb76a6000) => /lib/tls/i686/cmov/ (0xb755c000) => /usr/local/matlabR2007/bin/glnx86/ (0xb754c000) => /usr/lib/ (0xb7544000) => /usr/lib/ (0xb74d3000) => /usr/lib/ (0xb74a8000) => /usr/lib/ (0xb749a000) => /usr/lib/ (0xb73a9000) => /lib/tls/i686/cmov/ (0xb73a5000)
/lib/ (0xb7f08000) => /usr/lib/ (0xb7384000) => /usr/lib/ (0xb7381000) => /usr/lib/ (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!


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

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.