empiredan opened a new issue, #1424:
URL: https://github.com/apache/incubator-pegasus/issues/1424
While building unit tests for new metrics on ubuntu 1604, compilation errors
are reported as follows:
```
[ 97%] Building CXX object
src/utils/test/CMakeFiles/dsn_utils_tests.dir/output_utils_test.cpp.o
/root/incubator-pegasus/src/utils/test/metrics_test.cpp:3053:1: error:
converting to 'std::tuple<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool>' from
initializer list would use explicit constructor 'constexpr std::tuple<
<template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const
char (&)[11], bool, bool, bool, bool}; <template-parameter-2-2> = void;
_Elements = {std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, bool, bool, bool, bool}]'
};
^
/root/incubator-pegasus/src/utils/test/metrics_test.cpp:3053:1: error:
converting to 'std::tuple<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool>' from
initializer list would use explicit constructor 'constexpr std::tuple<
<template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const
char (&)[11], bool, bool, bool, bool}; <template-parameter-2-2> = void;
_Elements = {std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, bool, bool, bool, bool}]'
/root/incubator-pegasus/src/utils/test/metrics_test.cpp:3053:1: error:
converting to 'std::tuple<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool>' from
initializer list would use explicit constructor 'constexpr std::tuple<
<template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const
char (&)[11], bool, bool, bool, bool}; <template-parameter-2-2> = void;
_Elements = {std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, bool, bool, bool, bool}]'
/root/incubator-pegasus/src/utils/test/metrics_test.cpp:3053:1: error:
converting to 'std::tuple<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool>' from
initializer list would use explicit constructor 'constexpr std::tuple<
<template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const
char (&)[11], bool, bool, bool, bool}; <template-parameter-2-2> = void;
_Elements = {std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, bool, bool, bool, bool}]'
/root/incubator-pegasus/src/utils/test/metrics_test.cpp:3053:1: error:
converting to 'std::tuple<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool>' from
initializer list would use explicit constructor 'constexpr std::tuple<
<template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const
char (&)[11], bool, bool, bool, bool}; <template-parameter-2-2> = void;
_Elements = {std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, bool, bool, bool, bool}]'
cc1plus: error: unrecognized command line option
'-Wno-implicit-float-conversion' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-deprecated-register'
[-Werror]
cc1plus: error: unrecognized command line option
'-Wno-inconsistent-missing-override' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-dangling-else'
[-Werror]
cc1plus: all warnings being treated as errors
make[2]: ***
[src/utils/test/CMakeFiles/dsn_utils_tests.dir/metrics_test.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
src/utils/test/CMakeFiles/dsn_utils_tests.dir/build.make:397: recipe for
target 'src/utils/test/CMakeFiles/dsn_utils_tests.dir/metrics_test.cpp.o' failed
[ 98%] Building CXX object
src/failure_detector/test/CMakeFiles/dsn.failure_detector.tests.dir/failure_detector.cpp.o
make[1]: *** [src/utils/test/CMakeFiles/dsn_utils_tests.dir/all] Error 2
CMakeFiles/Makefile2:3375: recipe for target
'src/utils/test/CMakeFiles/dsn_utils_tests.dir/all' failed
make[1]: *** Waiting for unfinished jobs....
[ 98%] Building CXX object
src/failure_detector/test/CMakeFiles/dsn.failure_detector.tests.dir/main.cpp.o
[ 98%] Linking CXX executable dsn.failure_detector.tests
[ 98%] Built target dsn.failure_detector.tests
make: *** [all] Error 2
Makefile:135: recipe for target 'all' failed
Error: Process completed with exit code 2.
```
The version of gcc used by ubuntu 1604 is:
```
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)
```
The reason is that `std::tuple` has not been implicitly convertible by
member initializer lists for gcc 5.4.0, see
[tuple](https://en.cppreference.com/w/cpp/utility/tuple/tuple) and
[N4387](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4387.html).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]