Actions
Bug #5466
closedwt4 DboTest3.C compilation error with gcc 6
Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
-
Start date:
01/02/2017
Due date:
% Done:
0%
Estimated time:
Description
The preview verson of wt4, github 3.3.6-17-gfd7099d7, gets compilation errors on DboTest3.C with g (Debian 6.2.1-5) 6.2.1 20161124 under Debian stretch (testing). Here is one of the reported errors (with abbreviated paths):
In file included from /x/boost/boost_1_62/include/boost-1_62/boost/test/test_tools.hpp:45:0,
from /x/boost/boost_1_62/include/boost-1_62/boost/test/unit_test.hpp:18,
from /x/wt4p/test/dbo/DboTest3.C:7:
/x/wt4p/test/dbo/DboTest3.C: In member function ‘void dbo3_test2::test_method()’:
/x/wt4p/test/dbo/DboTest3.C:145:49: error: call of overloaded ‘abs(std::__tuple_element_t<1ul, std::tuple<int, double> >)’ is ambiguous
BOOST_REQUIRE(std::abs(std::get<1>(tupe) - 6.6) < 0.001);
^
/x/boost/boost_1_62/include/boost-1_62/boost/test/tools/old/interface.hpp:49:47: note: in definition of macro ‘BOOST_TEST_TOOL_PASS_PRED2’
#define BOOST_TEST_TOOL_PASS_PRED2( P, ARGS ) P
^
/x/boost/boost_1_62/include/boost-1_62/boost/test/tools/old/interface.hpp:82:45: note: in expansion of macro ‘BOOST_TEST_TOOL_IMPL’
#define BOOST_REQUIRE( P ) BOOST_TEST_TOOL_IMPL( 2, \
^~~~~~~~~~~~~~~~~~~~
/x/wt4p/test/dbo/DboTest3.C:145:3: note: in expansion of macro ‘BOOST_REQUIRE’
BOOST_REQUIRE(std::abs(std::get<1>(tupe) - 6.6) < 0.001);
^~~~~~~~~~~~~
In file included from /x/boost/boost_1_62/include/boost-1_62/boost/config/platform/linux.hpp:15:0,
from /x/boost/boost_1_62/include/boost-1_62/boost/config.hpp:57,
from /x/boost/boost_1_62/include/boost-1_62/boost/test/test_tools.hpp:17,
from /x/boost/boost_1_62/include/boost-1_62/boost/test/unit_test.hpp:18,
from /x/wt4p/test/dbo/DboTest3.C:7:
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
In file included from /usr/include/c++/6/cstdlib:75:0,
from /x/boost/boost_1_62/include/boost-1_62/boost/config/platform/linux.hpp:15,
from /x/boost/boost_1_62/include/boost-1_62/boost/config.hpp:57,
from /x/boost/boost_1_62/include/boost-1_62/boost/test/test_tools.hpp:17,
from /x/boost/boost_1_62/include/boost-1_62/boost/test/unit_test.hpp:18,
from /x/wt4p/test/dbo/DboTest3.C:7:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /x/boost/boost_1_62/include/boost-1_62/boost/config/platform/linux.hpp:15:0,
from /x/boost/boost_1_62/include/boost-1_62/boost/config.hpp:57,
from /x/boost/boost_1_62/include/boost-1_62/boost/test/test_tools.hpp:17,
from /x/boost/boost_1_62/include/boost-1_62/boost/test/unit_test.hpp:18,
from /x/wt4p/test/dbo/DboTest3.C:7:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
I believe the issue can be addressed by adding an include for cmath. A trivial patch is attached.
Files
Updated by Roel Standaert over 7 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
Updated by Roel Standaert over 7 years ago
- Status changed from InProgress to Implemented @Emweb
Updated by Roel Standaert over 7 years ago
- Status changed from Implemented @Emweb to Resolved
Updated by Roel Standaert over 6 years ago
- Status changed from Resolved to Closed
Actions