<div>I am having trouble compiling Symphony with cplex support using OSI. Here are the details of my problem:</div><div><br></div><div>- I have cplex installed in this directory: /opt/ibm/ILOG/CPLEX_Studio124/</div><div><br>
</div><div>- I compiled and installed OSI 0.102 with cplex support using this configure string:</div><div><br></div><div>./configure --with-cplex-lib="-L/opt/ibm/ILOG/CPLEX_Studio124/cplex/lib/x86-64_sles10_4.1/static_pic -lcplex -lpthread" --with-cplex-incdir="/opt/ibm/ILOG/CPLEX_Studio124/cplex/include/ilcplex/" -C ADD_CXXFLAGS="-Wno-long-long" --prefix="/opt/coin-or/osi"</div>
<div><br></div><div>then I rand make and sudo make-install</div><div><br></div><div>Now I am trying to compile symphony using this configure string:</div><div><br></div><div>./configure --with-cplex-lib="-L/opt/ibm/ILOG/CPLEX_Studio124/cplex/lib/x86-64_sles10_4.1/static_pic -lcplex -lm -lpthread" --with-cplex-incdir="/opt/ibm/ILOG/CPLEX_Studio124/cplex/include/ilcplex/" --with-lp-solver="cplex" --prefix="/opt/coin-or/symphony" --enable-gnu-packages</div>
<div><br></div><div>When I run make, I get this error (I apologize for the length):</div><div><br></div><div>-----------------------------------------------------------------------------------------------------------</div>
<div> g++ -DHAVE_CONFIG_H -I. -I../include -I../include -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/OsiCpx -I/opt/ibm/ILOG/CPLEX_Studio124/cplex/include/ilcplex -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/Osi -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/CoinUtils/src -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglAllDifferent -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglClique -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglDuplicateRow -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglFlowCover -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglGomory -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglKnapsackCover -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglLandP -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglLiftAndProject -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglMixedIntegerRounding -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglMixedIntegerRounding2 -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglOddHole -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglPreProcess -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglProbing -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglRedSplit -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglResidualCapacity -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglSimpleRounding -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglTwomir -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Clp/src/OsiClp -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Clp/src -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/Osi -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/CoinUtils/src -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Clp/src/OsiClp -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Clp/src -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/Osi -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/CoinUtils/src -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/Osi -I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/CoinUtils/src -DHAS_READLINE -DUSE_CGL_CUTS -DSIGHANDLER -DHAS_RANDOM -DHAS_SRANDOM -D__NONE__ -D__LINUX -DCOMPILE_IN_CG -DCOMPILE_IN_CP -DCOMPILE_IN_LP -DCOMPILE_IN_TM -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DSYMPHONY_BUILD -Wno-unknown-pragmas -Wno-write-strings -Wno-sign-compare -Wno-cast-qual -MT libSym_la-master.lo -MD -MP -MF .deps/libSym_la-master.Tpo -c Master/master.c -fPIC -DPIC -o .libs/libSym_la-master.o</div>
<div>In file included from ../include/sym_cg.h:22:0,</div><div> from ../include/sym_tm.h:24,</div><div> from ../include/sym_master.h:27,</div><div> from Master/master.c:34:</div>
<div>../include/sym_lp_solver.h:117:2: error: #error ###################################</div><div>../include/sym_lp_solver.h:118:2: error: #error # Undefined or unknown LP solver.</div><div>../include/sym_lp_solver.h:119:2: error: #error # Please edit SYMPHONY/Makefile</div>
<div>../include/sym_lp_solver.h:120:2: error: #error # and define LP_SOLVER properly.</div><div>../include/sym_lp_solver.h:121:2: error: #error ###################################</div><div>../include/sym_lp_solver.h:298:16: error: 'OsiCuts' was not declared in this scope</div>
<div>../include/sym_lp_solver.h:298:25: error: 'cutlist' was not declared in this scope</div><div>../include/sym_lp_solver.h:298:41: error: expected primary-expression before '*' token</div><div>../include/sym_lp_solver.h:298:42: error: 'lp_data' was not declared in this scope</div>
<div>../include/sym_lp_solver.h:298:51: error: expected primary-expression before 'int'</div><div>../include/sym_lp_solver.h:298:65: error: expected primary-expression before 'int'</div><div>../include/sym_lp_solver.h:299:27: error: expected primary-expression before '*' token</div>
<div>../include/sym_lp_solver.h:299:30: error: 'cuts' was not declared in this scope</div><div>../include/sym_lp_solver.h:299:36: error: expected primary-expression before 'char'</div><div>../include/sym_lp_solver.h:299:55: error: expected primary-expression before 'int'</div>
<div>../include/sym_lp_solver.h:300:20: error: expected primary-expression before '*' token</div><div>../include/sym_lp_solver.h:300:21: error: 'lp_stat' was not declared in this scope</div><div>../include/sym_lp_solver.h:300:41: error: expected primary-expression before '*' token</div>
<div>../include/sym_lp_solver.h:300:42: error: 'compe_times' was not declared in this scope</div><div>../include/sym_lp_solver.h:300:55: error: expected primary-expression before 'int'</div><div>../include/sym_lp_solver.h:300:68: error: expression list treated as compound expression in initializer [-fpermissive]</div>
<div>In file included from ../include/sym_primal_heuristics.h:25:0,</div><div> from Master/master.c:37:</div><div>../include/sym_lp.h:194:30: error: 'OsiCuts' has not been declared</div><div>../include/sym_lp.h:196:28: error: 'OsiCuts' has not been declared</div>
<div>In file included from ../include/sym_primal_heuristics.h:25:0,</div><div> from Master/master.c:37:</div><div>../include/sym_lp.h:198:18: error: 'OsiCuts' has not been declared</div><div>In file included from Master/master.c:37:0:</div>
<div>../include/sym_primal_heuristics.h:78:44: error: 'CoinPackedMatrix' does not name a type</div><div>../include/sym_primal_heuristics.h:78:62: error: ISO C++ forbids declaration of 'matrix' with no type [-fpermissive]</div>
<div>Master/master.c: In function 'int sym_get_col_solution(sym_environment*, double*)':</div><div>Master/master.c:3135:62: warning: suggest parentheses around '&&' within '||' [-Wparentheses]</div>
<div>Master/master.c: In function 'warm_start_desc* sym_read_warm_start(char*)':</div><div>-----------------------------------------------------------------------------------------------------------</div><div><br>
</div><div><br></div><div><br></div><div>The problem seems to be in the file ~/Downloads/coin/symphony/SYMPHONY-5.4.0/SYMPHONY/include/sym_lp_solver.h</div><div><br></div><div>It looks like this macro is evaluating to false when it needs to be true:</div>
<div><br></div><div>#ifdef __OSI_CPLEX__</div><div><br></div><div>Is there something I am doing wrong with my configure string? If anyone could help me, I would be much obliged!</div><div><br></div><div>Sincerely,</div><div>
<br></div><div>Ethan</div>