Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superbuild fails on Ubuntu Mate 22.04 #88

Open
themightyoarfish opened this issue Oct 1, 2024 · 9 comments
Open

Superbuild fails on Ubuntu Mate 22.04 #88

themightyoarfish opened this issue Oct 1, 2024 · 9 comments

Comments

@themightyoarfish
Copy link

After resolving #74 , my next error is

… 
-- Performing Test COMPILER_SUPPORT_std=cpp03
-- Configuring done
CMake Error at /usr/share/cmake-3.22/Modules/CTestTargets.cmake:28 (configure_file):
  No such file or directory
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/CTest.cmake:264 (include)
  CMakeLists.txt:62 (include)


-- Performing Test COMPILER_SUPPORT_std=cpp03 - Failed
-- Standard libraries to link to explicitly: none
-- Performing Test COMPILER_SUPPORT_std=cpp03 - Failed
-- Standard libraries to link to explicitly: none
[ 26%] Performing build step for 'cereal'
-- Generating done
-- Build files have been written to: /home/rasmus/software/ct_icp/.cmake-build-superbuild/MappingResearchKEU_superbuild/src/MappingResearchKEU_superbuild-build/yaml-cpp/src/yaml-cpp-build
gmake[6]: warning: -j6 forced in submake: resetting jobserver mode.
[ 27%] Performing build step for 'yaml-cpp'
-- Found unsuitable Qt version "5.15.3" from /usr/bin/qmake
gmake[6]: warning: -j6 forced in submake: resetting jobserver mode.
CMake Error: The source directory "/home/rasmus/software/ct_icp/.cmake-build-superbuild/MappingResearchKEU_superbuild/src/MappingResearchKEU_superbuild-build/glog/src/glog-build/CMakeFiles/CMakeTmp" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
CMake Error at CMakeLists.txt:297 (try_compile):
  Failed to configure test project build system.


CMake Error: The source directory "/home/rasmus/software/ct_icp/.cmake-build-superbuild/MappingResearchKEU_superbuild/src/MappingResearchKEU_superbuild-build/glog/src/glog-build/CMakeFiles/CMakeTmp" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
CMake Error at CMakeLists.txt:297 (try_compile):
  Failed to configure test project build system.
…

And unfortunately, the build continues for a while, leaving you to find this error in the past terminal output.

@themightyoarfish
Copy link
Author

This seems to resolve when setting -DWITH_GTEST=OFF in superbuild/CMakeLists.txt. Also set -DWITH_CEREAL=OFF, but unsure if this contributed.

@themightyoarfish
Copy link
Author

Next error when building the actual program is

CMake Error at test/unit/CMakeLists.txt:6 (target_link_libraries):
  Cannot specify link libraries for target "all_tests" which is not built by
  this project.

@themightyoarfish
Copy link
Author

Removing the tests/ subdirectory from the root cmakelists then makes it configure, but it does not build:

In file included from /usr/include/signal.h:328,
                 from /home/rasmus/software/ct_icp/src/SlamCore/utils.cxx:16:
/home/rasmus/software/ct_icp/src/SlamCore/utils.cxx:118:32: error: size of array ‘alternate_stack’ is not an integral constant-expression
  118 | static uint8_t alternate_stack[SIGSTKSZ];
      |                                ^~~~~~~~
make[2]: *** [src/SlamCore/CMakeFiles/SlamCore.dir/build.make:146: src/SlamCore/CMakeFiles/SlamCore.dir/utils.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:149: src/SlamCore/CMakeFiles/SlamCore.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Maybe this is now a compiler version issue.

@themightyoarfish
Copy link
Author

I can temporarily work around this by putting in a constant instead, but it then turns out that the software does not build without cereal:

/usr/bin/ld: cannot find -lcereal: No such file or directory

@themightyoarfish
Copy link
Author

themightyoarfish commented Oct 1, 2024

Setting -DWITH_CEREAL back to ON in the superbuild and rebuilding it (twice, as first time gives error) still does not install the required shared library :/

Actually, running the superbuild install with -j1 shows no errors, while without job number, it just fails without showing th actual error. Still no libcereal though.

… 
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/MappingResearchKEU_superbuild.dir/build.make:102: MappingResearchKEU_superbuild/src/MappingResearchKEU_superbuild-stamp/MappingResearchKEU_superbuild-install] Error 2
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/MappingResearchKEU_superbuild.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

There's no red text at least anywhere in the terminal, maybe it scrolls too fast to be found and my history buffer does not have it anymore.

@themightyoarfish
Copy link
Author

themightyoarfish commented Oct 1, 2024

Ah I see this is a problem in the SlamCore cmakelists, as cereal is header-only, but it is just passed to target_link_libraries(). Maybe the library does not get found properly.

@themightyoarfish
Copy link
Author

Ok I am now progressing, after running sudo apt autoremove and installing the libgflags-dev and libunwind-dev packages.
It appears to build successfully now…

@themightyoarfish
Copy link
Author

To install the ROS wrapper, instructions say

    /!\ Set the CMAKE argument -DWITH_ROS=ON to the configure step (1) of the superbuild (Step 1)

However, this cmake variable is not respected:

cmake ../superbuild/ -DWITH_ROS=ON
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    WITH_ROS

@themightyoarfish
Copy link
Author

Just following the instructions without WITH_ROS anywhere reveals that the ros wrapper also does not configure with the superbuild:

INFO [ROSCore] -- Variable "SUPERBUILD_INSTALL_DIR" not specified. Trying to set it to /home/rasmus/software/ct_icp/install
INFO [ROSCore] -- Variable "CT_ICP_INSTALL_DIR" not specified. Trying to set it to /home/rasmus/software/ct_icp/install/CT_ICP/lib/cmake.
INFO [Superbuild] -- Successfully found target glog::glog
INFO [Superbuild] --  Variable EIGEN_DIR not found, setting it to directory /home/rasmus/software/ct_icp/install/Eigen3/share/eigen3/cmake
INFO [Superbuild] -- Successfully Found Target Eigen3::Eigen
-- Found required Ceres dependency: Eigen version 3.3.7 in /home/rasmus/software/ct_icp/install/Eigen3/include/eigen3
-- Found required Ceres dependency: glog
-- Found Ceres version: 2.0.0 installed in: /home/rasmus/software/ct_icp/install/Ceres with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SchurSpecializations, Multithreading]
INFO [Superbuild] -- Successfully found target Ceres::ceres
INFO [Superbuild] -- Successfully found target yaml-cpp
CMake Error at /home/rasmus/software/ct_icp/install/viz3d/lib/cmake/viz3dConfig.cmake:12 (check_required_components):
  Unknown CMake command "check_required_components".
Call Stack (most recent call first):
  /home/rasmus/software/ct_icp/install/superbuild_import.cmake:35 (find_package)
  /home/rasmus/software/ct_icp/install/superbuild_import.cmake:101 (SLAM_DEFAULT_FIND_PACKAGE)
  /home/rasmus/software/ct_icp/cmake/superbuild_utils.cmake:27 (include)
  CMakeLists.txt:33 (SLAM_INCLUDE_SUPERBUILD)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant