[gecode-users] Compilation problem with GecodeJ 1.0.0 (debian linux)

Zampelli Stephane Stephane.Zampelli at info.ucl.ac.be
Thu Oct 5 11:03:05 CEST 2006


Finally I managed to compile and run an example (thanks to Gregoire's help).

I had to use the following options for configure :

./configure
Gecode_CFLAGS="-I/home/szampelli/UCL/Recherche/Code/release-1.3.0/
-I/home/szampelli/UCL/Recherche/Code/release-1.3.0/gecode/"
Gecode_LIBS="-L/home/szampelli/UCL/Recherche/Code/release-1.3.0/
-lgecodesearch -lgecodeint -lgecodeset -lgecodekernel -lgecodeminimodel"

I has also to comment this depend in build.xml in order to get ant
running :

35 <!--    <depend srcdir="."
36            destdir="build"
37            cache="depcache"
38            closure="yes"
39            />-->

I set up CLASSPATH to point to GecodeJava.jar and build/ directory.

I set up LD_LIBRARY_PATH to point to gecode libraries.

I used the following line inside release-1.0.0 directory :
'/usr/local/jdk1.5.0_09/bin/java -Djava.library.path=. examples.Queens'.

The problem was that libgecodejava library was not pointing toward
gecode libraires, because the '-l' flags during linkage were missing. I
had to add them to Gecode_LIBS.

Hope this will help someone,

Stéphane.





Mikael Zayenz Lagerkvist wrote:

> On 10/3/06, Zampelli Stephane <Stephane.Zampelli at info.ucl.ac.be> wrote:
>
>> I have the following error when executing an example with GecodeJ :
>>
>> GecodeJ/release-1.0.0/$ java -Djava.library.path=. examples.Queens
>> Gecode native code library failed to load.
>> java.lang.UnsatisfiedLinkError:
>> /home/szampelli/UCL/Recherche/Code/GecodeJ/release-1.0.0/libgecodejava.so: 
>>
>> /home/szampelli/UCL/Recherche/Code/GecodeJ/release-1.0.0/libgecodejava.so: 
>>
>> undefined symbol: _ZTIN6Gecode6Search10MemoryStopE
>>
>> I successfully compiled Gecode release-1.3.0 and GecodeJ release-1.0.0.
>
>
> This (most probably) means that the Gecode library was compiled
> without RTTI information, which is needed for the Gecode/J-bindings to
> work.
>
> To fix this, reconfigure Gecode with --disable-gcc-visibility and the 
> recompile.
>
> Hope this helps,
> Mikael
>
> -- 
> Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
>
>


-- 
Zampelli Stéphane
PhD Student
Département d'Ingénierie Informatique,
Université Catholique de Louvain
Réaumur a.337.30
2, place Sainte Barbe
B-1348 Louvain-la-Neuve
tel: +32 10 47.91.02
Homepage : http://www.info.ucl.ac.be/~sz/






More information about the gecode-users mailing list