[SCIP] Shared library build of SCIP on Mac OS X with gcc

Matthias Koeppe mkoeppe at math.ucdavis.edu
Tue Jul 26 16:23:45 CEST 2016


Hi Matthias,

Thanks for looking into this.
Yes, using the "everything in one shared library" approach with libscipopt
will probably work. I'll test it to be sure and report the results.
The fact that there are two different library setups (libscipopt vs.
Libsoplex/liplpispx/libscip) does seem as if libscipopt is designed as a
workaround for library dependency problems - which could instead be solved
by using pkgconfig and/or libtool.
I guess one reason for compiling separately is that in sage we may want to
support soplex directly in particular for its exact LP features; whereas we
may want to support building SCIP with a different LP solver.

Best,
Matthias

On Tuesday, July 26, 2016, Matthias Miltenberger <miltenberger at zib.de>
wrote:

> Hi Matthias,
>
> please excuse us for not replying earlier.
>
> I just tried to compile the SCIP Opt Suite 3.2.1 on a Mac and worked
> without issues (using the clang compiler); also PySCIPOpt works fine with
> this library. It does indeed generate a .so library instead of an .dylib
> but a at least according to this SO thread this does not seem to be a
> problem:
>
>
> https://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx
>
> Concerning your difficulties with the compilation for Sage, I don't
> understand why you're compiling every component on its own instead of using
> the SCIP Opt Suite Makefile. You should only need the libscipopt.so and the
> include path of SCIP.
>
> all the best
> Matthias
>
>
> On 25.07.2016 21:29, Matthias Koeppe wrote:
>
>> In case anyone is interested, this Sage ticket shows the workarounds
>> that I had to use to get it compiled.
>> https://trac.sagemath.org/ticket/21094
>>
>> On Fri, Jul 15, 2016 at 9:38 AM, Matthias Koeppe
>> <mkoeppe at math.ucdavis.edu> wrote:
>>
>>> I'm trying to make a shared library build of SCIP on Mac OS X with gcc.
>>> Is this supposed to be a supported configuration?
>>> I suspect it is not, because of the error that I get (see below) and
>>> the fact that there is no sign of the "dyld" extension used by Mac OS
>>> X in any of the Makefiles.
>>> Any thoughts?
>>>
>>>
>>> Concretely, I'm using the scipoptsuite 3.2.1 source package and trying
>>> to build within SageMath, which brings its own gcc 4.9.2.
>>>
>>> I'm running:
>>>
>>> make VERBOSE=true SHARED=true USRLDFLAGS="$LDFLAGS"
>>> USRCXXFLAGS="$CXXFLAGS" USRCPPFLAGS="$CPPFLAGS" USRARFLAGS="$LDFLAGS"
>>>
>>> which ends with the following error:
>>>
>>> g++  -L/Users/mkoeppe/cvs/sage/local/lib
>>> -Wl,-rpath,/Users/mkoeppe/cvs/sage/local/lib  -m64 -shared -o
>>> lib/libsoplex-2.2.1.darwin.x86_64.gnu.opt.so
>>> obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/clufactor.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/clufactor_rational.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/didxset.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/enter.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/gzstream.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/idxset.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/leave.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/mpsinput.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/nameset.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/rational.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/ratrecon.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/slufactor.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/slufactor_rational.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/solverational.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/solvereal.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/soplex.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/soplexlegacy.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxautopr.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxbasis.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxboundflippingrt.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxbounds.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxchangebasis.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxdantzigpr.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxdefaultrt.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxdefines.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxdesc.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxdevexpr.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxequilisc.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxfastrt.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxfileio.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxgeometsc.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxgithash.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxharrisrt.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxhybridpr.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxid.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxlpbase_rational.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxlpbase_real.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxmainsm.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxout.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxparmultpr.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxquality.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxscaler.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxshift.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxsolve.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxsolver.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxstarter.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxsteeppr.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxsumst.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxvecs.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxvectorst.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxweightpr.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxweightst.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/spxwritestate.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/statistics.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/usertimer.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/wallclocktimer.o
>>> obj/O.darwin.x86_64.gnu.opt/lib/updatevector.o
>>>
>>> Undefined symbols for architecture x86_64:
>>>
>>>    "___gmpq_add", referenced from:
>>>
>>>        soplex::Rational::operator+(soplex::Rational const&) const in
>>> rational.o
>>>
>>>        soplex::Rational::operator+=(soplex::Rational const&) in
>>> rational.o
>>>
>>>        soplex::Rational::operator+(double const&) const in rational.o
>>>
>>>        soplex::Rational::operator+=(double const&) in rational.o
>>>
>>>        soplex::Rational::operator+(int const&) const in rational.o
>>>
>>>        soplex::Rational::operator+=(int const&) in rational.o
>>>
>>>        soplex::Rational::addProduct(soplex::Rational const&,
>>> soplex::Rational const&) in rational.o
>>>
>>> .....
>>>
>>>    "_gzclose", referenced from:
>>>
>>>        gzstream::gzstreambase::~gzstreambase() in gzstream.o
>>>
>>>        gzstream::gzstreambase::~gzstreambase() in gzstream.o
>>>
>>>        gzstream::gzstreambuf::close()     in gzstream.o
>>>
>>>        gzstream::gzstreambase::~gzstreambase() in gzstream.o
>>>
>>>        gzstream::gzstreambase::close()     in gzstream.o
>>>
>>>        gzstream::gzstreambuf::~gzstreambuf() in gzstream.o
>>>
>>>        gzstream::gzstreambuf::~gzstreambuf() in gzstream.o
>>>
>>>        ...
>>>
>>>
>>> It seems to help to add "-lgmp -lz" on this command line.
>>>
>>>
>>> --
>>> Dr. Matthias Koeppe . . . . . . . . . . .
>>> http://www.math.ucdavis.edu/~mkoeppe
>>> Professor, Mathematics
>>> Chair, Applied Mathematics (Graduate Group) . .
>>> http://appliedmath.ucdavis.edu
>>>
>>
>>
>>
> --
> \__________________
>
> Matthias Miltenberger
> Zuse Institute Berlin
> Takustr. 7, 14195 Berlin
> www.zib.de/miltenberger
> miltenberger at zib.de
> +49 (30) 841 85-245
>
>
>

-- 
Sent from my phone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20160726/ad986056/attachment.html>


More information about the Scip mailing list