[Osi] question on installing coin-or cplex interface

Ted Ralphs ted at lehigh.edu
Sun Feb 17 10:38:17 EST 2019


It seems to be working using

checking if user provides library for Cplex... yes
checking whether symbol CPXgetstat is available with CPX... yes

So I guess what you are feeding configure when you link directly must be
different than the output of

pkg-config --libs lazycplex

Can you check that?

Cheers,

Ted

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

> Hi,
>
> maybe you also need -ldl.
>
> Have a look into Osi/config.log for details on why the test ("symbol
> CPXgetstat is available") failed.
>
> Stefan
>
> On 2/16/19 4:25 PM, T L wrote:
> > Hi,
> >
> > I just tried to compile against CPLEX directly, but got an error below (I
> > have CPLEX installed in Ubuntu). Any pointers?
> >
> > Thanks in advance,
> >
> > $ ./configure
> >
> --with-cplex-lib="-L/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/x86-64_linux/static_pic/
> > -lcplex -lpthread -lm"
> > -with-cplex-incdir="/opt/ibm/ILOG/CPLEX_Studio128/cplex/include/ilcplex"
> > 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-lib=-L/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/x86-64_linux/static_pic/
> > -lcplex -lpthread -lm'
> > '-with-cplex-incdir=/opt/ibm/ILOG/CPLEX_Studio128/cplex/include/ilcplex'
> > --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... no
> > configure: error: Cannot find symbol(s) CPXgetstat with CPX
> > configure: error: /bin/bash './configure' failed for Osi
> >
> >
> > 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://urldefense.proofpoint.com/v2/url?u=https-3A__projects.coin-2Dor.org_Osi&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g&m=WiRThaeMdHKzw8tABGajP6WlWjhbrEEz_-NqwJCPXFo&s=BdGy5p6-TMN591IjJFd8_TZW2njR4w1Z4xjbbLmSHhE&e=>,
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_questions_54614995&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g&m=WiRThaeMdHKzw8tABGajP6WlWjhbrEEz_-NqwJCPXFo&s=5X0vtZLadxtkQELJKDBuVj9k5zp7oTjLTJXSC6y4PIU&e=
> but haven't got any
> >> answer so
> >>> far.)
> >>>
> >>> Thanks in advance,
> >>>
> >>>
> >>> _______________________________________________
> >>> Osi mailing list
> >>> Osi at list.coin-or.org
> >>>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_osi&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g&m=WiRThaeMdHKzw8tABGajP6WlWjhbrEEz_-NqwJCPXFo&s=sCa_w7NC1djclrjPQukI5LGCLOew1QrF4nWwrlBQ5TQ&e=
> >>>
> >>
> >>
> >
>
> _______________________________________________
> Osi mailing list
> Osi at list.coin-or.org
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_osi&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g&m=WiRThaeMdHKzw8tABGajP6WlWjhbrEEz_-NqwJCPXFo&s=sCa_w7NC1djclrjPQukI5LGCLOew1QrF4nWwrlBQ5TQ&e=
>


-- 
Dr. Ted Ralphs
Professor, Industrial and Systems Engineering
Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20190217/dc309bbe/attachment-0001.html>


More information about the Osi mailing list