[gecode-users] GecodeJ : java.lang.UnsatisfiedLinkError

Grégoire Dooms dooms at info.ucl.ac.be
Wed Nov 1 11:26:10 CET 2006


Hello,
I should have thought twice before replying.

Instead of caling popen("java SolveProblem"), wrap up the java 
SolveProblem call in a shell script which ensures your LD_LIBRARY_PATH 
points to the right libstdc++ first.

solveproblem.sh:
export 
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/gecode/release-1.0.0/
# this one should produce the same result as when executed in
# a command line context where your java program works
ldd /usr/local/gecode/release-1.0.0/libgecodejava.so > /tmp/ldd.log
java SolveProblem


By the way, many changes and bugfixes have occured in gecode since 
1.0.0; you should probably upgrade.
--
Grégoire


Grégoire Dooms wrote:
> Mikaël De Bie wrote:
>> Hi,
>>
>> I'm trying to solve a gecodeJ problem by a popen("java SolveProblem", 
>> "r") in a C++ code of an add-on of OpenOffice.
>>
>> I'm getting this error :
>>
>> Gecode native code library failed to load.
>> java.lang.UnsatisfiedLinkError: 
>> /usr/local/gecode/release-1.0.0/libgecodejava.so: 
>> /opt/openoffice.org2.0/program/libstdc++.so.6: version `CXXABI_1.3.1' 
>> not found (required by /usr/local/gecode/release-1.0.0/libgecodejava.so)
>>
>> I have several different libstdc++.so.6 file on my disk. One is in 
>> /opt/openoffice.org2.0/program. it seems not to be the good version, 
>> but I think I can't replace it because OpenOffice maybe needs this 
>> version...
>>
> You could try to compile gecode and gecodeJ with the same compiler as 
> you used for your openoffice add-on and make sure they are linked 
> against /opt/openoffice.org2.0/program/libstdc++.so.6
>
>> Furthermore, I don't know how to know which version I have.
>>
>> I 've tried to run java SolveProblem directly in the console and 
>> there is no error.
>>
> My guess is that your gecode libraries use libstdc++.so.6 with a 
> different C++ ABI version.
>
> Maybe someone  on this list is more familiar to these libstdc++ 
> version problems than me, or you could try to ask that question on a 
> g++ users list.
>
> All the best with your project
> -- 
> Grégoire
>
>
>
>






More information about the gecode-users mailing list