Execute cmake pathtowdtsrcdir -DBUILD_TESTING=on ,,,error
Closed this issue · 13 comments
-- Boost version: 1.64.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- Configuring done
CMake Error in CMakeLists.txt:
Target "option_type_test_short_flags" requires the language dialect "CXX14"
(with compiler extensions), but CMake does not know the compile flags to
use to enable it.
CMake Error in CMakeLists.txt:
Target "option_type_test_long_flags" requires the language dialect "CXX14"
(with compiler extensions), but CMake does not know the compile flags to
use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_gen_files" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt4tests" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdtbenchtestslib" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
CMake Error in CMakeLists.txt:
Target "wdtbenchlib" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "protocol_test" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdtbin" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "folly4wdt" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "file_reader_test" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
CMake Error in CMakeLists.txt:
Target "wdt4tests_min" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_url_test" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_gen_stats" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_gen_test" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "test_encdeci64_func" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
CMake Error in CMakeLists.txt:
Target "wdt_fd_test" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "test_stats" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "histogram" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_min" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "resource_controller_test" requires the language dialect "CXX14"
(with compiler extensions), but CMake does not know the compile flags to
use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_misc_tests" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
CMake Error in CMakeLists.txt:
Target "encryption_test" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
-- Generating done
-- Build files have been written to: /usr/local/src/wdt
looks like your compiler is too old ? you need gcc 4.9 or equivalent/newer
next time please paste the full output up to the first error instead of the end
my gcc version is 4.9。The installation of folly is right。
can you show the output of
cmake version
g++ --version
and the full output including your exact command line (cmake ../wdt ...) up to the first Target "option_type_test_short_flags" requires the language dialect "CXX14"
error
[root@itop wdt]# cmake --version
cmake version 3.9.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
[root@itop wdt]# g++ --version
g++ (GCC) 4.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@itop wdt]# cmake /usr/local/src/wdt/ -DBUILD_TESTING=on
-- Boost version: 1.64.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- Configuring done
CMake Error in CMakeLists.txt:
Target "option_type_test_short_flags" requires the language dialect "CXX14"
(with compiler extensions), but CMake does not know the compile flags to
use to enable it.
CMake Error in CMakeLists.txt:
Target "option_type_test_long_flags" requires the language dialect "CXX14"
(with compiler extensions), but CMake does not know the compile flags to
use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_gen_files" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt4tests" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdtbenchtestslib" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
CMake Error in CMakeLists.txt:
Target "wdtbenchlib" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "protocol_test" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdtbin" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "folly4wdt" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "file_reader_test" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
CMake Error in CMakeLists.txt:
Target "wdt4tests_min" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_url_test" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_gen_stats" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_gen_test" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "test_encdeci64_func" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
CMake Error in CMakeLists.txt:
Target "wdt_fd_test" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "test_stats" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "histogram" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_min" requires the language dialect "CXX14" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
CMake Error in CMakeLists.txt:
Target "resource_controller_test" requires the language dialect "CXX14"
(with compiler extensions), but CMake does not know the compile flags to
use to enable it.
CMake Error in CMakeLists.txt:
Target "wdt_misc_tests" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
CMake Error in CMakeLists.txt:
Target "encryption_test" requires the language dialect "CXX14" (with
compiler extensions), but CMake does not know the compile flags to use to
enable it.
-- Generating done
-- Build files have been written to: /usr/local/src/wdt
very strange, maybe a change in cmake 3.9, which OS is that ?
OS is centos
can you try cmake 3.8 or what we need to change in the cmakelist to make it work ?
given you had compiler errors before maybe your build dir is caching your old compiler. try cmake ... from a new empty directory
os is ubuntu。make appear error。
root@ubuntu:/usr/local/src/wdt# make
[ 11%] Built target gtest
[ 20%] Built target folly4wdt
[ 60%] Built target wdt_min
[ 61%] Built target wdt4tests_min
[ 64%] Built target wdt4tests
[ 66%] Built target encryption_test
Linking CXX executable _bin/wdt/file_reader_test
libwdt4tests.so: undefined reference to google::FlagRegisterer::FlagRegisterer<long>(char const*, char const*, char const*, long*, long*)' libwdt4tests.so: undefined reference to
google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, int*, int*)'
libwdt4tests.so: undefined reference to google::FlagRegisterer::FlagRegisterer<std::string>(char const*, char const*, char const*, std::string*, std::string*)' libwdt4tests.so: undefined reference to
google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, double*, double*)'
libwdt4tests.so: undefined reference to `google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, bool*, bool*)'
collect2: error: ld returned 1 exit status
make[2]: *** [_bin/wdt/file_reader_test] Error 1
make[1]: *** [CMakeFiles/file_reader_test.dir/all] Error 2
make: *** [all] Error 2
you need to install gflags with the proper namespace
https://github.com/facebook/wdt/blob/master/build/BUILD.md#build-instructions