Issue503

Title compiling with USE_LP and 64-bit mode fails with modern g++
Priority bug Status resolved
Superseder Nosy List florian, jendrik, malte
Assigned To malte Keywords
Optional summary

Created on 2014-12-16.01:23:15 by malte, last changed by florian.

Messages
msg3954 (view) Author: florian Date: 2014-12-17.12:00:46
> Push and pop don't seem to work with gcc 4.4, and I didn't want
> to break the compile just for this (although we'll probably break it soon).

Currently this is problematic for a #pragma declaration in
lp_solver_interface.h. We could avoid it there with a forward declaration, which
we do in issue443.
msg3953 (view) Author: malte Date: 2014-12-16.17:59:27
Thanks! Merged. Push and pop don't seem to work with gcc 4.4, and I didn't want
to break the compile just for this (although we'll probably break it soon).
msg3951 (view) Author: florian Date: 2014-12-16.09:20:50
From your error message, I guess we can just ignore this by putting the
following around the include for CLP:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverflow"
#include <OsiClpSolverInterface.hpp>
#pragma GCC diagnostic pop
msg3947 (view) Author: malte Date: 2014-12-16.01:23:15
Tested on maia with USE_LP=1 (using a COIN library installed by Florian), -m64,
and gcc 4.8 (set up with module load GCC/4.8.2).

Compilation works fine if any of the three things are changed to the default
(USE_LP=0, -m32, or gcc 4.4). It looks like we might need to add another #pragma
somewhere?

Also, maybe our buildbots should cover 32 bit and 64 bit as well as USE_LP=0 and
USE_LP=1?
(Maybe not every version needs to be run on every commit, though.)

=======================================================================
g++  -g -m64 -std=c++0x -Wall -Wextra -pedantic -Wno-deprecated -Werror
-Iext  -D COIN_HAS_CLP -I/infai/pommeren/local/opt/coin64/include/coin
-D USE_LP -O3 -DNDEBUG -fomit-frame-pointer -c additive_heuristic.cc -o
.obj/additive_heuristic.release.o
In file included from lp_solver_interface.cc:8:0:
/infai/pommeren/local/opt/coin64/include/coin/OsiClpSolverInterface.hpp:376:39:
error: large integer implicitly truncated to unsigned type
[-Werror=overflow]
        unsigned maxLen = std::string::npos) const;
                                       ^
/infai/pommeren/local/opt/coin64/include/coin/OsiClpSolverInterface.hpp:381:39:
error: large integer implicitly truncated to unsigned type
[-Werror=overflow]
        unsigned maxLen = std::string::npos) const;
                                       ^
cc1plus: all warnings being treated as errors
make: *** [.obj/lp_solver_interface.release.o] Error 1
=======================================================================
History
Date User Action Args
2014-12-17 12:00:47floriansetmessages: + msg3954
2014-12-16 17:59:27maltesetstatus: chatting -> resolved
assignedto: malte
messages: + msg3953
2014-12-16 12:11:56jendriksetnosy: + jendrik
2014-12-16 09:20:50floriansetmessages: + msg3951
2014-12-16 01:23:15maltecreate