Closed WvA1979 closed 1 year ago
Try copying the CPLEX header and libs into a directory which names doesn't have spaces. Spaces in paths don't work well with configure and makefiles.
Indeed if CPLEX is in a path without spaces it compiles : The correct command is then:
./coinbrew build Clp ADD_FFLAGS=-fallow-argument-mismatch ADD_LT_LDFLAGS=-lstdc++ --tests=none --with-cplex --with-cplex-lib=/c/IBM/ILOG/CPLEX_Studio221/cplex/lib/x64_windows_msvc14/stat_mda/cplex2210.lib --with-cplex-incdir=/c/IBM/ILOG/CPLEX_Studio221/cplex/include/ilcplex/ --disable-cplex-libcheck ADD_CXXFLAGS="-DBUILD_CPXSTATIC -DCPXSIZE_BITS_TEST_DISABLE"
The additional CXXFLAGS are necessary for Cplex deprecation issues ; Likewise the FFLAGS are necessary for the third party code
I am using MSYS2 MINGW64 to compile various projects. One of these projects has a COIN dependency and notably uses OsiCpx ; Now i have managed to get everything compiled except for OsiCpx where the difficulty resides in specifying the cplex location ;
This may have to do with cplex being installed in "Program Files" ;
My base command (without OsiCpx getting compiled) : wget https://raw.githubusercontent.com/coin-or/coinbrew/v1.0/coinbrew ./coinbrew fetch Clp ./coinbrew build Clp ADD_FFLAGS=-fallow-argument-mismatch ADD_LT_LDFLAGS=-lstdc++ --tests=none
works fine and after some hours everything is there ;
However when I do: wget https://raw.githubusercontent.com/coin-or/coinbrew/v1.0/coinbrew ./coinbrew fetch Clp ./coinbrew build Clp ADD_FFLAGS=-fallow-argument-mismatch ADD_LT_LDFLAGS=-lstdc++ --tests=none --with-cplex --with-cplex-lib="/c/Program Files/IBM/ILOG/CPLEX_Studio221/cplex/lib/x64_windows_msvc14/stat_mda/cplex2210.lib" --with-cplex-incdir="/c/Program Files/IBM/ILOG/CPLEX_Studio221/cplex/include/ilcplex/" --disable-cplex-libcheck
issues appear in the configure script in the Osi/Osi directory lines 23272 where CPXINCDIR is set ; (I have tried specifying the space with \ and with or without "" ) in fact here I get
I have tried a dirty workaround by skipping this and just setting manually the directories, in other words changing these lines to:
Then indeed I can manually configure, yet "make" still fails:
I am making an attempt after having put cplex in a directory without "white spaces", but unsure if that will do the trick ; Is there any proper way of handling the problem ?