scipopt / CSIP

Reduced and simplified C interface to SCIP
MIT License
15 stars 11 forks source link

CSIP fails to compile #31

Closed adowling2 closed 7 years ago

adowling2 commented 7 years ago

CSIP fails of compile when I run Pkg.build("SCIP"). The output is cryptic/difficult to debug:

INFO: Building SCIP
INFO: Attempting to Create directory /home/adowling2/.julia/v0.4/SCIP/deps/downloads
INFO: Directory /home/adowling2/.julia/v0.4/SCIP/deps/downloads already created
INFO: Downloading file https://github.com/SCIP-Interfaces/CSIP/archive/v0.3.5.zip
INFO: Done downloading file https://github.com/SCIP-Interfaces/CSIP/archive/v0.3.5.zip
INFO: Attempting to Create directory /home/adowling2/.julia/v0.4/SCIP/deps/src
INFO: Directory /home/adowling2/.julia/v0.4/SCIP/deps/src already created
INFO: Attempting to Create directory /home/adowling2/.julia/v0.4/SCIP/deps
INFO: Directory /home/adowling2/.julia/v0.4/SCIP/deps already created
INFO: Path /home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5 already created
INFO: Changing Directory to /home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5
gcc -std=c99 -Wall -pedantic -I/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/lib/include -I/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/include -c /home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/src/csip.c -L/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/lib -Wl,-rpath,/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/lib -lscipopt -fPIC -o /home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/src/csip.o
/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/src/csip.c: In function ‘CSIPheurAddSolution’:
/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/src/csip.c:1467:5: warning: passing argument 7 of ‘SCIPtrySolFree’ makes integer from pointer without a cast [enabled by default]
     SCIP_in_CSIP(SCIPtrySolFree(scip, &sol, FALSE, TRUE, TRUE, TRUE, &stored));
     ^
In file included from /home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/src/csip.c:3:0:
/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/lib/include/scip/scip.h:17947:14: note: expected ‘unsigned int’ but argument is of type ‘unsigned int *’
 SCIP_RETCODE SCIPtrySolFree(
              ^
/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/src/csip.c:1467:5: error: too few arguments to function ‘SCIPtrySolFree’
     SCIP_in_CSIP(SCIPtrySolFree(scip, &sol, FALSE, TRUE, TRUE, TRUE, &stored));
     ^
In file included from /home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/src/csip.c:3:0:
/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/lib/include/scip/scip.h:17947:14: note: declared here
 SCIP_RETCODE SCIPtrySolFree(
              ^
make: *** [/home/adowling2/.julia/v0.4/SCIP/deps/src/CSIP-0.3.5/lib/libcsip.so] Error 1
================================[ ERROR: SCIP ]=================================

LoadError: failed process: Process(`make`, ProcessExited(2)) [2]
while loading /home/adowling2/.julia/v0.4/SCIP/deps/build.jl, in expression starting on line 34

================================================================================

I have compiled SCIP per the instructions using

make IPOPT=true SHARED=true GMP=false READLINE=false ZLIB=false scipoptlib

and have confirmed it works with make test. I have also set SCIPOPTDIR. Any suggestions on further debugging this problem?

fserra commented 7 years ago

you need to upgrade to SCIP 4.0

adowling2 commented 7 years ago

I should have included in my original post that this is with SCIP 4.0.0.

fserra commented 7 years ago

ok, so the problem is that you are using scip 4.0.0 with csip 3.5

It seems you need to update SCIP.jl, since the newest versions uses csip 4.0 and not csip 3.5

fserra commented 7 years ago

or maybe you need to upgrade to julia 0.5 or downgrade to scip 3.2.1

adowling2 commented 7 years ago

Switching to Julia v0.5 fixed the issue! Thanks.