Issues with configuration/compilation on local Ubuntu 19.10
I am having issues compiling DAQling on a development machine locally:
$ cmake -DCERN_ENVIRONMENT=OFF ..
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Not using system Curl, using built-in curl project instead.
CMake Error at 3rdparty/cpr/opt/CMakeLists.txt:48 (add_subdirectory):
The source directory
/home/simonspa/software/daqling/3rdparty/cpr/opt/curl
does not contain a CMakeLists.txt file.
CMake Error at 3rdparty/cpr/opt/CMakeLists.txt:60 (set_property):
set_property could not find TARGET libcurl. Perhaps it has not yet been
created.
-- Set CURL_FOUND to TRUE.
-- Set CURL_LIBRARIES to libcurl.
-- Set CURL_INCLUDE_DIRS to /include;/include/curl.
-- Not using system gtest, using built-in googletest project instead.
CMake Error at 3rdparty/cpr/opt/CMakeLists.txt:82 (add_subdirectory):
The source directory
/home/simonspa/software/daqling/3rdparty/cpr/opt/googletest
does not contain a CMakeLists.txt file.
CMake Error at 3rdparty/cpr/opt/CMakeLists.txt:90 (set_property):
set_property could not find TARGET gtest. Perhaps it has not yet been
created.
CMake Error at 3rdparty/cpr/opt/CMakeLists.txt:91 (set_property):
set_property could not find TARGET gtest_main. Perhaps it has not yet been
created.
-- Set GTEST_FOUND to TRUE.
-- Set GTEST_LIBRARIES to gtest.
-- Set GTEST_MAIN_LIBRARIES to gtest_main.
-- Set GTEST_BOTH_LIBRARIES to gtest;gtest_main.
-- Set GTEST_INCLUDE_DIRS to /include.
-- Building mongoose project for test support.
CMake Error at 3rdparty/cpr/opt/CMakeLists.txt:106 (add_subdirectory):
The source directory
/home/simonspa/software/daqling/3rdparty/cpr/opt/mongoose
does not contain a CMakeLists.txt file.
-- Set MONGOOSE_FOUND to TRUE.
-- Set MONGOOSE_LIBRARIES to mongoose.
-- Set MONGOOSE_INCLUDE_DIRS to .
CMake Error at 3rdparty/cpr/opt/CMakeLists.txt:116 (set_property):
set_property could not find TARGET mongoose. Perhaps it has not yet been
created.
-- Using CURL_INCLUDE_DIRS: /include;/include/curl.
-- Using CURL_LIBRARIES: libcurl.
-- Adding extra sanitizer flags
-- Running debug build, tests enabled
-- Building module Dummy - OFF
-- Building module EventBuilder - ON
-- Building module FileWriter - ON
-- Building module MetricsSimulator - OFF
-- Building module ReadoutInterface - ON
-- Found /usr/bin/clang-format-4.0, adding formatting targets
-- Configuring incomplete, errors occurred!
Interestingly, re-running CMake again the configuration works.
Compilation fails with:
$ make
/home/simonspa/software/daqling/3rdparty/cpr/cpr/error.cpp: In static member function ‘static cpr::ErrorCode cpr::Error::getErrorCodeForCurlError(int32_t)’:
/home/simonspa/software/daqling/3rdparty/cpr/cpr/error.cpp:41:9: error: duplicate case value
41 | case CURLE_SSL_CACERT:
| ^~~~
/home/simonspa/software/daqling/3rdparty/cpr/cpr/error.cpp:25:9: note: previously used here
25 | case CURLE_PEER_FAILED_VERIFICATION:
| ^~~~
make[2]: *** [3rdparty/cpr/cpr/CMakeFiles/cpr.dir/build.make:115: 3rdparty/cpr/cpr/CMakeFiles/cpr.dir/error.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:458: 3rdparty/cpr/cpr/CMakeFiles/cpr.dir/all] Error 2
make: *** [Makefile:141: all] Error 2