[Osi] question on installing coin-or cplex interface

T L tinlyx at gmail.com
Sat Feb 16 10:14:28 EST 2019


Hi Stefan,

Please see below the output of `./configure`. I'll try building against
cplex directly as suggested.
Is there any official documentation on how to build against cplex (under
Ubuntu)?

Thanks a lot,


$ ./configure --with-cplex-incdir="$(pkg-config --variable=includedir
lazycplex)/lazylpsolverlibs/ilcplex" \
>             --with-cplex-lib="$(pkg-config --libs lazycplex)" \
>             --with-gurobi-incdir="$(pkg-config --variable=includedir
lazygurobi)/lazylpsolverlibs" \
>             --with-gurobi-lib="$(pkg-config --libs lazygurobi)" \
>             --with-xpress-incdir="$(pkg-config --variable=includedir
lazyxprs)/lazylpsolverlibs" \
>             --with-xpress-lib="$(pkg-config --libs lazyxprs)"
checking build system type... x86_64-unknown-linux-gnu
checking whether we want to compile in debug mode... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
configure: C compiler options are: -O3 -pipe -DNDEBUG -Wimplicit
-Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall
-Wno-unknown-pragmas -Wno-long-long
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether C++ compiler g++ works... yes
configure: C++ compiler options are: -O3 -pipe -DNDEBUG -Wparentheses
-Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
-Wconversion -Wno-unknown-pragmas -Wno-long-long
configure: Trying to determine Fortran compiler name
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
configure: Fortran compiler options are: -O3 -pipe
checking for egrep... grep -E
checking whether ln -s works... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking dependency style of g++... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/opl.conf:
Permission denied
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared
libraries... yes
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/opl.conf:
Permission denied
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports
shared libraries... yes
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/opl.conf:
Permission denied
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: Build is "x86_64-unknown-linux-gnu".
checking if library version is set... no
checking whether source of project Glpk is available and should be
compiled... no
checking whether source of project SoPlex is available and should be
compiled... no
checking whether source of project Blas is available and should be
compiled... no
checking whether source of project Lapack is available and should be
compiled... no
checking whether source of project Sample is available and should be
compiled... no
checking whether source of project Netlib is available and should be
compiled... no
checking whether source of project CoinUtils is available and should be
compiled... no
checking whether source of project Osi is available and should be
compiled... yes, source in Osi
configure: configuring doxygen documentation options
checking for doxygen... no
checking for latex... no
checking for dot... NO
checking for doxygen doc'n for CoinUtils ...
NONE/share/coin/doc/CoinUtils/doxydoc (tag)
checking for doxygen doc'n for Cgl ... NONE/share/coin/doc/Cgl/doxydoc (tag)
checking for doxygen doc'n for Clp ... NONE/share/coin/doc/Clp/doxydoc (tag)
checking for doxygen doc'n for DyLP ... NONE/share/coin/doc/DyLP/doxydoc
(tag)
checking for doxygen doc'n for Vol ... NONE/share/coin/doc/Vol/doxydoc (tag)
checking for doxygen doc'n for SYMPHONY ...
NONE/share/coin/doc/SYMPHONY/doxydoc (tag)
checking which command should be used to link input files... ln -s
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doxydoc/doxygen.conf
config.status: executing depfiles commands
configure: configuring in Osi
configure: running /bin/bash './configure' --prefix=/home/user/myosi/Osi
'--with-cplex-incdir=/usr/local/include/lazylpsolverlibs/ilcplex'
'--with-cplex-lib=-L/usr/local/lib -llazycplex -pthread
-Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0'
'--with-gurobi-incdir=/usr/local/include/lazylpsolverlibs'
'--with-gurobi-lib=-L/usr/local/lib -llazygurobi -Wl,--export-dynamic
-lgmodule-2.0 -pthread -lglib-2.0'
'--with-xpress-incdir=/usr/local/include/lazylpsolverlibs'
'--with-xpress-lib=-L/usr/local/lib -llazyxprs -Wl,--export-dynamic
-lgmodule-2.0 -pthread -lglib-2.0' --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking for svnversion... no
checking whether we want to compile in debug mode... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
configure: C compiler options are: -O3 -pipe -DNDEBUG -Wimplicit
-Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall
-Wno-unknown-pragmas -Wno-long-long   -DOSI_BUILD
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether C++ compiler g++ works... yes
configure: C++ compiler options are: -O3 -pipe -DNDEBUG -Wparentheses
-Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
-Wconversion -Wno-unknown-pragmas -Wno-long-long   -DOSI_BUILD
checking for egrep... grep -E
checking whether ln -s works... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking dependency style of g++... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
configure: Using libtool script in directory ..
checking if library version is set... no
checking for pkg-config... pkg-config
checking pkg-config is at least version 0.16.0... yes
checking for COIN-OR package CoinUtils... yes: 2.10.14
checking for COIN-OR package Glpk... not given: No package 'coinglpk' found
checking for COIN-OR package SoPlex... not given: No package 'coinsoplex'
found
checking for COIN-OR package Sample... yes: 1.2.10
checking for COIN-OR package Netlib... not given: No package
'coindatanetlib' found
checking if user provides library for Cplex... yes
checking whether symbol CPXgetstat is available with CPX... yes
checking if user provides library for Mosek... no
checking if user provides library for Xpress... yes
checking whether symbol XPRSinit is available with XPR... yes
checking if user provides library for Gurobi... yes
checking whether symbol GRBloadenv is available with GRB... yes
configure: configuring doxygen documentation options
checking for doxygen... no
checking for latex... no
checking for dot... NO
checking for doxygen doc'n for CoinUtils ...
/home/user/myosi/Osi/share/coin/doc/CoinUtils/doxydoc (tag)
checking cmath usability... yes
checking cmath presence... yes
checking for cmath... yes
checking cfloat usability... yes
checking cfloat presence... yes
checking for cfloat... yes
checking cieeefp usability... no
checking cieeefp presence... no
checking for cieeefp... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking which command should be used to link input files... ln -s
configure: creating ./config.status
config.status: creating Makefile
config.status: creating examples/Makefile
config.status: creating src/Osi/Makefile
config.status: creating src/OsiCpx/Makefile
config.status: creating src/OsiGlpk/Makefile
config.status: creating src/OsiMsk/Makefile
config.status: creating src/OsiXpr/Makefile
config.status: creating src/OsiGrb/Makefile
config.status: creating src/OsiSpx/Makefile
config.status: creating src/OsiCommonTest/Makefile
config.status: creating test/Makefile
config.status: creating osi.pc
config.status: creating osi-uninstalled.pc
config.status: creating osi-unittests.pc
config.status: creating osi-unittests-uninstalled.pc
config.status: creating osi-cplex.pc
config.status: creating osi-cplex-uninstalled.pc
config.status: creating osi-gurobi.pc
config.status: creating osi-gurobi-uninstalled.pc
config.status: creating osi-xpress.pc
config.status: creating osi-xpress-uninstalled.pc
config.status: creating doxydoc/doxygen.conf
config.status: creating src/Osi/config.h
config.status: src/Osi/config.h is unchanged
config.status: creating src/Osi/config_osi.h
config.status: src/Osi/config_osi.h is unchanged
config.status: executing depfiles commands
configure: In case of trouble, first consult the troubleshooting page at
https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting
configure: Configuration of Osi successful
configure: In case of trouble, first consult the troubleshooting page at
https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting
configure: Main configuration of Osi successful


On Sat, Feb 16, 2019 at 7:24 AM Stefan Vigerske <stefan at math.hu-berlin.de>
wrote:

> Hi,
>
> it looks like configure didn't see the flags to build against Cplex and
> then didn't build OsiCpx.
>
> Are you sure that you actually have the lazylpsolverlibs package installed?
>
> Have a look into the output of configure.
>
> It should be easier to first try building against CPLEX, etc, directly,
> without the lazylpsolverlibs in between.
>
> Stefan
>
>
> On 2/16/19 8:08 AM, T L wrote:
> >   Hi List members,
> >
> > I have a quick question about installing the coin-or OSI interface for
> > CPLEX.
> >
> > Following the OSI website <https://projects.coin-or.org/Osi>, I
> compiled it
> > from source (under Ubuntu 18.04) as follows:
> >
> > ./configure --with-cplex-incdir="$(pkg-config --variable=includedir
> > lazycplex)/lazylpsolverlibs/ilcplex" \
> >              --with-cplex-lib="$(pkg-config --libs lazycplex)" \
> >              --with-gurobi-incdir="$(pkg-config --variable=includedir
> > lazygurobi)/lazylpsolverlibs" \
> >              --with-gurobi-lib="$(pkg-config --libs lazygurobi)" \
> >              --with-xpress-incdir="$(pkg-config --variable=includedir
> > lazyxprs)/lazylpsolverlibs" \
> >              --with-xpress-lib="$(pkg-config --libs lazyxprs)"
> > make
> > make test
> > sudo make install
> >
> > But I cannot find the header file for CPLEX OsiCplexSolverInterface.hpp
> in
> > /usr/inclde/coin/, while other files such as
> > /usr/include/coin/OsiClpSolverInterface.hpp are present.
> >
> > However, it is inside the build folder as
> > include/coin/OsiCpxSolverInterface.hpp.
> >
> > Then when I try to compile example code for cplex, it gives an error
> about
> > missing OsiCpxSolverInterface.hpp
> >
> > Do I need to add options to ./configure to let make install it to system
> > folder?
> >
> > (I prefer to install in system folder, rather than individual users' home
> > folder; I've asked a question on StackOverflow:
> > https://stackoverflow.com/questions/54614995  but haven't got any
> answer so
> > far.)
> >
> > Thanks in advance,
> >
> >
> > _______________________________________________
> > Osi mailing list
> > Osi at list.coin-or.org
> > https://list.coin-or.org/mailman/listinfo/osi
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20190216/38c55fe4/attachment-0001.html>


More information about the Osi mailing list