<div dir="ltr">It seems to be working using <div><br></div><div>checking if user provides library for Cplex... yes<br>checking whether symbol CPXgetstat is available with CPX... yes  <br></div><div><br></div><div>So I guess what you are feeding configure when you link directly must be different than the output of </div><div><br></div><div><span style="color:rgb(80,0,80)">pkg-config --libs lazycplex</span>  <br></div><div><br></div><div>Can you check that?</div><div><br></div><div>Cheers,</div><div><br></div><div>Ted</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 16, 2019 at 10:36 AM Stefan Vigerske <<a href="mailto:stefan@math.hu-berlin.de">stefan@math.hu-berlin.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
maybe you also need -ldl.<br>
<br>
Have a look into Osi/config.log for details on why the test ("symbol <br>
CPXgetstat is available") failed.<br>
<br>
Stefan<br>
<br>
On 2/16/19 4:25 PM, T L wrote:<br>
> Hi,<br>
> <br>
> I just tried to compile against CPLEX directly, but got an error below (I<br>
> have CPLEX installed in Ubuntu). Any pointers?<br>
> <br>
> Thanks in advance,<br>
> <br>
> $ ./configure<br>
> --with-cplex-lib="-L/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/x86-64_linux/static_pic/<br>
> -lcplex -lpthread -lm"<br>
> -with-cplex-incdir="/opt/ibm/ILOG/CPLEX_Studio128/cplex/include/ilcplex"<br>
> checking build system type... x86_64-unknown-linux-gnu<br>
> checking whether we want to compile in debug mode... no<br>
> checking for gcc... gcc<br>
> checking for C compiler default output file name... a.out<br>
> checking whether the C compiler works... yes<br>
> checking whether we are cross compiling... no<br>
> checking for suffix of executables...<br>
> checking for suffix of object files... o<br>
> checking whether we are using the GNU C compiler... yes<br>
> checking whether gcc accepts -g... yes<br>
> checking for gcc option to accept ANSI C... none needed<br>
> configure: C compiler options are: -O3 -pipe -DNDEBUG -Wimplicit<br>
> -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall<br>
> -Wno-unknown-pragmas -Wno-long-long<br>
> checking for g++... g++<br>
> checking whether we are using the GNU C++ compiler... yes<br>
> checking whether g++ accepts -g... yes<br>
> checking whether C++ compiler g++ works... yes<br>
> configure: C++ compiler options are: -O3 -pipe -DNDEBUG -Wparentheses<br>
> -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings<br>
> -Wconversion -Wno-unknown-pragmas -Wno-long-long<br>
> configure: Trying to determine Fortran compiler name<br>
> checking for gfortran... gfortran<br>
> checking whether we are using the GNU Fortran 77 compiler... yes<br>
> checking whether gfortran accepts -g... yes<br>
> configure: Fortran compiler options are: -O3 -pipe<br>
> checking for egrep... grep -E<br>
> checking whether ln -s works... yes<br>
> checking for a BSD-compatible install... /usr/bin/install -c<br>
> checking whether build environment is sane... yes<br>
> checking for gawk... no<br>
> checking for mawk... mawk<br>
> checking whether make sets $(MAKE)... yes<br>
> checking for style of include used by make... GNU<br>
> checking dependency style of gcc... gcc3<br>
> checking dependency style of g++... gcc3<br>
> checking whether to enable maintainer-specific portions of Makefiles... no<br>
> checking host system type... x86_64-unknown-linux-gnu<br>
> checking for a sed that does not truncate output... /bin/sed<br>
> checking for ld used by gcc... /usr/bin/ld<br>
> checking if the linker (/usr/bin/ld) is GNU ld... yes<br>
> checking for /usr/bin/ld option to reload object files... -r<br>
> checking for BSD-compatible nm... /usr/bin/nm -B<br>
> checking how to recognise dependent libraries... pass_all<br>
> checking how to run the C preprocessor... gcc -E<br>
> checking for ANSI C header files... yes<br>
> checking for sys/types.h... yes<br>
> checking for sys/stat.h... yes<br>
> checking for stdlib.h... yes<br>
> checking for string.h... yes<br>
> checking for memory.h... yes<br>
> checking for strings.h... yes<br>
> checking for inttypes.h... yes<br>
> checking for stdint.h... yes<br>
> checking for unistd.h... yes<br>
> checking dlfcn.h usability... yes<br>
> checking dlfcn.h presence... yes<br>
> checking for dlfcn.h... yes<br>
> checking how to run the C++ preprocessor... g++ -E<br>
> checking the maximum length of command line arguments... 32768<br>
> checking command to parse /usr/bin/nm -B output from gcc object... ok<br>
> checking for objdir... .libs<br>
> checking for ar... ar<br>
> checking for ranlib... ranlib<br>
> checking for strip... strip<br>
> checking if gcc supports -fno-rtti -fno-exceptions... no<br>
> checking for gcc option to produce PIC... -fPIC<br>
> checking if gcc PIC flag -fPIC works... yes<br>
> checking if gcc static flag -static works... yes<br>
> checking if gcc supports -c -o file.o... yes<br>
> checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared<br>
> libraries... yes<br>
> checking whether -lc should be explicitly linked in... no<br>
> checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/opl.conf:<br>
> Permission denied<br>
> GNU/Linux ld.so<br>
> checking how to hardcode library paths into programs... immediate<br>
> checking whether stripping libraries is possible... yes<br>
> checking if libtool supports shared libraries... yes<br>
> checking whether to build shared libraries... yes<br>
> checking whether to build static libraries... no<br>
> configure: creating libtool<br>
> appending configuration tag "CXX" to libtool<br>
> checking for ld used by g++... /usr/bin/ld -m elf_x86_64<br>
> checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes<br>
> checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared<br>
> libraries... yes<br>
> checking for g++ option to produce PIC... -fPIC<br>
> checking if g++ PIC flag -fPIC works... yes<br>
> checking if g++ static flag -static works... yes<br>
> checking if g++ supports -c -o file.o... yes<br>
> checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared<br>
> libraries... yes<br>
> checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/opl.conf:<br>
> Permission denied<br>
> GNU/Linux ld.so<br>
> checking how to hardcode library paths into programs... immediate<br>
> appending configuration tag "F77" to libtool<br>
> checking if libtool supports shared libraries... yes<br>
> checking whether to build shared libraries... yes<br>
> checking whether to build static libraries... no<br>
> checking for gfortran option to produce PIC... -fPIC<br>
> checking if gfortran PIC flag -fPIC works... yes<br>
> checking if gfortran static flag -static works... yes<br>
> checking if gfortran supports -c -o file.o... yes<br>
> checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports<br>
> shared libraries... yes<br>
> checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/opl.conf:<br>
> Permission denied<br>
> GNU/Linux ld.so<br>
> checking how to hardcode library paths into programs... immediate<br>
> configure: Build is "x86_64-unknown-linux-gnu".<br>
> checking if library version is set... no<br>
> checking whether source of project Glpk is available and should be<br>
> compiled... no<br>
> checking whether source of project SoPlex is available and should be<br>
> compiled... no<br>
> checking whether source of project Blas is available and should be<br>
> compiled... no<br>
> checking whether source of project Lapack is available and should be<br>
> compiled... no<br>
> checking whether source of project Sample is available and should be<br>
> compiled... no<br>
> checking whether source of project Netlib is available and should be<br>
> compiled... no<br>
> checking whether source of project CoinUtils is available and should be<br>
> compiled... no<br>
> checking whether source of project Osi is available and should be<br>
> compiled... yes, source in Osi<br>
> configure: configuring doxygen documentation options<br>
> checking for doxygen... no<br>
> checking for latex... no<br>
> checking for dot... NO<br>
> checking for doxygen doc'n for CoinUtils ...<br>
> NONE/share/coin/doc/CoinUtils/doxydoc (tag)<br>
> checking for doxygen doc'n for Cgl ... NONE/share/coin/doc/Cgl/doxydoc (tag)<br>
> checking for doxygen doc'n for Clp ... NONE/share/coin/doc/Clp/doxydoc (tag)<br>
> checking for doxygen doc'n for DyLP ... NONE/share/coin/doc/DyLP/doxydoc<br>
> (tag)<br>
> checking for doxygen doc'n for Vol ... NONE/share/coin/doc/Vol/doxydoc (tag)<br>
> checking for doxygen doc'n for SYMPHONY ...<br>
> NONE/share/coin/doc/SYMPHONY/doxydoc (tag)<br>
> checking which command should be used to link input files... ln -s<br>
> configure: creating ./config.status<br>
> config.status: creating Makefile<br>
> config.status: creating doxydoc/doxygen.conf<br>
> config.status: executing depfiles commands<br>
> configure: configuring in Osi<br>
> configure: running /bin/bash './configure' --prefix=/home/user/myosi/Osi<br>
> '--with-cplex-lib=-L/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/x86-64_linux/static_pic/<br>
> -lcplex -lpthread -lm'<br>
> '-with-cplex-incdir=/opt/ibm/ILOG/CPLEX_Studio128/cplex/include/ilcplex'<br>
> --cache-file=/dev/null --srcdir=.<br>
> checking build system type... x86_64-unknown-linux-gnu<br>
> checking for svnversion... no<br>
> checking whether we want to compile in debug mode... no<br>
> checking for gcc... gcc<br>
> checking for C compiler default output file name... a.out<br>
> checking whether the C compiler works... yes<br>
> checking whether we are cross compiling... no<br>
> checking for suffix of executables...<br>
> checking for suffix of object files... o<br>
> checking whether we are using the GNU C compiler... yes<br>
> checking whether gcc accepts -g... yes<br>
> checking for gcc option to accept ANSI C... none needed<br>
> configure: C compiler options are: -O3 -pipe -DNDEBUG -Wimplicit<br>
> -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall<br>
> -Wno-unknown-pragmas -Wno-long-long   -DOSI_BUILD<br>
> checking for g++... g++<br>
> checking whether we are using the GNU C++ compiler... yes<br>
> checking whether g++ accepts -g... yes<br>
> checking whether C++ compiler g++ works... yes<br>
> configure: C++ compiler options are: -O3 -pipe -DNDEBUG -Wparentheses<br>
> -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings<br>
> -Wconversion -Wno-unknown-pragmas -Wno-long-long   -DOSI_BUILD<br>
> checking for egrep... grep -E<br>
> checking whether ln -s works... yes<br>
> checking for a BSD-compatible install... /usr/bin/install -c<br>
> checking whether build environment is sane... yes<br>
> checking for gawk... no<br>
> checking for mawk... mawk<br>
> checking whether make sets $(MAKE)... yes<br>
> checking for style of include used by make... GNU<br>
> checking dependency style of gcc... gcc3<br>
> checking dependency style of g++... gcc3<br>
> checking whether to enable maintainer-specific portions of Makefiles... no<br>
> configure: Using libtool script in directory ..<br>
> checking if library version is set... no<br>
> checking for pkg-config... pkg-config<br>
> checking pkg-config is at least version 0.16.0... yes<br>
> checking for COIN-OR package CoinUtils... yes: 2.10.14<br>
> checking for COIN-OR package Glpk... not given: No package 'coinglpk' found<br>
> checking for COIN-OR package SoPlex... not given: No package 'coinsoplex'<br>
> found<br>
> checking for COIN-OR package Sample... yes: 1.2.10<br>
> checking for COIN-OR package Netlib... not given: No package<br>
> 'coindatanetlib' found<br>
> checking if user provides library for Cplex... yes<br>
> checking whether symbol CPXgetstat is available with CPX... no<br>
> configure: error: Cannot find symbol(s) CPXgetstat with CPX<br>
> configure: error: /bin/bash './configure' failed for Osi<br>
> <br>
> <br>
> On Sat, Feb 16, 2019 at 7:24 AM Stefan Vigerske <<a href="mailto:stefan@math.hu-berlin.de" target="_blank">stefan@math.hu-berlin.de</a>><br>
> wrote:<br>
> <br>
>> Hi,<br>
>><br>
>> it looks like configure didn't see the flags to build against Cplex and<br>
>> then didn't build OsiCpx.<br>
>><br>
>> Are you sure that you actually have the lazylpsolverlibs package installed?<br>
>><br>
>> Have a look into the output of configure.<br>
>><br>
>> It should be easier to first try building against CPLEX, etc, directly,<br>
>> without the lazylpsolverlibs in between.<br>
>><br>
>> Stefan<br>
>><br>
>><br>
>> On 2/16/19 8:08 AM, T L wrote:<br>
>>>    Hi List members,<br>
>>><br>
>>> I have a quick question about installing the coin-or OSI interface for<br>
>>> CPLEX.<br>
>>><br>
>>> Following the OSI website <<a href="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=" rel="noreferrer" target="_blank">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=</a>>, I<br>
>> compiled it<br>
>>> from source (under Ubuntu 18.04) as follows:<br>
>>><br>
>>> ./configure --with-cplex-incdir="$(pkg-config --variable=includedir<br>
>>> lazycplex)/lazylpsolverlibs/ilcplex" \<br>
>>>               --with-cplex-lib="$(pkg-config --libs lazycplex)" \<br>
>>>               --with-gurobi-incdir="$(pkg-config --variable=includedir<br>
>>> lazygurobi)/lazylpsolverlibs" \<br>
>>>               --with-gurobi-lib="$(pkg-config --libs lazygurobi)" \<br>
>>>               --with-xpress-incdir="$(pkg-config --variable=includedir<br>
>>> lazyxprs)/lazylpsolverlibs" \<br>
>>>               --with-xpress-lib="$(pkg-config --libs lazyxprs)"<br>
>>> make<br>
>>> make test<br>
>>> sudo make install<br>
>>><br>
>>> But I cannot find the header file for CPLEX OsiCplexSolverInterface.hpp<br>
>> in<br>
>>> /usr/inclde/coin/, while other files such as<br>
>>> /usr/include/coin/OsiClpSolverInterface.hpp are present.<br>
>>><br>
>>> However, it is inside the build folder as<br>
>>> include/coin/OsiCpxSolverInterface.hpp.<br>
>>><br>
>>> Then when I try to compile example code for cplex, it gives an error<br>
>> about<br>
>>> missing OsiCpxSolverInterface.hpp<br>
>>><br>
>>> Do I need to add options to ./configure to let make install it to system<br>
>>> folder?<br>
>>><br>
>>> (I prefer to install in system folder, rather than individual users' home<br>
>>> folder; I've asked a question on StackOverflow:<br>
>>> <a href="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=" rel="noreferrer" target="_blank">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=</a>  but haven't got any<br>
>> answer so<br>
>>> far.)<br>
>>><br>
>>> Thanks in advance,<br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Osi mailing list<br>
>>> <a href="mailto:Osi@list.coin-or.org" target="_blank">Osi@list.coin-or.org</a><br>
>>> <a href="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=" rel="noreferrer" target="_blank">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=</a><br>
>>><br>
>><br>
>><br>
> <br>
<br>
_______________________________________________<br>
Osi mailing list<br>
<a href="mailto:Osi@list.coin-or.org" target="_blank">Osi@list.coin-or.org</a><br>
<a href="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=" rel="noreferrer" target="_blank">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=</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Dr. Ted Ralphs<br>Professor, Industrial and Systems Engineering<br>Lehigh University<br>(610) 628-1280<br>ted 'at' lehigh 'dot' edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br></div></div></div></div></div></div></div></div>