[SCIP] Trying to compile SCIP under windows 7 x64

Benjamin Müller benjamin.mueller at zib.de
Wed Jun 15 17:45:17 CEST 2016


Dear SCIP community,

after a private conversation with Rubén we have solved all issues when 
compiling SCIP on Windows with the gcc compiler of MinGW.

After installing MinGW and msys on Windows you need to make sure that 
you are using the gcc compiler installed with the MinGW package manager. 
Executing "gcc" will call a too old version of gcc which has been 
installed with msys. To solve this issue you can either modify your PATH 
variable or simply remove the old gcc version (if not needed anymore). 
After this step you can compile SCIP with:

	make ZIMPL=false GMP=false ZLIB=false READLINE=false

Anyway, there are several issues with GMP when installing MinGW and msys 
separately. During the configuration step of GMP some gcc libraries 
couldn't be found because (I guess) of the structure of the MinGW and 
msys directories.

We recommend to use a MinGW-msys bundle to solve both issues described 
above. You can find bundles like this, e.g., here:

	https://sourceforge.net/projects/mingwbundle/files/

After installing a bundle you can compile SCIP as it is described here 
http://scip.zib.de/doc/html/MAKE.php.


Best regards,
Benny


On 06/13/2016 11:46 AM, Rubén Ruiz wrote:
> Dear Benjamin,
>
> Thank you very much for your quick response. Awesome.
>
> Well, this is rather strange, according to MinGW Installation manager I
> have gcc 4.9..3-1 in the MinGW base system. However, opening a MSYS
> window and going gcc --version throws a 3.4.4 version (msys special).
>
> Tried these commands in the MSYS window:
>
> mingw-get install gcc
> mingw-get install gcc g++ mingw32-make
> mingw-get update
> mingw-get upgrade
>
> But gcc version still listed as 3.4.4
>
> Arg... I solve a problem, another pops up.
>
> On a side note, I added the path variable. Command make on SCIP still
> fails to find zlib.h
>
> Sorry, I look like a noob.
>
> Best,
>
>
> El 13/06/2016 a las 11:03, Benjamin Müller escribió:
>> Dear Ruben,
>>
>> I just tried the same and I did not have any problems with the
>> -mtune=native option. Could it be that your gcc compiler is too old (I
>> use 4.9.3 on my MinGW)?
>>
>> I guess the problem why it can not find zlib.h when compiling ZIMPL is
>> that "C:\MinGW\include" is missing in your path variable. Can you add
>> it and try if ZIMPL now compiles? Please send me the output with
>> VERBOSE=true if you get any error.
>>
>>
>> Best,
>> Benny
>>
>>
>> On 06/13/2016 09:25 AM, Rubén Ruiz wrote:
>>> Hi everyone, thank you for accepting the request to join the list,
>>>
>>> After carefully installing minGW and SCIP, following these instructions:
>>> http://scip.zib.de/doc/html/MAKE.php
>>>
>>> I seem to have compiled and installed zlib-1.2.3, pcre-7.0-lib and
>>> gmp-6.1.0.
>>>
>>> When installing SCIP 3.2.1, the make READLINE=false in a MSYS window I
>>> get this:
>>>
>>> $ make READLINE=false
>>> make[1]: Entering directory `/c/scip'
>>> ** Creating directory "/c/scip/scip-3.2.1/lib/zimplinc".
>>>
>>> ** Building SoPlex library
>>> "/c/scip/soplex-2.2.1/lib/libsoplex.mingw.x86.gnu.opt
>>> .a".
>>> make[2]: Entering directory `/c/scip/soplex-2.2.1'
>>> make[3]: Entering directory `/c/scip/soplex-2.2.1'
>>> make[3]: Leaving directory `/c/scip/soplex-2.2.1'
>>> make[3]: Entering directory `/c/scip/soplex-2.2.1'
>>> -> compiling obj/O.mingw.x86.gnu.opt/lib/changesoplex.o
>>> src/changesoplex.cpp:1: error: bad value (native) for -mtune= switch
>>> make[3]: *** [obj/O.mingw.x86.gnu.opt/lib/changesoplex.o] Error 1
>>> make[3]: Leaving directory `/c/scip/soplex-2.2.1'
>>> make[2]: [makelibfile] Error 2 (ignored)
>>> make[3]: Entering directory `/c/scip/soplex-2.2.1'
>>> -> compiling obj/O.mingw.x86.gnu.opt/lib/changesoplex.o
>>> src/changesoplex.cpp:1: error: bad value (native) for -mtune= switch
>>> make[3]: *** [obj/O.mingw.x86.gnu.opt/lib/changesoplex.o] Error 1
>>> make[3]: Leaving directory `/c/scip/soplex-2.2.1'
>>> make[2]: [all] Error 2 (ignored)
>>> make[2]: Leaving directory `/c/scip/soplex-2.2.1'
>>>
>>> ** Building ZIMPL library
>>> "/c/scip/zimpl-3.3.3/lib/libzimpl.mingw.x86.gnu.opt.a"
>>> .
>>> make[2]: Entering directory `/c/scip/zimpl-3.3.3'
>>> -> compiling obj/O.mingw.x86.gnu.normal.opt/iread.o
>>> src/iread.c:40:18: zlib.h: No such file or directory
>>> make[2]: *** [obj/O.mingw.x86.gnu.normal.opt/iread.o] Error 1
>>> make[2]: Leaving directory `/c/scip/zimpl-3.3.3'
>>> make[1]: *** [/c/scip/zimpl-3.3.3/lib/libzimpl.mingw.x86.gnu.opt.a]
>>> Error 2
>>> make[1]: Leaving directory `/c/scip'
>>> make: *** [scipbinary] Error 2
>>>
>>>
>>> I am clueless about the inability to compile SOPLEX as those
>>> -mtune=switch errors are killing me.
>>> As for ZIMPL I do not understand why zlib.h is not present as this is
>>> what I get when I compile zlib:
>>>
>>> "
>>> Ruben at CasaRuben /zlib-1.2.3-src/src/zlib/1.2.3/zlib-1.2.3
>>> $ configure --prefix=/minGW
>>> Checking for gcc...
>>> Building static library libz.a version 1.2.3 with gcc.
>>> Checking for unistd.h... Yes.
>>> Checking whether to use vs[n]printf() or s[n]printf()... using
>>> vs[n]printf()
>>> Checking for vsnprintf() in stdio.h... Yes.
>>> Checking for return value of vsnprintf()... Yes.
>>> Checking for errno.h... Yes.
>>> Checking for mmap support... Yes.
>>>
>>> Ruben at CasaRuben /zlib-1.2.3-src/src/zlib/1.2.3/zlib-1.2.3
>>> $ make
>>> gcc -O3 -DUSE_MMAP   -c -o example.o example.c
>>> gcc -O3 -DUSE_MMAP   -c -o adler32.o adler32.c
>>> gcc -O3 -DUSE_MMAP   -c -o compress.o compress.c
>>> gcc -O3 -DUSE_MMAP   -c -o crc32.o crc32.c
>>> gcc -O3 -DUSE_MMAP   -c -o gzio.o gzio.c
>>> gcc -O3 -DUSE_MMAP   -c -o uncompr.o uncompr.c
>>> gcc -O3 -DUSE_MMAP   -c -o deflate.o deflate.c
>>> gcc -O3 -DUSE_MMAP   -c -o trees.o trees.c
>>> gcc -O3 -DUSE_MMAP   -c -o zutil.o zutil.c
>>> gcc -O3 -DUSE_MMAP   -c -o inflate.o inflate.c
>>> gcc -O3 -DUSE_MMAP   -c -o infback.o infback.c
>>> gcc -O3 -DUSE_MMAP   -c -o inftrees.o inftrees.c
>>> gcc -O3 -DUSE_MMAP   -c -o inffast.o inffast.c
>>> ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o
>>> trees.o zut
>>> il.o inflate.o infback.o inftrees.o inffast.o
>>> gcc -O3 -DUSE_MMAP -o example example.o -L. libz.a
>>> gcc -O3 -DUSE_MMAP   -c -o minigzip.o minigzip.c
>>> gcc -O3 -DUSE_MMAP -o minigzip minigzip.o -L. libz.a
>>>
>>> Ruben at CasaRuben /zlib-1.2.3-src/src/zlib/1.2.3/zlib-1.2.3
>>>
>>> $ make install
>>> cp zlib.h zconf.h /minGW/include
>>> chmod 644 /minGW/include/zlib.h /minGW/include/zconf.h
>>> cp libz.a /minGW/lib
>>> cd /minGW/lib; chmod 755 libz.a
>>> cd /minGW/lib; if test -f libz.so.1.2.3; then \
>>>            rm -f libz.so libz.so.1; \
>>>            ln -s libz.so.1.2.3 libz.so; \
>>>            ln -s libz.so.1.2.3 libz.so.1; \
>>>            (ldconfig || true)  >/dev/null 2>&1; \
>>>          fi
>>> cp zlib.3 /minGW/share/man/man3
>>> chmod 644 /minGW/share/man/man3/zlib.3
>>>
>>> Ruben at CasaRuben /zlib-1.2.3-src/src/zlib/1.2.3/zlib-1.2.3
>>> "
>>>
>>> The system's path environment var contains:
>>>
>>> C:\MinGW;
>>> C:\MinGW\lib;
>>> C:\MinGW\bin;
>>> C:\MinGW\msys\1.0;
>>> C:\MinGW\msys\1.0\bin;
>>> C:\MinGW\msys\1.0\local\bin;
>>> C:\scip\src\objscip;
>>> C:\scip\src\scip;
>>> C:\scip\src;
>>> C:\scip;
>>>
>>> Any idea where I am goofing up?
>>>
>>> I need to compile a code that uses SCIP. It is not my code but somebody
>>> else's and it was compiled under linux (Debian). I want to compile it in
>>> windows and the first step is to compile SCIP.
>>>
>>> I have installed Debian 8.5 distro on a VM using VirtualBox and have
>>> managed to install SCIP, but I had to use make ZLIB=false READLINE=false
>>> ZIMPL=false  (even after downloading, compiling all installing zlib,
>>> pcre, gmp and readline) but that is for another post... Also for another
>>> post the possibility of cross-compiling to Windows on Debian...
>>>
>>> Thank you very much in advance. Your help is very much appreciated.
>>>
>>> Best,
>>> --
>>> Rubén Ruiz García
>>> Full Professor. Head of the Applied Optimization Systems Group
>>> <http://soa.iti.es>
>>>
>>> Department of Applied Statistics, Operations Research and Quality
>>> Universitat Politècnica de València <http://www.upv.es/>
>>> Camino de Vera s/n, Edificio 7A, 46022, Valencia, Spain
>>> rruiz at eio.upv.es <mailto:rruiz at eio.upv.es>
>>> http://soa.iti.es/rruiz
>>>
>>> Editor-in-Chief
>>> Operations Research Perspectives
>>> <http://www.journals.elsevier.com/operations-research-perspectives/>
>>>
>>> Operations Research Perspectives
>>> <http://www.journals.elsevier.com/operations-research-perspectives/>
>>>
>>> European Journal of Industrial Engineering
>>> <http://www.inderscience.com/ejie>
>>>
>>> --
>>> I am a great believer in luck, and I find that the harder I work, the
>>> more I have of it.
>>>                          Thomas Jefferson
>>>
>>>
>>> _______________________________________________
>>> Scip mailing list
>>> Scip at zib.de
>>> http://listserv.zib.de/mailman/listinfo/scip
>>>
>>
>
> --
> Rubén Ruiz García
> Full Professor. Head of the Applied Optimization Systems Group
> <http://soa.iti.es>
>
> Department of Applied Statistics, Operations Research and Quality
> Universitat Politècnica de València <http://www.upv.es/>
> Camino de Vera s/n, Edificio 7A, 46022, Valencia, Spain
> rruiz at eio.upv.es <mailto:rruiz at eio.upv.es>
> http://soa.iti.es/rruiz
>
> Editor-in-Chief
> Operations Research Perspectives
> <http://www.journals.elsevier.com/operations-research-perspectives/>
>
> Operations Research Perspectives
> <http://www.journals.elsevier.com/operations-research-perspectives/>
>
> European Journal of Industrial Engineering
> <http://www.inderscience.com/ejie>
>
> --
> I am a great believer in luck, and I find that the harder I work, the
> more I have of it.
>                          Thomas Jefferson

-- 
______________________________
Benjamin Müller
Zuse Institute Berlin
Takustr. 7, 14195 Berlin
benjamin.mueller at zib.de
+49 30 841 85-195


More information about the Scip mailing list