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

Matthias Miltenberger miltenberger at zib.de
Thu Jul 28 16:35:27 CEST 2016


Thank you for sharing this! We will include the corrected build system 
in the next release.

all the best
Matthias

On 26.07.2016 22:18, Matthias Koeppe wrote:
> On Tue, Jul 26, 2016 at 5:50 AM, Matthias Miltenberger
> <miltenberger at zib.de> wrote:
>> 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
> I finally got it working. For the reasons that I explained before, I
> prefer to build libsoplex, libscip, etc. separately and to record the
> library dependencies.
> All of the "make install" scripts are not usable on Mac OS in a shared
> library build. One needs to use "install_name" for the installed
> libraries and binaries to work.
>
> See https://trac.sagemath.org/ticket/21094 for something that works.
>
> It consists of the
>   - spkg-install script which does the installation, using a
> handcrafted set of make variables for soplex and scip
>   - a patch to the scip Makefile to fix the library dependencies.
>
> The result is a set of dylibs that has proper library dependencies.
> This can be checked using "otool -L" (see below). Linking a program
> using "-lscip" then just works.
>
> ============
> otool -L /Users/mkoeppe/cvs/sage/local/lib/libscip.dylib
> /Users/mkoeppe/cvs/sage/local/lib/liblpispx.dylib
> /Users/mkoeppe/cvs/sage/local/lib/libsoplex.dylib
> /Users/mkoeppe/cvs/sage/local/lib/libscip.dylib:
> /Users/mkoeppe/cvs/sage/local/lib/libscip-3.2.1.darwin.x86_64.gnu.opt.dylib
> (compatibility version 0.0.0, current version 0.0.0)
> /Users/mkoeppe/cvs/sage/local/lib/libgmp.16.dylib (compatibility
> version 23.0.0, current version 23.2.0)
> /Users/mkoeppe/cvs/sage/local/lib/libz.1.dylib (compatibility version
> 1.0.0, current version 1.2.8)
> /Users/mkoeppe/cvs/sage/local/lib/libreadline.6.dylib (compatibility
> version 6.0.0, current version 6.3.0)
> /Users/mkoeppe/cvs/sage/local/lib/liblpispx-3.2.1.darwin.x86_64.gnu.opt.dylib
> (compatibility version 0.0.0, current version 0.0.0)
> /Users/mkoeppe/cvs/sage/local/lib/libnlpi.cppad-3.2.1.darwin.x86_64.gnu.opt.dylib
> (compatibility version 0.0.0, current version 0.0.0)
> /Users/mkoeppe/cvs/sage/local/lib/libstdc++.6.dylib (compatibility
> version 7.0.0, current version 7.20.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> version 1226.10.1)
> /Users/mkoeppe/cvs/sage/local/lib/libgcc_s.1.dylib (compatibility
> version 1.0.0, current version 1.0.0)
>
> /Users/mkoeppe/cvs/sage/local/lib/liblpispx.dylib:
> /Users/mkoeppe/cvs/sage/local/lib/liblpispx-3.2.1.darwin.x86_64.gnu.opt.dylib
> (compatibility version 0.0.0, current version 0.0.0)
> /Users/mkoeppe/cvs/sage/local/lib/libgmp.16.dylib (compatibility
> version 23.0.0, current version 23.2.0)
> /Users/mkoeppe/cvs/sage/local/lib/libz.1.dylib (compatibility version
> 1.0.0, current version 1.2.8)
> /Users/mkoeppe/cvs/sage/local/lib/libreadline.6.dylib (compatibility
> version 6.0.0, current version 6.3.0)
> /Users/mkoeppe/cvs/sage/local/lib/libsoplex-2.2.1.darwin.x86_64.gnu.opt.dylib
> (compatibility version 0.0.0, current version 0.0.0)
> /Users/mkoeppe/cvs/sage/local/lib/libstdc++.6.dylib (compatibility
> version 7.0.0, current version 7.20.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> version 1226.10.1)
> /Users/mkoeppe/cvs/sage/local/lib/libgcc_s.1.dylib (compatibility
> version 1.0.0, current version 1.0.0)
>
> /Users/mkoeppe/cvs/sage/local/lib/libsoplex.dylib:
> /Users/mkoeppe/cvs/sage/local/lib/libsoplex-2.2.1.darwin.x86_64.gnu.opt.dylib
> (compatibility version 0.0.0, current version 0.0.0)
> /Users/mkoeppe/cvs/sage/local/lib/libgmp.16.dylib (compatibility
> version 23.0.0, current version 23.2.0)
> /Users/mkoeppe/cvs/sage/local/lib/libz.1.dylib (compatibility version
> 1.0.0, current version 1.2.8)
> /Users/mkoeppe/cvs/sage/local/lib/libstdc++.6.dylib (compatibility
> version 7.0.0, current version 7.20.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> version 1226.10.1)
> /Users/mkoeppe/cvs/sage/local/lib/libgcc_s.1.dylib (compatibility
> version 1.0.0, current version 1.0.0)
> =============
>
> Hoping that you and other SCIP developers find this helpful for
> revising the build system in a future version.
>
> Best
> Matthias

-- 
\__________________

Matthias Miltenberger
Zuse Institute Berlin
Takustr. 7, 14195 Berlin
www.zib.de/miltenberger
miltenberger at zib.de
+49 (30) 841 85-245


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5239 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listserv.zib.de/pipermail/scip/attachments/20160728/01df216f/attachment.p7s>


More information about the Scip mailing list