So I got the scip suit from here and make
ed 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
Everything works fine until make soplex
, where I see the following error. Any idea?
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libsoplex-2.0.1.darwin.x86_64.gnu.opt.so] Error 1
make[1]: [makelibfile] Error 2 (ignored)
-> generating library lib/libsoplex-2.0.1.darwin.x86_64.gnu.opt.so
Undefined symbols for architecture x86_64:
"___gmp_version", referenced from:
soplex::SoPlex::printVersion() const in soplex.o
"___gmpq_add", referenced from:
soplex::Rational::operator+(soplex::Rational const&) const in rational.o
soplex::Rational::operator+=(soplex::Rational const&) const in rational.o
soplex::Rational::operator+(double const&) const in rational.o
soplex::Rational::operator+=(double const&) const in rational.o
soplex::operator+(double const&, soplex::Rational const&) in rational.o
"___gmpq_canonicalize", referenced from:
soplex::Rational::readString(char const*) in rational.o
soplex::readStringRational(char const*, soplex::Rational&) in rational.o
"___gmpq_clear", referenced from:
soplex::Rational::~Rational() in rational.o
soplex::Rational::~Rational() in rational.o
soplex::Rational::freeListMem() in rational.o
soplex::Rational::disableListMem() in rational.o
soplex::Rational::operator+(soplex::Rational const&) const in rational.o
soplex::Rational::operator+(double const&) const in rational.o
soplex::Rational::operator+=(double const&) const in rational.o
...
"___gmpq_cmp", referenced from:
soplex::Rational::isNextTo(double const&) in rational.o
soplex::operator<(soplex::Rational const&, soplex::Rational const&) in rational.o
soplex::Rational::isAdjacentTo(double const&) in rational.o
soplex::operator<=(soplex::Rational const&, soplex::Rational const&) in rational.o
soplex::Rational const& soplex::operator>(soplex::Rational const&) in rational.o
soplex::operator>=(soplex::Rational const&, soplex::Rational const&) in rational.o
soplex::operator<(soplex::Rational const&, double const&) in rational.o
...
"___gmpq_div", referenced from:
soplex::Rational::operator/(soplex::Rational const&) const in rational.o
soplex::Rational::operator/=(soplex::Rational const&) const in rational.o
soplex::Rational::operator/(double const&) const in rational.o
soplex::Rational::operator/=(double const&) const in rational.o
soplex::Rational::readString(char const*) in rational.o
soplex::readStringRational(char const*, soplex::Rational&) in rational.o
soplex::operator/(double const&, soplex::Rational const&) in rational.o
...
"___gmpq_equal", referenced from:
soplex::operator==(soplex::Rational const&, soplex::Rational const&) in rational.o
soplex::operator!=(soplex::Rational const&, soplex::Rational const&) in rational.o
soplex::operator==(soplex::Rational const&, double const&) in rational.o
soplex::operator!=(soplex::Rational const&, double const&) in rational.o
soplex::operator==(double const&, soplex::Rational const&) in rational.o
soplex::operator!=(double const&, soplex::Rational const&) in rational.o
"___gmpq_get_d", referenced from:
soplex::Rational::operator double() const in rational.o
soplex::Rational::operator long double() const in rational.o
soplex::Rational::isNextTo(double const&) in rational.o
soplex::Rational::isAdjacentTo(double const&) in rational.o
soplex::rationalToString(soplex::Rational const&, bool) in rational.o
"___gmpq_get_str", referenced from:
soplex::rationalToString(soplex::Rational const&, bool) in rational.o
soplex::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, soplex::Rational const&) in rational.o
"___gmpq_init", referenced from:
soplex::Rational::Rational() in rational.o
soplex::Rational::Rational() in rational.o
soplex::Rational::Rational(soplex::Rational const&) in rational.o
soplex::Rational::Rational(long double const&) in rational.o
soplex::Rational::Rational(double const&) in rational.o
soplex::Rational::Rational(int const&) in rational.o
soplex::Rational::Rational(__mpq_struct const (&) [1]) in rational.o
...
"___gmpq_mul", referenced from:
soplex::Rational::operator*(soplex::Rational const&) const in rational.o
soplex::Rational::operator*=(soplex::Rational const&) const in rational.o
soplex::Rational::operator*(double const&) const in rational.o
soplex::Rational::operator*=(double const&) const in rational.o
soplex::Rational::readString(char const*) in rational.o
soplex::readStringRational(char const*, soplex::Rational&) in rational.o
soplex::operator*(double const&, soplex::Rational const&) in rational.o
...
"___gmpq_set", referenced from:
soplex::Rational::Rational(soplex::Rational const&) in rational.o
soplex::Rational::Rational(__mpq_struct const (&) [1]) in rational.o
soplex::Rational::operator=(soplex::Rational const&) in rational.o
soplex::Rational::operator=(__mpq_struct const (&) [1]) in rational.o
soplex::abs(soplex::Rational const&) in rational.o
soplex::Rational::readString(char const*) in rational.o
soplex::operator-(soplex::Rational const&) in rational.o
...
"___gmpq_set_d", referenced from:
soplex::Rational::Rational(long double const&) in rational.o
soplex::Rational::Rational(double const&) in rational.o
soplex::Rational::Rational(int const&) in rational.o
soplex::Rational::operator=(long double const&) in rational.o
soplex::Rational::operator=(double const&) in rational.o
soplex::Rational::operator=(int const&) in rational.o
soplex::Rational::operator+=(double const&) const in rational.o
...
"___gmpq_set_str", referenced from:
soplex::Rational::readString(char const*) in rational.o
soplex::readStringRational(char const*, soplex::Rational&) in rational.o
"___gmpq_set_z", referenced from:
soplex::Rational::readString(char const*) in rational.o
soplex::readStringRational(char const*, soplex::Rational&) in rational.o
"___gmpq_sub", referenced from:
soplex::Rational::operator-(soplex::Rational const&) const in rational.o
soplex::Rational::operator-=(soplex::Rational const&) const in rational.o
soplex::Rational::operator-(double const&) const in rational.o
soplex::Rational::operator-=(double const&) const in rational.o
soplex::Rational::isNextTo(double const&) in rational.o
soplex::operator-(double const&, soplex::Rational const&) in rational.o
"___gmpz_clear", referenced from:
soplex::Rational::readString(char const*) in rational.o
soplex::readStringRational(char const*, soplex::Rational&) in rational.o
"___gmpz_init", referenced from:
soplex::Rational::readString(char const*) in rational.o
soplex::readStringRational(char const*, soplex::Rational&) in rational.o
"___gmpz_sizeinbase", referenced from:
soplex::rationalToString(soplex::Rational const&, bool) in rational.o
soplex::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, soplex::Rational const&) in rational.o
"___gmpz_ui_pow_ui", referenced from:
soplex::Rational::readString(char const*) in rational.o
soplex::readStringRational(char const*, soplex::Rational&) in rational.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libsoplex-2.0.1.darwin.x86_64.gnu.opt.so] Error 1
make[1]: [all] Error 2 (ignored)
Install SoPlex library into lib directory
install: illegal option -- t
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make: [soplex] Error 64 (ignored)
Here is the GCC version number:
MacBook-Pro-7:jni i-danielk$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
The problem is that "gmp" is missing on your system. You have two options:
make soplex GMP=false
A similar issue might come up with the zlib. If this library is not installed on your system. If this is the case you can use
make soplex GMP=false ZLIB=false
The next step will ask you to compile SCIP. If you do not install gmp, you need to use the following command:
make scip GMP=false ZIMPL=false