<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p><span dir="ltr"><font size="3" color="black" face="Calibri,Arial,Helvetica,sans-serif"><span style="font-size:12pt;">Dear all,<br>
<br>
I am trying to use the COIN OR libraries and especially the Couenne solver through OS for my master thesis. Unfortunately I do not manage to compile the OS examples. In the followings I will present what I have tried and than I will mention what does not work:<br>
<br>
I tried everything on a system with <br>
<br>
ubuntu 14.04 LTS and <br>
<br>
with the gcc compiler<br>
<br>
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3).<br>
<br>
I have downloaded the OS sources <a href="https://www.coin-or.org/download/source/OS/OS-2.10.1.tgz" target="_blank">
OS-2.10.1.tgz</a> from <a href="https://www.coin-or.org/download/source/OS/" target="_blank">
https://www.coin-or.org/download/source/OS/</a>, extracted them in a folder in home folder, downloaded the ThirdParty packages (ASL,Blas,Lapack,Mumps), created the "build" folder, ../configure, make, make test, make install. Everything worked perfectly; all
tests were successful. Then I tried the example osSolverDemo.cpp from ~/OS-2.10.1/build/examples. I executed the make command and the first error was thrown:<br>
<br>
bezrucav@rosel:~/OS-2.10.1/build/examples/osSolverDemo$ make<br>
g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DHAVE_CONFIG_H `pkg-config --cflags os` -I`echo ../../include` -c -o OSSolverDemo.o OSSolverDemo.cpp<br>
Package cppad was not found in the pkg-config search path.<br>
Perhaps you should add the directory containing `cppad.pc'<br>
to the PKG_CONFIG_PATH environment variable<br>
Package 'cppad', required by 'OS', not found<br>
OSSolverDemo.cpp:15:22: fatal error: OSConfig.h: No such file or directory<br>
#include "OSConfig.h"<br>
^<br>
compilation terminated.<br>
make: *** [OSSolverDemo.o] Error 1<br>
<br>
<br>
I took a look in the Makefile from the same folder and I have added:<br>
<br>
ADDINCFLAGS2 = ${prefix}/include/coin<br>
and <br>
-I`$(CYGPATH_W) $(ADDINCFLAGS2)` in INCL = -I`$(CYGPATH_W) $(ADDINCFLAGS)` -I`$(CYGPATH_W) $(ADDINCFLAGS2)`<br>
<br>
Now the following error were generated:<br>
<br>
bezrucav@rosel:~/OS-2.10.1/build/examples/osSolverDemo$ make<br>
g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DHAVE_CONFIG_H `pkg-config --cflags os` -I`echo ../../include` -I`echo ../../include/coin`
-c -o OSSolverDemo.o OSSolverDemo.cpp<br>
Package cppad was not found in the pkg-config search path.<br>
Perhaps you should add the directory containing `cppad.pc'<br>
to the PKG_CONFIG_PATH environment variable<br>
Package 'cppad', required by 'OS', not found<br>
OSSolverDemo.cpp:30:27: fatal error: OSmps2osil.h: No such file or directory<br>
#include "OSmps2osil.h" <br>
^<br>
compilation terminated.<br>
make: *** [OSSolverDemo.o] Error 1<br>
<br>
I did not find the OSmps2osil.h file in the entire OS folder.<br>
<br>
After more research on the Internet I found another newer osSolverDemo.cpp file on
<a href="https://projects.coin-or.org/CoinBazaar/browser/projects/ApplicationTemplates?order=name" target="_blank">
https://projects.coin-or.org/CoinBazaar/browser/projects/ApplicationTemplates?order=name</a> where some of the previous problems were corrected. I have also executed the make file in the example folder, after replacing the old file with the new one, but there
were also some errors thrown:<br>
<br>
bezrucav@rosel:~/OS-2.10.1/build/examples/osSolverDemo$ make<br>
bla=;\<br>
for file in OSSolverDemo2.o ; do bla="$bla `echo $file`"; done; \<br>
g++ -Wl,--rpath -Wl,/home/bezrucav/OS-2.10.1/build/lib -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DHAVE_CONFIG_H `pkg-config --cflags
os` -o OSSolverDemo2 $bla `pkg-config --libs os` <br>
Package cppad was not found in the pkg-config search path.<br>
Perhaps you should add the directory containing `cppad.pc'<br>
to the PKG_CONFIG_PATH environment variable<br>
Package 'cppad', required by 'OS', not found<br>
Package cppad was not found in the pkg-config search path.<br>
Perhaps you should add the directory containing `cppad.pc'<br>
to the PKG_CONFIG_PATH environment variable<br>
Package 'cppad', required by 'OS', not found<br>
OSSolverDemo2.o: In function `getOSResult(std::string)':<br>
OSSolverDemo2.cpp:(.text+0x12b): undefined reference to `OSrLReader::OSrLReader()'<br>
OSSolverDemo2.cpp:(.text+0x136): undefined reference to `OSrLReader::readOSrL(std::string const&)'<br>
OSSolverDemo2.cpp:(.text+0x151): undefined reference to `OSResult::getSolutionStatusType(int)'<br>
OSSolverDemo2.cpp:(.text+0x1a5): undefined reference to `OSResult::getOptimalObjValue(int, int)'<br>
OSSolverDemo2.cpp:(.text+0x235): undefined reference to `OSResult::getOptimalPrimalVariableValues(int)'<br>
OSSolverDemo2.cpp:(.text+0x365): undefined reference to `OSResult::getSolutionStatusDescription(int)'<br>
OSSolverDemo2.cpp:(.text+0x3d7): undefined reference to `OSrLReader::~OSrLReader()'<br>
OSSolverDemo2.o: In function `main':<br>
OSSolverDemo2.cpp:(.text.startup+0x12): undefined reference to `WindowsErrorPopupBlocker()'<br>
OSSolverDemo2.cpp:(.text.startup+0x27): undefined reference to `FileUtil::FileUtil()'<br>
OSSolverDemo2.cpp:(.text.startup+0x17d): undefined reference to `OSmps2OS::OSmps2OS(std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x199): undefined reference to `OSmps2OS::createOSObjects()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1bb): undefined reference to `OSOption::OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x294): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x3dd): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x46a): undefined reference to `OSoLWriter::OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x47d): undefined reference to `OSoLWriter::writeOSoL(OSOption*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x4bc): undefined reference to `CoinSolver::CoinSolver()'<br>
OSSolverDemo2.cpp:(.text.startup+0x4ed): undefined reference to `OSmps2OS::~OSmps2OS()'<br>
OSSolverDemo2.cpp:(.text.startup+0x50e): undefined reference to `OSOption::~OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x523): undefined reference to `OSoLWriter::~OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x5fc): undefined reference to `FileUtil::getFileAsString(char const*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x63c): undefined reference to `OSiLReader::OSiLReader()'<br>
OSSolverDemo2.cpp:(.text.startup+0x64e): undefined reference to `OSiLReader::readOSiL(std::string const&)'<br>
OSSolverDemo2.cpp:(.text.startup+0x668): undefined reference to `OSOption::OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x736): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x87c): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x9c2): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0xb08): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0xb95): undefined reference to `OSoLWriter::OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0xba8): undefined reference to `OSoLWriter::writeOSoL(OSOption*)'<br>
OSSolverDemo2.cpp:(.text.startup+0xbe7): undefined reference to `CoinSolver::CoinSolver()'<br>
OSSolverDemo2.cpp:(.text.startup+0xc4f): undefined reference to `OSiLReader::~OSiLReader()'<br>
OSSolverDemo2.cpp:(.text.startup+0xc70): undefined reference to `OSOption::~OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0xc85): undefined reference to `OSoLWriter::~OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0xd6d): undefined reference to `OSnl2OS::OSnl2OS()'<br>
OSSolverDemo2.cpp:(.text.startup+0xd92): undefined reference to `OSnl2OS::readNl(std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0xdae): undefined reference to `OSnl2OS::createOSObjects()'<br>
OSSolverDemo2.cpp:(.text.startup+0xdcc): undefined reference to `OSOption::OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0xea9): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0xffe): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x1153): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x12a8): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x13fd): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.o:OSSolverDemo2.cpp:(.text.startup+0x1552): more undefined references to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)' follow<br>
OSSolverDemo2.o: In function `main':<br>
OSSolverDemo2.cpp:(.text.startup+0x15d4): undefined reference to `OSInstance::getVariableNumber()'<br>
OSSolverDemo2.cpp:(.text.startup+0x162f): undefined reference to `OSOption::setInitVarValuesDense(int, double*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x1649): undefined reference to `OSoLWriter::OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x165c): undefined reference to `OSoLWriter::writeOSoL(OSOption*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x169b): undefined reference to `CouenneSolver::CouenneSolver()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1757): undefined reference to `OSOption::~OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1771): undefined reference to `OSoLWriter::~OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1781): undefined reference to `OSnl2OS::~OSnl2OS()'<br>
OSSolverDemo2.cpp:(.text.startup+0x185a): undefined reference to `FileUtil::getFileAsString(char const*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x189a): undefined reference to `OSiLReader::OSiLReader()'<br>
OSSolverDemo2.cpp:(.text.startup+0x18ac): undefined reference to `OSiLReader::readOSiL(std::string const&)'<br>
OSSolverDemo2.cpp:(.text.startup+0x18c6): undefined reference to `OSOption::OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1994): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x1a21): undefined reference to `OSoLWriter::OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1a34): undefined reference to `OSoLWriter::writeOSoL(OSOption*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x1a73): undefined reference to `CoinSolver::CoinSolver()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1adf): undefined reference to `OSiLReader::~OSiLReader()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1b00): undefined reference to `OSOption::~OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1b15): undefined reference to `OSoLWriter::~OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1bee): undefined reference to `FileUtil::getFileAsString(char const*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x1c29): undefined reference to `OSOption::OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1cf7): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x1e3d): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x1ee5): undefined reference to `OSOption::setInitVarValuesDense(int, double*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x1efa): undefined reference to `OSoLWriter::OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1f10): undefined reference to `OSoLWriter::writeOSoL(OSOption*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x1f4f): undefined reference to `IpoptSolver::IpoptSolver()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1fc3): undefined reference to `OSOption::~OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x1fd8): undefined reference to `OSoLWriter::~OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x20b1): undefined reference to `FileUtil::getFileAsString(char const*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x20ec): undefined reference to `OSiLReader::OSiLReader()'<br>
OSSolverDemo2.cpp:(.text.startup+0x20f9): undefined reference to `OSiLReader::readOSiL(std::string const&)'<br>
OSSolverDemo2.cpp:(.text.startup+0x2113): undefined reference to `OSOption::OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x21de): undefined reference to `OSOption::setAnotherSolverOption(std::string, std::string, std::string, std::string, std::string, std::string)'<br>
OSSolverDemo2.cpp:(.text.startup+0x226b): undefined reference to `OSoLWriter::OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x227e): undefined reference to `OSoLWriter::writeOSoL(OSOption*)'<br>
OSSolverDemo2.cpp:(.text.startup+0x22bd): undefined reference to `BonminSolver::BonminSolver()'<br>
OSSolverDemo2.cpp:(.text.startup+0x234b): undefined reference to `OSiLReader::~OSiLReader()'<br>
OSSolverDemo2.cpp:(.text.startup+0x236a): undefined reference to `OSOption::~OSOption()'<br>
OSSolverDemo2.cpp:(.text.startup+0x237f): undefined reference to `OSoLWriter::~OSoLWriter()'<br>
OSSolverDemo2.cpp:(.text.startup+0x2394): undefined reference to `FileUtil::~FileUtil()'<br>
OSSolverDemo2.cpp:(.text.startup+0x24b1): undefined reference to `FileUtil::~FileUtil()'<br>
collect2: error: ld returned 1 exit status<br>
make: *** [OSSolverDemo2] Error 1<br>
<br>
I have tried also with other OS examples, but the same errors were generated.<br>
<br>
I have executed the cpp example of Bonmin from ~/OS-2.10.1/build/Bonmin/examples/CppExample. The make command worked without any problems; I executed also the .exe generated file: also in this case everything worked perfectly.<br>
<br>
Then I took a look at the OS unitTest from ~/OS-2.10.1/OS/v2.0 which has worked and I have tried to extract from it the Couenne part for generating an example that I would can further use for my specific problem. Unfortunately I was unsuccessful in doing that.<br>
<br>
In a last attempt I tried another version of OS: OS-2.10.0. There the compilation did not work: after creating a new folder build; cd build; ../configure the make thrown an error:
<br>
<br>
g++ -DHAVE_CONFIG_H -I. -I../../../../Ipopt/src/Common -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD -MT IpUtils.lo -MD -MP -MF
.deps/IpUtils.Tpo -c ../../../../Ipopt/src/Common/IpUtils.cpp -fPIC -DPIC -o .libs/IpUtils.o<br>
../../../../Ipopt/src/Common/IpUtils.cpp:182:6: error: #error "don't have function for random number generator"<br>
# error "don't have function for random number generator"<br>
^<br>
../../../../Ipopt/src/Common/IpUtils.cpp:203:6: error: #error "don't have function for random number generator"<br>
# error "don't have function for random number generator"<br>
^<br>
../../../../Ipopt/src/Common/IpUtils.cpp: In function 'Ipopt::Number Ipopt::IpRandom01()':<br>
../../../../Ipopt/src/Common/IpUtils.cpp:187:3: warning: no return statement in function returning non-void [-Wreturn-type]<br>
}<br>
^<br>
make[3]: *** [IpUtils.lo] Error 1<br>
make[3]: Leaving directory `/home/bezrucav/OS-2.10.0/build/Ipopt/src/Common'<br>
make[2]: *** [all] Error 2<br>
make[2]: Leaving directory `/home/bezrucav/OS-2.10.0/build/Ipopt/src/Common'<br>
make[1]: *** [all-recursive] Error 1<br>
make[1]: Leaving directory `/home/bezrucav/OS-2.10.0/build/Ipopt'<br>
make: *** [all-recursive] Error 1<br>
bezrucav@rosel:~/OS-2.10.0/build$ <br>
<br>
<br>
Could you please tell me what I am doing wrong or what should I change in order to make the OS examples work?<br>
<br>
Many thanks in advance!<br>
<br>
Best regards,<br>
Stefan Bezrucav</span></font></span><br>
</p>
</div>
</body>
</html>