Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing JSCIPOpt referencing debian package SCIPOptSuite-5.0.1-Linux.deb #13

Open
bphanguyen opened this issue Jun 6, 2018 · 9 comments
Assignees

Comments

@bphanguyen
Copy link

Dear developers,

I'd like to install JSCIPOpt referencing debian package SCIPOptSuite-5.0.1-Linux.deb on a Linux Debian machine, installing SCIPOptSuite-5.0.1-Linux.deb with dpkg is ok,
but I can’t figure out how to refer to installed files (listed by command : dpkg -c SCIPOptSuite-5.0.1-Linux.deb) when compiling JSCIPOpt with Cmake.

I don’t know what path to refer in the option -DSCIP_DIR in the command
$ cmake .. -DSCIP_DIR=/build
(following tutorial https://github.com/SCIP-Interfaces/JSCIPOpt/blob/master/INSTALL.md)

Maybe I’m missing or not understand something.

After compiling with :
$ cmake .. -DSCIP_DIR=/usr/include (for example, the repository where the .h SCIP files are placed)

I tried :
$ make

And that failed at first step :

Logs in English:

Scanning dependencies of target jscip
[10%] Building C object CMakeFiles / jscip.dir / src / scipjni_wrap.c.o
make [2]: *** No rules for making the "libscip-NOTFOUND" target, needed for "Release / libjscip.so". Stop.
CMakeFiles / Makefile2: 67: the recipe for the target "CMakeFiles / jscip.dir / all" failed
make [1]: *** [CMakeFiles / jscip.dir / all] Error 2
Makefile: 83: the recipe for the "all" target has failed
make: *** [all] Error 2

Please kindly let me know if there is a Debian package for JSCIPOpt and how to refer to installed files of SCIPOptSuite-5.0.1-Linux.deb

Please let me know if you need further information.

Thank you very much beforehand,

Best regards,

@fserra
Copy link
Collaborator

fserra commented Jun 7, 2018

Hi

Can you try any of the following three options for compiling JSCIPOpt please

  1. cmake ..
  2. cmake .. -DSCIP_DIR=/usr/
  3. cmake .. -DSCIP_DIR=/usr/lib/

@bphanguyen
Copy link
Author

bphanguyen commented Jun 7, 2018

Hi,

Thanks for your reply.

I tried the 3 of them, resulting in the same error after with command make :

  1. First with 'cmake' :
    -- The C compiler identification is GNU 6.3.0
    -- The CXX compiler identification is GNU 6.3.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Found JNI: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libjawt.so
    -- Found Java: /usr/lib/jvm/java-8-openjdk-amd64/bin/java (found version "1.8.0.171")
    -- Found SWIG: /usr/bin/swig3.0 (found version "3.0.10")
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /myrepo/JSCIPOpt/build_debian

With the logs =
message("${SCIP_DIR}") = /usr/lib/cmake/scip
message("${JNI_INCLUDE_DIRS}") = /usr/lib/jvm/java-8-openjdk-amd64/include;/usr/lib/jvm/java-8-openjdk-amd64/include/linux;/usr/lib/jvm/java-8-openjdk-amd64/include
message("${SCIP_INCLUDE_DIRS}") = /usr/lib/cmake/scip/../../../include
==> /usr/include
message("${PROJECT_SOURCE_DIR}") = /myrepo/JSCIPOpt

  1. Then with 'make' :
    Scanning dependencies of target jscip
    [10%] Building C object CMakeFiles / jscip.dir / src / scipjni_wrap.c.o
    make [2]: *** No rules for making the "libscip-NOTFOUND" target, needed for "Release / libjscip.so". Stop.
    CMakeFiles / Makefile2: 67: the recipe for the target "CMakeFiles / jscip.dir / all" failed
    make [1]: *** [CMakeFiles / jscip.dir / all] Error 2
    Makefile: 83: the recipe for the "all" target has failed
    make: *** [all] Error 2

As you can see, the included directories for SCIP library ${SCIP_DIR} and ${SCIP_INCLUDE_DIRS} always point to the same directories : /usr/lib/cmake/scip and /usr/lib/cmake/scip/../../../include
(==> /usr/include).
I suspect the option ${SCIP_DIR} (-DSCIP_DIR) are not taken into account when pointing to another folder than the standard process :
$ cmake .. -DSCIP_DIR=/build

@fserra
Copy link
Collaborator

fserra commented Jun 7, 2018

mmm so apparently libscip is not being found, which is weird. I don't really know. I am guessing you did mkdir build; cd build; cmake .. -D..... I would try again, removing build and trying cmake ...

Otherwise, I would download the SCIPOptSuite-5.0.1-Linux.sh: Linux self-extracting archive; including SoPlex, ZIMPL, Ipopt, CppAD, zlib, GMP, bliss and put the scipoptsuite in a local directory and use that one for -DSCIP_DIR=

@bphanguyen
Copy link
Author

bphanguyen commented Jun 7, 2018

Thanks for your reply.
Yes I followed the steps in the INSTALL.md : 2a) Building JSCIPOpt on Linux.

I'm trying the mentionned ways and inform you about the result.

@bphanguyen
Copy link
Author

Well, I tried the Linux self-extracting archive and refer to the local repo for
-DSCIP_DIR=/path_to/SCIPOptSuite-5.0.1-Linux

Then I tried : $ make -d (for debug level all) which display :
Pruning the file "CMakeFiles / jscip.dir / build.make".
    Study of the target file "libscip-NOTFOUND".
     The file "libscip-NOTFOUND" does not exist.
     Search for an implicit rule for "libscip-NOTFOUND".
     Try the pattern with "libscip-NOTFOUND" as radical.
     Test for the implicit dependency "libscip-NOTFOUND, v".
     Try the pattern with "libscip-NOTFOUND" as radical.
     Trial of the implicit dependency "RCS / libscip-NOTFOUND, v".
     Try the pattern with "libscip-NOTFOUND" as radical.
     Test of the implicit dependence "RCS / libscip-NOTFOUND".
     Try the pattern with "libscip-NOTFOUND" as radical.
     Test of the implicit dependence "s.libscip-NOTFOUND".
     Try the pattern with "libscip-NOTFOUND" as radical.
     Test of the implicit dependence "SCCS / s.libscip-NOTFOUND".
     No implicit rule found for "libscip-NOTFOUND".
     End dependencies of the target file "libscip-NOTFOUND".
    It is necessary to remake the target "libscip-NOTFOUND".
make [2]: *** No rules for making the "libscip-NOTFOUND" target, needed for "Release / libjscip.so". Stop.
Harvesting the losing child process 0x5618595ff5d0 PID 23549
CMakeFiles / Makefile2: 67: the recipe for the target "CMakeFiles / jscip.dir / all" failed
make [1]: *** [CMakeFiles / jscip.dir / all] Error 2
Removed the child process 0x5618595ff5d0 PID 23549 from the chain.
Harvesting the losing child process 0x558ccbe53ce0 PID 23545
Makefile: 83: the recipe for the "all" target has failed
make: *** [all] Error 2
Removed the child process 0x558ccbe53ce0 PID 23545 from the chain.

So, in file /path_to/JSCIPOpt/build_sh/CMakeFiles/jscip.dir/build.make at line L143, there's a checkpoint :
Release/libjscip.so: libscip-NOTFOUND

I then replace the line 143 with :
Release/libjscip.so: /path_to/SCIPOptSuite-5.0.1-Linux/lib/libscip.so.5.0.1.0

Then $make -d displays :
[10%] Linking C shared library Release / libjscip.so
Harvest process win son 0x5651b56264a0 PID 23480
Active child process 0x5651b56264a0 (Release / libjscip.so) PID 23482
cc: error: libscip-NOTFOUND: No such file or folder
Harvesting the losing child process 0x5651b56264a0 PID 23482
CMakeFiles / jscip.dir / build.make: 147: the recipe for the target "Release / libjscip.so" failed
make [2]: *** [Release / libjscip.so] Error 1
Removed the child process 0x5651b56264a0 PID 23482 from the chain.
Harvesting the losing child process 0x5628908115d0 PID 23479
CMakeFiles / Makefile2: 67: the recipe for the target "CMakeFiles / jscip.dir / all" failed
make [1]: *** [CMakeFiles / jscip.dir / all] Error 2
Removed the child process 0x5628908115d0 PID 23479 from the chain.
Harvesting process loser son 0x562b9a6b8ce0 PID 23475
Makefile: 83: the recipe for the "all" target has failed
make: *** [all] Error 2

Then I come accros the file : /path_to/JSCIPOpt/build_sh/CMakeFiles/jscip.dir/link.txt
And change in this link.txt file the keyword libscip-NOTFOUND by the absolute path to libscip.so :
/path_to/SCIPOptSuite-5.0.1-Linux/lib/libscip.so.5.0.1.0

Then everything works fine! All the steps programmed for the $ make operation go successful.
And I'm even able to run the Java jars examples :
$ cd /path_to/JSCIPOpt/build_sh/Releases
$ java -Djava.library.path=. -cp scip.jar:examples.jar Linear ==> OK!

I then guess that the problem is from the CMake step (of JSCIPOpt).
The dependency Release/libjscip.so couldn't be resolve at some point and replace the full path to libjscip.so (SCIPOptSuite-5.0.1-Linux/lib/libscip.so.5.0.1.0) by the keyword libscip-NOTFOUND, in the above mentionned files build.make and link.txt

Could you please check that issue, why the dependency Release/libjscip.so couldn't be resolve when refering to SCIPOptSuite installed files, installed either through Debian package or Linux self-extract archive?

Thank you very much!

@fserra
Copy link
Collaborator

fserra commented Jun 22, 2018

Ok I tried to install it myself and also had problems. So apparently you must compile SCIP (I am talking linux here) with cmake, because you have to point to the build directory like specified in the instructions

@bphanguyen
Copy link
Author

Hi!
In my dev env, I can compile SCIP with cmake like the suggested instructions. But not in the real work env because of limitations policies.
I'm still able to use SCIP+JSCIPOpt with the above described steps by pointing specifically to the missing files.

Does the solving of this issue in your roadmap?

Thank you very much in advance for your reply.

@fserra
Copy link
Collaborator

fserra commented Jun 25, 2018

I guess @mueldgog would have to have a look at the issue. He is currently unavailable but I think he would be interested to fix this. After all is very strange that it only works from a compiled SCIP and not an installed one.

@bphanguyen
Copy link
Author

Yes, that would be nice.
Please kindly let me know about future development.
Have a nice day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants