Generating scip.jar (linux)

172 views Asked by At

So I got the scip suit from here and makeed it. Then I went to scipoptsuite-3.1.1/scip-3.1.1/interfaces/jni and followed the instructions in the README:

1) doxygen jniinterface.dxy
   - generates xml documentation
2) ./createJniInterface.py xml/*
   - uses the xml documentation and creates JNI interface
3) create softlinks to soplex and scip in "lib" folder:
   mkdir ./lib
   cd lib
   ln -s ../../../../soplex-2.0.0 soplex
   ln -s ../../.. scip
   cd ..
4) make soplex
   - creates shared library of Soplex
   - use options (e.g., ZLIB=false GMP=false) as required
5) make scip
   - creates shared library of SCIP
   - use options (e.g., ZIMPL=false READLINE=false ZLIB=false GMP=false)
     as required
6) make
7) test your installation:
   cd examples/JniKnapsack
   make
   make run

At the end when I do make run,I get is the following error:

ubuntu@kanga:~/solvers/scipoptsuite-3.1.1/scip-3.1.1/interfaces/jni/examples/JniKnapsack$ make run
./run.sh
java: symbol lookup error: /home/ubuntu/solvers/scipoptsuite-3.1.1/scip-3.1.1/interfaces/jni/lib/libjscip-0.1.linux.x86_64.gnu.opt.spx.so: undefined symbol: SCIPcreate
make: *** [run] Error 127

Any idea how to resolve this issue?

At some point I had some problems with the make. I had to add the folder containing jni.h as a "-I" option to gcc in the Makefile there.

ubuntu@kanga:~/solvers/scipoptsuite-3.1.1/scip-3.1.1/interfaces/jni$ diff Makefile-ORIG Makefile
55c55,56
< FLAGS     +=  -I$(LIBDIR)/jniinc
---
> #FLAGS        +=  -I$(LIBDIR)/jniinc
> FLAGS     +=  -I/usr/lib/jvm/java-7-openjdk-amd64/include



ubuntu@kanga:~/solvers/scipoptsuite-3.1.1/scip-3.1.1/interfaces/jni$ uname -a
Linux ec2mln0r 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Here is the GCC version number:

ubuntu@kanga:~/solvers/scipoptsuite-3.1.1/scip-3.1.1/interfaces/jni$ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
1

There are 1 answers

0
fserra On

please try changing the rule $(JNILIBFILE) in interfaces/jni/Makefile for

$(JNILIBFILE):  $(OBJDIR) $(JNILIBHEADERS) $(JNILIBDEP) $(JNILIBOBJFILES)
            @echo "-> generating library $@"
            -rm -f $@
            $(LIBBUILD) $(LIBBUILDFLAGS) $(LIBBUILD_o)$@ \
            $(JNILIBOBJFILES) \
            $(LINKCC_L)$(LIBDIR)/ $(LINKCC_l)$(SCIPLIB)$(LINKLIBSUFFIX) \
            $(LINKCC_l)$(LPILIB)$(LINKLIBSUFFIX) \
            $(LINKCC_l)$(NLPILIB)$(LINKLIBSUFFIX) \
            $(LPSLDFLAGS) $(LDFLAGS)
ifneq ($(RANLIB),)
            $(RANLIB) $@
endif