[SCIP] Error compiling SCIP using Cygwin

Ahmed Hammad a.hammad at unsw.edu.au
Sat Apr 9 13:00:13 CEST 2016


Hi,

This is continuation of my previous message. Once SCIP is successfully built, I get many undefined references relating the library part of scipoptlib  as seen below. (at the end I get a directory named "lib" in the "scipoptsuite-3.2.1" directory which is empty) :

** Build complete.
** Find your SCIP binary in "/scipoptsuite-3.2.1/scip-3.2.1/bin".
** Enter "make test" to solve a number of easy instances in order to verify that SCIP runs correctly.

make[2]: Leaving directory '/scipoptsuite-3.2.1'
make[1]: Leaving directory '/scipoptsuite-3.2.1'
make[1]: Entering directory '/scipoptsuite-3.2.1'
-> generating library lib/libscipopt-3.2.1.cygwin.x86_64.gnu.opt.so
obj/cons_countsols.o:cons_countsols.c:(.text+0xdb9): undefined reference to `__imp___gmpz_set_si' 
obj/cons_countsols.o:cons_countsols.c:(.text+0xdb9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp___gmpz_set_si'
obj/cons_countsols.o:cons_countsols.c:(.text+0xfdb): undefined reference to `__imp___gmpz_clear'
obj/cons_countsols.o:cons_countsols.c:(.text+0xfdb): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp___gmpz_clear'
obj/cons_countsols.o:cons_countsols.c:(.text+0x1736): undefined reference to `__imp___gmpz_fits_sint_p'
obj/cons_countsols.o:cons_countsols.c:(.text+0x1736): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp___gmpz_fits_sint_p'
obj/cons_countsols.o:cons_countsols.c:(.text+0x1747): undefined reference to `__imp___gmpz_get_si'
obj/cons_countsols.o:cons_countsols.c:(.text+0x1747): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp___gmpz_get_si'

________________________________________
From: Ahmed Hammad
Sent: Saturday, 9 April 2016 8:47 PM
To: Stefan Vigerske; scip at zib.de
Subject: Re: [SCIP] Error compiling SCIP using Cygwin

Hi Stefan,

When I try "make SHARED=true ZIMPL=false scipoptlib" I get the following:

: undefined reference to `__imp___gmpq_clear'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x69): undefined reference to `__imp___gmpz_init'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0xa5): undefined reference to `__imp___gmpz_init_set_ui'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0xd0): undefined reference to `__imp___gmpz_lcm'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x12b): undefined reference to `__imp___gmpz_mul'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x132): undefined reference to `__imp___gmpz_divexact'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x203): undefined reference to `__imp___gmpz_set_ui'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x259): undefined reference to `__imp___gmpz_tdiv_q'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x265): undefined reference to `__imp___gmpz_sqrt'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x273): undefined reference to `__imp___gmpz_cmp_ui'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x2f5): undefined reference to `__imp___gmpz_set'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x349): undefined reference to `__imp___gmpz_gcd'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x358): undefined reference to `__imp___gmpz_divexact'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x367): undefined reference to `__imp___gmpz_divexact'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x375): undefined reference to `__imp___gmpz_cmp'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x3a9): undefined reference to `__imp___gmpz_fdiv_q'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x3b8): undefined reference to `__imp___gmpz_fdiv_r'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x3d9): undefined reference to `__imp___gmpz_fdiv_q'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x3e8): undefined reference to `__imp___gmpz_fdiv_r'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x427): undefined reference to `__imp___gmpz_addmul'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x46f): undefined reference to `__imp___gmpz_cmp'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x4a2): undefined reference to `__imp___gmpq_set_num'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x4c8): undefined reference to `__imp___gmpq_set_den'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x4e5): undefined reference to `__imp___gmpq_canonicalize'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x511): undefined reference to `__imp___gmpz_gcd'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x520): undefined reference to `__imp___gmpz_mul'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x52e): undefined reference to `__imp___gmpz_cmp'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x590): undefined reference to `__imp___gmpz_clear'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x665): undefined reference to `__imp___gmpq_set_num'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x685): undefined reference to `__imp___gmpq_set_den'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x6bd): undefined reference to `__imp___gmpz_fdiv_q'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x6d1): undefined reference to `__imp___gmpz_fdiv_r'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x747): undefined reference to `__imp___gmpz_cmp'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x881): undefined reference to `__imp___gmpz_init_set_ui'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x891): undefined reference to `__imp___gmpz_init'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x8a3): undefined reference to `__imp___gmpz_lcm'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x8e5): undefined reference to `__imp___gmpz_mul'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/ratrecon.o:ratrecon.cpp:(.text+0x8ec): undefined reference to `__imp___gmpz_divexact'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/soplex.o:soplex.cpp:(.text+0x3134): undefined reference to `__imp___gmp_version'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/soplex.o:soplex.cpp:(.text+0xc168): undefined reference to `__imp___gmpq_set'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/soplex.o:soplex.cpp:(.text+0xc1fb): undefined reference to `__imp___gmpq_set'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/soplex.o:soplex.cpp:(.text+0xc298): undefined reference to `__imp___gmpq_set'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/soplex.o:soplex.cpp:(.text+0xc32b): undefined reference to `__imp___gmpq_set'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/soplex.o:soplex.cpp:(.text+0xc3c8): undefined reference to `__imp___gmpq_set'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/soplex.o:soplex.cpp:(.text+0xc45b): more undefined references to `__imp___gmpq_set' follow
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/soplex.o:soplex.cpp:(.text+0xe05a): undefined reference to `__imp___gmpq_get_d'
/scipoptsuite-3.2.1/soplex-2.2.1/obj/O.cygwin.x86_64.gnu.opt/lib/soplex.o:soplex.cpp:(.text$_ZN6soplex9SPxLPBaseINS_8RationalEE13changeElementIA1_12__mpq_structEEviiPKT_[_ZN6soplex9SPxLPBaseINS_8RationalEE13changeElementIA1_12__mpq_structEEviiPKT_]+0x8c): undefined reference to `__imp___gmpq_get_d'
collect2: error: ld returned 1 exit status
Makefile.doit:209: recipe for target 'scipoptlib' failed
make[1]: *** [scipoptlib] Error 1
make[1]: Leaving directory '/scipoptsuite-3.2.1'
Makefile:92: recipe for target 'scipoptlib' failed
make: *** [scipoptlib] Error 2


There's more of undefined references which I didn't copy too.

Ahmed

________________________________________
From: Scip <scip-bounces at zib.de> on behalf of Stefan Vigerske <stefan at math.hu-berlin.de>
Sent: Saturday, 9 April 2016 8:09 PM
To: scip at zib.de
Subject: Re: [SCIP] Error compiling SCIP using Cygwin

Hi,

On 04/09/2016 09:49 AM, Ahmed Hammad wrote:
> Hello Matthias,
>
>
> I really appreciate your help. I'm still facing difficulties. I am now able to built SCIP when I use ZIMPL=flase. However, I require ZIMPL for the python interface using make SHARED=true scipoptlib. I still get an error even when I copied the previous ZIMPL files that you attached. The error is as follows when I run "make" (without setting ZIMPL = false):

Why?
What about make SHARED=true ZIMPL=false scipoptlib ?

Stefan

>
>
> ** Building ZIMPL library "/scipoptsuite-3.2.1/zimpl-3.3.3/lib/libzimpl.cygwin.x86_64.gnu.opt.a".
> make[2]: Entering directory '/scipoptsuite-3.2.1/zimpl-3.3.3'
> -> compiling obj/O.cygwin.x86_64.gnu.normal.opt/blkmem.o
> src/blkmem.c:1:0: error: CPU you selected does not support x86-64 instruction set
>   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
>   ^
> src/blkmem.c:1:0: error: CPU you selected does not support x86-64 instruction set
> Makefile:249: recipe for target 'obj/O.cygwin.x86_64.gnu.normal.opt/blkmem.o' failed
> make[2]: *** [obj/O.cygwin.x86_64.gnu.normal.opt/blkmem.o] Error 1
> make[2]: Leaving directory '/scipoptsuite-3.2.1/zimpl-3.3.3'
> Makefile.doit:149: recipe for target '/scipoptsuite-3.2.1/zimpl-3.3.3/lib/libzimpl.cygwin.x86_64.gnu.opt.a' failed
> make[1]: *** [/scipoptsuite-3.2.1/zimpl-3.3.3/lib/libzimpl.cygwin.x86_64.gnu.opt.a] Error 2
> make[1]: Leaving directory '/scipoptsuite-3.2.1'
> Makefile:87: recipe for target 'scipbinary' failed
> make: *** [scipbinary] Error 2
>
>
>
> This is the error I get when I run "make SHARED=true scipoptlib" :
>
>
> -> compiling obj/O.cygwin.x86_64.gnu.normal.opt/blkmem.o
> src/blkmem.c:1:0: warning: -fPIC ignored for target (all code is position independent)
>   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
>   ^
> src/blkmem.c:1:0: error: CPU you selected does not support x86-64 instruction set
> src/blkmem.c:1:0: error: CPU you selected does not support x86-64 instruction set
> Makefile:249: recipe for target 'obj/O.cygwin.x86_64.gnu.normal.opt/blkmem.o' failed
> make[3]: *** [obj/O.cygwin.x86_64.gnu.normal.opt/blkmem.o] Error 1
> make[3]: Leaving directory '/scipoptsuite-3.2.1/zimpl-3.3.3'
> Makefile.doit:149: recipe for target '/scipoptsuite-3.2.1/zimpl-3.3.3/lib/libzimpl.cygwin.x86_64.gnu.opt.a' failed
> make[2]: *** [/scipoptsuite-3.2.1/zimpl-3.3.3/lib/libzimpl.cygwin.x86_64.gnu.opt.a] Error 2
> make[2]: Leaving directory '/scipoptsuite-3.2.1'
> Makefile:87: recipe for target 'scipbinary' failed
> make[1]: *** [scipbinary] Error 2
> make[1]: Leaving directory '/scipoptsuite-3.2.1'
> Makefile:92: recipe for target 'scipoptlib' failed
> make: *** [scipoptlib] Error 2
>
>
> I tried to compile without copying over your ZIMPL files and I still get an error just like in my previous message (my windows is 64 bits by the way).I require a python interface for a project I am working on so your help would be great.
>
> Thanks
>
> Ahmed
>
>
> ________________________________
> From: Matthias Miltenberger <miltenberger at zib.de>
> Sent: Friday, 8 April 2016 5:20 PM
> To: Ahmed Hammad; scip at zib.de
> Subject: Re: [SCIP] Error compiling SCIP using Cygwin
>
> Dear Ahmed,
>
> you did not do what I told you in my previous answer! I attached a corrected sub-makefile.
>
> For your second compiling error: The ZIMPL x86_64 sub-makefile is missing for cygwin. I attached them as well.
> You might consider compiling with ZIMPL=false if you can't solve the issue and don't need ZIMPL.
>
> all the best
> Matthias
>
>
> On 08.04.2016 02:55, Ahmed Hammad wrote:
>
> Hi Matthias,
>
>
> I tried extending "CPPFLAGS" parameter but I still get the same error. This is how I extended CPPFLAGS (I attached "make.cygwin.x86_64.gnu" above too) :
>
>
> CPPFLAGS += -m64LDFLAGS  += -m64ifneq ($(OPT),opt-gccold)ifneq ($(OPT),dbgOFLAGS          +=      -mtune=native  # -malign-double -mcpu=pentium4 endif
> endif
>
> ifeq ($(SHARED),true)
> LIBBUILDFLAGS += -D_WIN64 +=      -m64
> endif
>
> When I tried using LEGACY=true I got the following error:
>
> ** Building ZIMPL library "/scipoptsuite-3.2.1/zimpl-3.3.3/lib/libzimpl.cygwin.x86_64.gnu.opt.a".
> make[2]: Entering directory '/scipoptsuite-3.2.1/zimpl-3.3.3'
> Makefile:135: make/make.cygwin.x86_64.gnu.opt: No such file or directory
> make[2]: *** No rule to make target 'make/make.cygwin.x86_64.gnu.opt'.  Stop.
> make[2]: Leaving directory '/scipoptsuite-3.2.1/zimpl-3.3.3'
> Makefile.doit:149: recipe for target '/scipoptsuite-3.2.1/zimpl-3.3.3/lib/libzimpl.cygwin.x86_64.gnu.opt.a' failed
> make[1]: *** [/scipoptsuite-3.2.1/zimpl-3.3.3/lib/libzimpl.cygwin.x86_64.gnu.opt.a] Error 2
> make[1]: Leaving directory '/scipoptsuite-3.2.1'
> Makefile:87: recipe for target 'scipbinary' failed
> make: *** [scipbinary] Error 2
>
> Thanks for your help
>
> Ahmed
>
>
>
> ________________________________
> From: Matthias Miltenberger <miltenberger at zib.de><mailto:miltenberger at zib.de>
> Sent: Friday, 8 April 2016 5:20 AM
> To: Ahmed Hammad; scip at zib.de<mailto:scip at zib.de>
> Subject: Re: [SCIP] Error compiling SCIP using Cygwin
>
> Dear Ahmed,
>
> for some reason the flag "_WIN32" or "_WIN64" is not set when using cygwin. You can do that manually be adjusting the corresponding sub-makefiles "make.cygwin.x86.gnu" or "make.cygwin.x86_64.gnu" in "soplex-2.2.1/make/":
> Simply add " -D_WIN32" or " -D_WIN64", respectively,  in the first line, extending the "CPPFLAGS" parameter.
>
> Hope that helps!
> You might also try the make option "LEGACY=true", disabling the rational solving capabilities of SoPlex.
>
> cheers
> Matthias
>
> On 07.04.2016 12:08, Ahmed Hammad wrote:
>
> Hello all,
>
>
> I have been trying to compile SCIP on windows using Cygwin. So I downloaded scipoptsuite-3.2.1. Once I untar it and try to built it using make I get the following error when it tries to build the Soplex library:
>
>
> -> compiling obj/O.cygwin.x86_64.gnu.opt/lib/rational.o
> src/rational.cpp: In function 'std::string soplex::rationalToString(const soplex                                                                                 ::Rational&, int)':
> src/rational.cpp:1970:46: error: 'fmemopen' was not declared in this scope
>         tmpStream = fmemopen(tmpString, 63, "w");
>                                                ^
> Makefile:609: recipe for target 'obj/O.cygwin.x86_64.gnu.opt/lib/rational.o' fai                                                                                 led
> make[3]: *** [obj/O.cygwin.x86_64.gnu.opt/lib/rational.o] Error 1
> make[3]: Leaving directory '/scipoptsuite-3.2.1/soplex-2.2.1'
> Makefile:473: recipe for target 'makelibfile' failed
> make[2]: [makelibfile] Error 2 (ignored)
> make[3]: Entering directory '/scipoptsuite-3.2.1/soplex-2.2.1'
> -> compiling obj/O.cygwin.x86_64.gnu.opt/lib/rational.o
> src/rational.cpp: In function 'std::string soplex::rationalToString(const soplex::Rational&, int)':
> src/rational.cpp:1970:46: error: 'fmemopen' was not declared in this scope
>         tmpStream = fmemopen(tmpString, 63, "w");
>
>
> How to I deal with this. Please help
>
>
> Ahmed
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de<mailto:Scip at zib.de>
> http://listserv.zib.de/mailman/listinfo/scip
>
>
>
> --
> \__________________
>
> Matthias Miltenberger
> Zuse Institute Berlin
> Takustr. 7, 14195 Berlin
> www.zib.de/miltenberger<http://www.zib.de/miltenberger>
> miltenberger at zib.de<mailto:miltenberger at zib.de>
> +49 (30) 841 85-245
>
>
> --
> \__________________
>
> Matthias Miltenberger
> Zuse Institute Berlin
> Takustr. 7, 14195 Berlin
> www.zib.de/miltenberger<http://www.zib.de/miltenberger>
> miltenberger at zib.de<mailto:miltenberger at zib.de>
> +49 (30) 841 85-245
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>


--
http://www.gams.com/~stefan
_______________________________________________
Scip mailing list
Scip at zib.de
http://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list