Couenne fails to build with gcc 6.2.1
I know this is an upstream issue (maybe even fixed already), but opening this to keep track on the julia side. On ArchLinux with gcc 6.2.1, I get the following error:
In file included from /usr/include/c++/6.2.1/string:52:0,
from /home/mlubin/.julia/v0.5/Cbc/deps/usr/include/coin/CoinError.hpp:9,
from /home/mlubin/.julia/v0.5/Cbc/deps/usr/include/coin/CoinHelperFunctions.hpp:25,
from ../../../../Couenne/src/problem/../readnl/readnl.cpp:17:
/usr/include/c++/6.2.1/bits/basic_string.h: In function 'double std::__cxx11::stod(const string&, std::size_t*)':
/usr/include/c++/6.2.1/bits/basic_string.h:5443:31: error: 'strtod_ASL' is not a member of 'std'
{ return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
^~~
/usr/include/c++/6.2.1/bits/basic_string.h:5443:31: note: suggested alternative:
In file included from ../../../../Couenne/src/problem/../readnl/readnl.cpp:11:0:
/home/mlubin/.julia/v0.5/Ipopt/deps/usr/include/coin/ThirdParty/asl.h:1107:16: note: 'strtod_ASL'
extern double strtod_ASL(Const char*, char**);
^~~~~~~~~~
make[2]: *** [Makefile:503: readnl.lo] Error 1
make[2]: Leaving directory '/home/mlubin/.julia/v0.5/CoinOptServices/deps/src/OS-2.9.2/build/Couenne/src/problem'
make[1]: *** [Makefile:476: all-recursive] Error 1
make[1]: Leaving directory '/home/mlubin/.julia/v0.5/CoinOptServices/deps/src/OS-2.9.2/build/Couenne'
make: *** [Makefile:310: all-recursive] Error 1
CC @chriscoey
maybe even fixed already
Highly doubt it. From the relevant mailing lists I don't think it's been reported.
Try adding #undef strtod after https://github.com/coin-or/Couenne/blob/releases/0.5.4/Couenne/src/readnl/readnl.cpp#L11
I'm trying to compile OS trunk. Ran into the same issue and your fix worked, now there's a new error:
OSMatrix.cpp: In member function 'ExpandedMatrixBlocks* MatrixType::getBlocks(int*, int, int*, int, OSMatrix**, bool, bool, ENUM_MATRIX_TYPE, ENUM_MATRIX_SYMMETRY)':
OSMatrix.cpp:2118:15: error: cannot convert 'bool' to 'ExpandedMatrixBlocks*' in return
return false;
Changed false to NULL and proceeded to get a bunch more identical errors in different places.
-std=gnu++98 ?
where would I put that?
ADD_CXXFLAGS="-std=gnu++98" in the configure call, maybe
In file included from /usr/include/c++/6.3.1/cstdint:35:0,
from CoinTypes.hpp:15,
from CoinHelperFunctions.hpp:24,
from CoinPostsolveMatrix.cpp:11:
/usr/include/c++/6.3.1/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
Guess the whole stack would need to be re-configured then, ref https://github.com/coin-or/CoinUtils/blob/releases/2.10.7/CoinUtils/src/CoinTypes.hpp
I did reconfigure the whole stack. There are nice warnings like
configure: WARNING: cstdint: present but cannot be compiled
configure: WARNING: cstdint: check for missing prerequisite headers?
configure: WARNING: cstdint: see the Autoconf documentation
configure: WARNING: cstdint: section "Present But Cannot Be Compiled"
configure: WARNING: cstdint: proceeding with the preprocessor's result
configure: WARNING: cstdint: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------------------------------- ##
configure: WARNING: ## Report this to http://projects.coin-or.org/CoinUtils ##
configure: WARNING: ## ---------------------------------------------------- ##
config.log might have more info there, but at this point probably better to let Ted and Gus know.