Question

I am trying to install the SCIP optimisation suite version 3.1.0

http://scip.zib.de/download.php?fname=scipoptsuite-3.1.0.tgz

The software is compiled by typing the 'make' command in the scipoptsuite-3.1.0 directory. The package contains three constituent packages (SCIP, soplex and zimpl). There is a makefile for the general package (scipoptsuite) and also a makefile for the three constituent packages. I am having great difficulties when it comes to the compilation of zimpl.

The error occurs when attempting to compile using the code within the zimpl makefile. There is an attempt to generate a library and to store object files within that library.

I am now going to provide some of the relevant code to the problem.

Here are some key definitions:

AR      =   ar cr
ARFLAGS     =   
RANLIB      =   ranlib


LIBBASE     =   blkmem.o bound.o code.o conname.o define.o elem.o entry.o \
            hash.o heap.o idxset.o inst.o iread.o list.o \
            load.o local.o metaio.o mmlparse2.o mmlscan.o mono.o \
            mshell.o prog.o random.o rdefpar.o source.o \
            setempty.o setpseudo.o setlist.o setrange.o setprod.o \
            setmulti.o set4.o stmt.o stkchk.o strstore2.o symbol.o \
            term2.o tuple.o vinst.o zimpllib.o
LIBDIR      =   lib
LIBRARY     =   $(LIBDIR)/lib$(LIBNAME).a
LIBNAME     =   $(NAME)-$(VERSION).$(BASE)

OBJDIR      =   obj/O.$(OSTYPE).$(ARCH).$(COMP).$(LINK).$(OPT)
LIBOBJ      =   $(LIBBASE) gmpmisc.o numbgmp.o
LIBXXX      =   $(addprefix $(OBJDIR)/,$(LIBOBJ))

And here is the key segment of code which causes the error:

$(LIBRARY): $(OBJDIR) $(LIBDIR) $(LIBXXX) 
        @echo "-> generating library $@"
        -rm -f $(LIBRARY)
        $(AR) $@ $(LIBXXX) $(ARFLAGS) 
        $(RANLIB) $@

Which generates the following error message:

** Building ZIMPL library "mypath/scipoptsuite-3.1.0/zimpl-3.3.2/lib/libzimpl.linux.arm.gnu.opt.a".
make[2]: Entering directory `mypath/scipoptsuite-3.1.0/zimpl-3.3.2'
-> generating library lib/libzimpl-3.3.2.linux.arm.gnu.opt.a
ar: crs: No such file or directory
make[2]: *** [lib/libzimpl-3.3.2.linux.arm.gnu.opt.a] Error 1
make[2]: Leaving directory `mypath/scipoptsuite-3.1.0/zimpl-3.3.2'
make[1]: *** [mypath/scipoptsuite-3.1.0/zimpl-3.3.2/lib/libzimpl.linux.arm.gnu.opt.a] Error 2
make[1]: Leaving directory `mypath/scipoptsuite-3.1.0'
make: *** [scipbinary] Error 2

I would particularly like to bring your attention to the following line within that segment of code:

ar: crs: No such file or directory

I am not really sure what the 'crs' aspect of that line is referring to, or even why any error is generated at all. Any help on this matter would be greatly appreciated. I am truly stumped at this point.

Was it helpful?

Solution

Change :

AR      =   ar cr
ARFLAGS =   

To :

ARFLAGS += cs

And :

$(AR) $@ $(LIBXXX) $(ARFLAGS)

To :

$(AR) $(ARFLAGS) $@ $(LIBXXX)

ar is to be invoked like this (man ar(1)):

ar [--plugin name] [-X32_64] [-]p[mod [relpos] [count]] [--target bfdname] archive [member...]

So its flags can't be at the end of the command line if not marked as such, like -crs.

Also, make already define $(AR) and $(ARFLAGS) for you, there is no need for you to specify it again.

$ make -p | grep "^AR"
AR = ar
ARFLAGS = rv
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top