Build issue: cmake push without pop
Summary
When executing "cmake .." in the build folder on Ubuntu 20.04 there is a cmake error:
Boost 1.64.0 found. Found Boost components: random CMake Error in /home/rummler/Software/cmake/cmake-3.9.0-install/share/cmake-3.9/Modules/FindBoost.cmake: cmake_policy PUSH without matching POP Call Stack (most recent call first): CMakeLists.txt:212 (FIND_PACKAGE)
Solution seems to be to update cmake:
stackoverflow
But it is not clear which is the minimum working cmake version
Steps to reproduce
Most likely try to build with cmake 3.9.0
What is the current bug behavior?
It can cannot be built
What is the expected correct behavior?
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.64.0") found components: random
with cmake 3.20.2 (downloaded the most current one)
Build environment information
Expand for build environment summary
cmake .. -- Git project directory is dirty: ?? examples/tutorial-simulation.conf ?? models/tutorial-geometry.conf. -- Building Allpix^2 version v1.6.0+1390^g3bd423c5. -- Building "RelWithDebInfo" -- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components: doxygen dot -- Found LATEX: /home/rummler/Software/texlive/2020/bin/x86_64-linux/latex
-- Found LaTeX compiler. -- Found UnixCommands: /bin/bash
-- Manual: adding 27 module descriptions -- Manual: adding 12 example descriptions -- The CXX compiler identification is GNU 9.3.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test CXX_FLAG_WORKS__pedantic -- Performing Test CXX_FLAG_WORKS__pedantic - Success -- Performing Test CXX_FLAG_WORKS__Wall -- Performing Test CXX_FLAG_WORKS__Wall - Success -- Performing Test CXX_FLAG_WORKS__Wextra -- Performing Test CXX_FLAG_WORKS__Wextra - Success -- Performing Test CXX_FLAG_WORKS__Wcast_align -- Performing Test CXX_FLAG_WORKS__Wcast_align - Success -- Performing Test CXX_FLAG_WORKS__Wcast_qual -- Performing Test CXX_FLAG_WORKS__Wcast_qual - Success -- Performing Test CXX_FLAG_WORKS__Wconversion -- Performing Test CXX_FLAG_WORKS__Wconversion - Success -- Performing Test CXX_FLAG_WORKS__Wuseless_cast -- Performing Test CXX_FLAG_WORKS__Wuseless_cast - Success -- Performing Test CXX_FLAG_WORKS__Wctor_dtor_privacy -- Performing Test CXX_FLAG_WORKS__Wctor_dtor_privacy - Success -- Performing Test CXX_FLAG_WORKS__Wzero_as_null_pointer_constant -- Performing Test CXX_FLAG_WORKS__Wzero_as_null_pointer_constant - Success -- Performing Test CXX_FLAG_WORKS__Wdisabled_optimization -- Performing Test CXX_FLAG_WORKS__Wdisabled_optimization - Success -- Performing Test CXX_FLAG_WORKS__WformatE2 -- Performing Test CXX_FLAG_WORKS__WformatE2 - Success -- Performing Test CXX_FLAG_WORKS__Winit_self -- Performing Test CXX_FLAG_WORKS__Winit_self - Success -- Performing Test CXX_FLAG_WORKS__Wlogical_op -- Performing Test CXX_FLAG_WORKS__Wlogical_op - Success -- Performing Test CXX_FLAG_WORKS__Wmissing_declarations -- Performing Test CXX_FLAG_WORKS__Wmissing_declarations - Success -- Performing Test CXX_FLAG_WORKS__Wmissing_include_dirs -- Performing Test CXX_FLAG_WORKS__Wmissing_include_dirs - Success -- Performing Test CXX_FLAG_WORKS__Wnoexcept -- Performing Test CXX_FLAG_WORKS__Wnoexcept - Success -- Performing Test CXX_FLAG_WORKS__Wold_style_cast -- Performing Test CXX_FLAG_WORKS__Wold_style_cast - Success -- Performing Test CXX_FLAG_WORKS__Wredundant_decls -- Performing Test CXX_FLAG_WORKS__Wredundant_decls - Success -- Performing Test CXX_FLAG_WORKS__Wsign_conversion -- Performing Test CXX_FLAG_WORKS__Wsign_conversion - Success -- Performing Test CXX_FLAG_WORKS__Wsign_promo -- Performing Test CXX_FLAG_WORKS__Wsign_promo - Success -- Performing Test CXX_FLAG_WORKS__Wstrict_null_sentinel -- Performing Test CXX_FLAG_WORKS__Wstrict_null_sentinel - Success -- Performing Test CXX_FLAG_WORKS__Wstrict_overflowE5 -- Performing Test CXX_FLAG_WORKS__Wstrict_overflowE5 - Success -- Performing Test CXX_FLAG_WORKS__Wswitch_default -- Performing Test CXX_FLAG_WORKS__Wswitch_default - Success -- Performing Test CXX_FLAG_WORKS__Wundef -- Performing Test CXX_FLAG_WORKS__Wundef - Success -- Performing Test CXX_FLAG_WORKS__Wshadow -- Performing Test CXX_FLAG_WORKS__Wshadow - Success -- Performing Test CXX_FLAG_WORKS__Wformat_security -- Performing Test CXX_FLAG_WORKS__Wformat_security - Success -- Performing Test CXX_FLAG_WORKS__Wdeprecated -- Performing Test CXX_FLAG_WORKS__Wdeprecated - Success -- Performing Test CXX_FLAG_WORKS__fdiagnostics_colorEauto -- Performing Test CXX_FLAG_WORKS__fdiagnostics_colorEauto - Success -- Performing Test CXX_FLAG_WORKS__Wheader_hygiene -- Performing Test CXX_FLAG_WORKS__Wheader_hygiene - Failed -- NOT adding -Wheader-hygiene to CXX_FLAGS - unsupported flag -- Performing Test CXX_FLAG_WORKS__Wno_overloaded_virtual -- Performing Test CXX_FLAG_WORKS__Wno_overloaded_virtual - Success -- Performing Test SUPPORT_STD_CXX17 -- Performing Test SUPPORT_STD_CXX17 - Success -- Looking for C++ include pthread.h -- Looking for C++ include pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
Boost 1.64.0 found. Found Boost components: random CMake Error in /home/rummler/Software/cmake/cmake-3.9.0-install/share/cmake-3.9/Modules/FindBoost.cmake: cmake_policy PUSH without matching POP Call Stack (most recent call first): CMakeLists.txt:212 (FIND_PACKAGE)CMake Warning at cmake/clang-cpp-checks.cmake:20 (MESSAGE): Git hooks are not installed - consider installing them via /home/rummler/Software/allpix-squared/etc/git-hooks/install-hooks.sh Call Stack (most recent call first): CMakeLists.txt:283 (INCLUDE)
-- Found /usr/bin/clang-format-10 version 10, adding formatting targets -- Could NOT check for clang-tidy, wrong compiler: GNU -- Building module ON - CSADigitizer -- Building module ON - CapacitiveTransfer -- Building module ON - CorryvreckanWriter -- Building module OFF - DatabaseWriter -- Building module ON - DefaultDigitizer -- Building module ON - DepositionGeant4 -- The C compiler identification is GNU 9.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found suitable version "2.2.9", minimum required is "2.2.9") -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found XercesC: /usr/lib/libxerces-c.so (found suitable version "2.8.0", minimum required is "2.8.0") -- Building module ON - DepositionPointCharge -- Building module ON - DepositionReader -- Building module ON - DetectorHistogrammer -- Building module ON - DopingProfileReader -- Building module ON - Dummy -- Building module ON - ElectricFieldReader -- Building module ON - GDMLOutputWriter -- Building module ON - GenericPropagation -- Building module ON - GeometryBuilderGeant4 -- Building module ON - InducedTransfer -- Building module OFF - LCIOWriter -- Building module ON - MagneticFieldReader -- Building module ON - ProjectionPropagation -- Building module ON - PulseTransfer -- Building module ON - RCEWriter -- Building module ON - ROOTObjectReader -- Building module ON - ROOTObjectWriter -- Building module ON - SimpleTransfer -- Building module ON - TextWriter -- Building module ON - TransientPropagation -- Building module ON - VisualizationGeant4 -- Building module ON - WeightingPotentialReader -- Building Geant4 Interface -- Unit tests: 17 examples -- Unit tests: 63 module functionality tests -- Unit tests: 5 performance tests -- Unit tests: 40 framework core functionality tests -- Configuring incomplete, errors occurred! See also "/home/rummler/Software/allpix-squared/build/CMakeFiles/CMakeOutput.log". See also "/home/rummler/Software/allpix-squared/build/CMakeFiles/CMakeError.log".