cmake error for boost library
I had a cmake error due to the boost library not linking properly. This may be an issue with boost or cactus.
Earlier this year (April 12, 2021) I was able to compile (cmake and make) without errors), but today I had the following error from cmake:
-- #### Checking for external Dependencies ####
-- Found THttp Server support - enabling compiler flags
-- Using ROOT version 6.22/08
-- Could NOT find AMC13 (missing: CACTUS_AMC13_FOUND)
-- Could NOT find PH2_Antenna (missing: PH2_ANTENNA_SOURCE_DIR)
-- Could NOT find PH2_PowerSupply (missing: PH2_POWERSUPPLY_SOURCE_DIR)
-- Could NOT find PH2_TCUSB (missing: PH2_TCUSB_SOURCE_DIR)
-- EUDAQ variable is not defined. Building without EUDAQ producer
-- Could NOT find ZMQ (missing: ZMQ_LIBRARIES ZMQ_INCLUDE_DIRS)
-- Found boost installation that comes with uHAL, using this version
CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1138 (message):
Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
CMakeLists.txt:182 (find_package)
I edited CMakeLists.txt to get around this issue by hardcoding BOOST_INCLUDE_DIRS
and BOOST_LIBRARY_DIRS
. Here is the commit:
Here is some additional info.
operating system:
[kucms@kucms build]$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
g++ version:
[kucms@kucms build]$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
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.
cactus, control hub:
[kucms@kucms build]$ /opt/cactus/bin/controlhub_info
The ControlHub is running. General info ...
started at 2021-06-21 09:11:31 UTC
uptime: 11 days, 7 hours, 5 minutes, 52 seconds
version: 2.8.1
config file: /etc/controlhub/default/sys.config
Device client parameters ...
max packets in flight to each board = 16
timeout for replies from board = 20ms
device client lifetime when inactive = 15000ms
TCP parameters ...
Listening on port 10203
boost version:
[kucms@kucms build]$ sudo yum install boost-devel
Loaded plugins: changelog, fastestmirror, kernel-module, langpacks, protectbase, tsflags, versionlock
Loading mirror speeds from cached hostfile
208 packages excluded due to repository protections
Package boost-devel-1.53.0-28.el7.x86_64 already installed and latest version
Nothing to do