Compilation error libminizinc with Gecode on Linux

93 views
Skip to first unread message

Christoph Schober

unread,
Dec 23, 2016, 3:11:41 AM12/23/16
to MiniZinc
Hi,

I'm trying to compile libminizinc (git checkout from today) with the gecode 5.0.0 solver on Debian Jessie. Compilation of gecode works without issues, but for libminizinc I get the following error:

First, my cmake line (I redacted my local paths to ...):

cmake -DCMAKE_INSTALL_PREFIX:PATH=.../libminizinc -DOSICBC_HOME=.../cbc-2.9/ -DGECODE_HOME=.../gecode-5.0.0/ ..


The error is:

Scanning dependencies of target minizinc_gecode
[ 76%] Building CXX object CMakeFiles/minizinc_gecode.dir/solvers/gecode/fzn_space.cpp.o
In file included from .../libminizinc/solvers/gecode/fzn_space.cpp:13:0:
.../libminizinc/include/minizinc/solvers/gecode_solverinstance.hh:274:13: error: ‘IntConLevel’ in namespace ‘Gecode’ does not name a type
     Gecode::IntConLevel ann2icl(const Annotation& ann);
             ^
CMakeFiles/minizinc_gecode.dir/build.make:54: recipe for target 'CMakeFiles/minizinc_gecode.dir/solvers/gecode/fzn_space.cpp.o' failed
make[2]: *** [CMakeFiles/minizinc_gecode.dir/solvers/gecode/fzn_space.cpp.o] Error 1
CMakeFiles/Makefile2:161: recipe for target 'CMakeFiles/minizinc_gecode.dir/all' failed
make[1]: *** [CMakeFiles/minizinc_gecode.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2


I saw in the change logs of gecode 5.0.0 that IntConLevel was renamed, but just adjusting this name in the corresponding header file leads to many more errors. On the other hand, the Minizinc IDE seems to work together with gecode 5.0.0 - what am I missing?

best,
Christoph

ps: The IDE seems to do a lot of magic related to the bundled solvers (for example converting the 2.0 flatzinc to 1.6 for the chuffed solver) - is there any place to check these things and to be able to run the same *.mzn-models from commandline without the IDE?

guido.tack

unread,
Dec 23, 2016, 3:50:03 AM12/23/16
to MiniZinc
Just replying to your p.s. here: the IDE doesn't do any magic (the FlatZinc format hasn't changed between 1.6 and 2.0).  You can check the solver configuration in the IDE (e.g. for Chuffed it uses fzn-chuffed as the FlatZinc binary and -Gchuffed as the MiniZinc library option), and then compile and run models from the command line:

mzn2fzn -Gchuffed model.mzn
fzn-chuffed model.fzn | solns2out model.ozn

This assumes that mzn2fzn and fzn-chuffed are on your PATH (for the bundled distribution, they're directly in the package on Linux, or in the MiniZincIDE.app/Contents/Resources directory on Mac OS, or in the Program Files directory where MiniZinc was installed on Windows).

Cheers,
Guido

Christoph Schober

unread,
Jan 4, 2017, 5:55:24 AM1/4/17
to MiniZinc
Thank you for the answer - This definitely helps understanding the toolchain. For some reason I was too focused on the libminizinc library for the solvers, and didn't realize the solvers also bring their own flatzinc tools. 

best,
Christoph 
Reply all
Reply to author
Forward
0 new messages