在 OSX 上安装 SCIP:过时的 libisl?

Installing SCIP on OSX: outdated libisl?

我正在尝试在 OSX 特立独行者上安装 SCIP。我已经下载了 tarball here,将其解压缩,并尝试使用

编译它
make scipoptlib GMP=false ZLIB=false READLINE=false SHARED=true

这给了我下面的错误 1。我对错误 1 ​​的解释是 /usr/local/lib/libisl.10.dylib 不存在。没错:我有 isl.0.14.1,位于 /usr/local/Cellar/isl/0.14.1。事实上,我无法安装 isl.0.10.1,因为它期望的编译器选项不适用于当前版本的 gcc(我认为;请参见下面的错误 2)。

我可以告诉 SCIP 使用 isl.0.14.1,如果可以,怎么做?

**error 1:**
** Extracting SoPlex archive "/Applications/scipoptsuite-3.2.0/soplex-2.2.0.tgz".
    ** Extracting ZIMPL archive "/Applications/scipoptsuite-3.2.0/zimpl-3.3.3.tgz".
    ** Extracting SCIP archive "/Applications/scipoptsuite-3.2.0/scip-3.2.0.tgz".
    ** compile libraries statically with compiler flag -fPIC
    rm -rf obj/O.darwin.x86_64.gnu.normal.opt/* bin/zimpl-3.3.3.darwin.x86_64.gnu.normal.opt lib/libzimpl-3.3.3.darwin.x86_64.gnu.opt.a lib/libzimpl-3.3.3.darwin.x86_64.gnu.opt.dbl.a lib/libzimpl.darwin.x86_64.gnu.opt.a bin/zimpl.darwin.x86_64.gnu.opt bin/zimpl
    ** Creating directory "/Applications/scipoptsuite-3.2.0/scip-3.2.0/lib".
    ** Creating directory "/Applications/scipoptsuite-3.2.0/scip-3.2.0/lib/zimplinc".

    ** Building SoPlex library "/Applications/scipoptsuite-3.2.0/soplex-2.2.0/lib/libsoplex.darwin.x86_64.gnu.opt.a".
    -> compiling obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o
    dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
      Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1plus
      Reason: image not found
    g++: internal compiler error: Trace/BPT trap: 5 (program cc1plus)
    make[4]: *** [obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o] Abort trap: 6
    make[3]: [makelibfile] Error 2 (ignored)
    -> compiling obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o
    dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
      Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1plus
      Reason: image not found
    g++: internal compiler error: Trace/BPT trap: 5 (program cc1plus)
    make[4]: *** [obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o] Abort trap: 6
    make[3]: [all] Error 2 (ignored)

    ** ZIMPL support disabled.

    ** Creating necessary soft-links.

    ** Building SCIP libraries and executable.
    -> generating necessary links

    - Current settings: LPS=spx OSTYPE=darwin ARCH=x86_64 COMP=gnu SUFFIX= ZIMPL=false ZIMPLOPT=opt IPOPT=false IPOPTOPT=opt EXPRINT=cppad GAMS=false

    * SCIP needs some softlinks to external programs, in particular, LP-solvers.
    * Please insert the paths to the corresponding directories/libraries below.
    * The links will be installed in the 'lib' directory.
    * For more information and if you experience problems see the INSTALL file.

      -> "spxinc" is the path to the SoPlex "src" directory, e.g., "../../soplex/src".
      -> "libsoplex.*" is the path to the SoPlex library, e.g., "../../soplex/lib/libsoplex.darwin.x86_64.gnu.opt.a"
    -> compiling obj/O.darwin.x86_64.gnu.opt/lib/scip/branch_allfullstrong.o
    dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
      Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1
      Reason: image not found
    gcc: internal compiler error: Trace/BPT trap: 5 (program cc1)
    make[4]: *** [obj/O.darwin.x86_64.gnu.opt/lib/scip/branch_allfullstrong.o] Abort trap: 6
    make[3]: *** [makesciplibfile] Error 2
    make[2]: *** [scipbinary] Error 2
    make[1]: *** [scipbinary] Error 2
    make: *** [scipoptlib] Error 2

error 2,由运行./configure在libisl.10目录下生成: 该文件包含编译器生成的任何消息,同时 运行 configure, configure出错时辅助调试

It was created by isl configure 0.10, which was
generated by GNU Autoconf 2.68.  Invocation command line was

  $ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = dhcp-143-183.caltech.edu
uname -m = x86_64
uname -r = 13.4.0
uname -s = Darwin
uname -v = Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
         Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 327 tasks, 1905 threads, 4 processors
Load average: 4.32, Mach factor: 0.47
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /Users/madeleine/anaconda/bin/
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /opt/X11/bin
PATH: /usr/local/go/bin
PATH: /usr/texbin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Applications/spark-0.9.1-bin-hadoop2/bin
PATH: /Applications/Julia-0.3.8.app/Contents/Resources/julia/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2762: checking for a BSD-compatible install
configure:2830: result: /usr/bin/install -c
configure:2841: checking whether build environment is sane
configure:2891: result: yes
configure:3032: checking for a thread-safe mkdir -p
configure:3071: result: ./install-sh -c -d
configure:3084: checking for gawk
configure:3114: result: no
configure:3084: checking for mawk
configure:3114: result: no
configure:3084: checking for nawk
configure:3114: result: no
configure:3084: checking for awk
configure:3100: found /usr/bin/awk
configure:3111: result: awk
configure:3122: checking whether make sets $(MAKE)
configure:3144: result: yes
configure:3287: checking for gcc
configure:3303: found /usr/local/bin/gcc
configure:3314: result: gcc
configure:3543: checking for C compiler version
configure:3552: gcc --version >&5
gcc (Homebrew gcc 4.9.1) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3563: $? = 0
configure:3552: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/lto-wrapper
Target: x86_64-apple-darwin13.2.0
Configured with: ../configure --build=x86_64-apple-darwin13.2.0 --prefix=/usr/local/Cellar/gcc/4.9.1 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog --with-isl=/usr/local/opt/isl --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc 4.9.1' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 4.9.1 (Homebrew gcc 4.9.1)
configure:3563: $? = 0
configure:3552: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3563: $? = 1
configure:3552: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3563: $? = 1
configure:3583: checking whether the C compiler works
configure:3605: gcc    conftest.c  >&5
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
  Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1
  Reason: image not found
gcc: internal compiler error: Trace/BPT trap: 5 (program cc1)
./configure: line 3607:  9063 Abort trap: 6           $CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5

我看不出 SCIP 优化套件将在何处或为何使用 isl。准确地说,在您的情况下,不是 SCIP 无法编译,而是 SoPlex。您是否检查过是否可以单独编译 SoPlex?只需进入子目录并键入 makemake SHARED=true GMP=false ZLIB=false 以匹配原始命令。

你用你的编译器编译过一些其他代码吗?也可能是你的gcc本身坏了

我的印象是C++编译器本身坏了:

dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
  Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1plus

也许先尝试一个简单的(hello-world)C++程序来测试编译器本身是否可以。