Tango Starter device server compilation with CMake
|
|
---|---|
Hi all, I am triying to compile Tango Starter (TANGO STARTER url link) but it is impossible. I get this error: tests@ESHEPLAB2:~/adri_tests/starter-Starter-8.3/build$ cmake ../ – The CXX compiler identification is GNU 11.4.0 – Detecting CXX compiler ABI info – Detecting CXX compiler ABI info - done – Check for working CXX compiler: /usr/bin/c++ - skipped – Detecting CXX compile features – Detecting CXX compile features - done – No build type specified - default is DEBUG – Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") – Checking for one of the modules 'tango' – Tango not found via pkg-config, falling back to cmake find – Found ZeroMQ: /usr/lib/x86_64-linux-gnu/libzmq.so – Found cppzmq: /usr/include/zmq.hpp – Found omniORB4: /usr/lib/x86_64-linux-gnu/libomniORB4.so found components: COS4 Dynamic4 thread CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Tango (missing: Tango_LIBRARY Tango_INCLUDE_DIR) (found version "Tango_VERSION-NOTFOUND") Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) TangoCMakeModules/FindTango.cmake:222 (find_package_handle_standard_args) CMakeLists.txt:25 (find_package) Even if, I modify the CMakeLists.txt file, I am not able to generate the Makefile. Does anyone know the way to help me? Thanks in advance, Adrián. |
|
|
---|---|
Does the folder `TangoCMakeModules` in the starter repo contain something? If not, you are missing the submodules. Try `git submodule update –init` to fetch it. |
|
|
---|---|
t-b Yes, this folder contains TangoCMakeModules submodule (TangoCMakeModules url link).
|
|
|
---|---|
Instead of copying files manually you can use https://gitlab.com/tango-controls/starter/-/releases/Starter-8.3/downloads/starter-with-submodules-Starter-8.3.tar.gz which already has the submodule contents in the correct versions. Do you have cppTango already installed? You can pass in a custom location with `Tango_ROOT` so the commandline looks like ` cmake -B build -S . -DTango_ROOT=/usr/local`. You don't need that for /usr/local though. |
|
|
---|---|
t-b It works!! Thank you!! Now, I have to cross-compile the same project for ARM, using Buildroot. For that, I have this tangostarter.mk file, which must use CMake to generate the Makefile, and then compile the application, but the part of CMake does not work. TANGOSTARTER_SITE = https://gitlab.com/tango-controls/starter/-/releases/Starter-8.3/downloads TANGOSTARTER_SOURCE = starter-with-submodules-Starter-8.3.tar.gz TANGOSTARTER_INSTALL_TARGET = YES TANGOSTARTER_AUTORECONF = NO TANGOSTARTER_LICENSE = GPLv2 TANGOSTARTER_LICENSE_FILES = COPYING TANGOSTARTER_DEPENDENCIES = cpptango omniorb zeromq cppzmqv490 TANGOSTARTER_CONF_OPTS = \ -DTango_USE_PKG_CONFIG=ON \ -DTango_FORCE_STATIC=OFF \ -DCMAKE_VERBOSE_MAKEFILE=true \ -DCMAKE_PREFIX_PATH=$(BUILD_DIR)/cmake-3.22.3 \ -DTango_ROOT= $(BUILD_DIR)/cpptango \ -DZeroMQ_ROOT=$(BUILD_DIR)/zeromq-4.3.4 \ -Dcppzmq_ROOT=$(BUILD_DIR)/cppzmqv490-4.9.0 \ -DomniORB4_ROOT=$(BUILD_DIR)/omniorb-$(OMNIORB_VERSION_) define TANGOSTARTER_BUILD_CMDS $(BUILD_DIR)/cmake-3.22.3/bin/cmake -B $(BUILD_DIR)/tangostarter/build $(TANGOSTARTER_CONF_OPTS) -S $(BUILD_DIR)/tangostarter $(MAKE) $(TANGOSTARTER_CONF_OPTS) -C $(@D) all endef I am not an expert in CMake and it is possible that I am making a mistake. Thanks in advance! |
|
|
---|---|
What is this code snippet exactly supposed to do? Please provide a complete example. |