Help regarding Allpix squared installation


I was trying to install the allpix squared on my laptop and was following the manual for that. I installed all the pre-requisite libraries which include root and Geant4 and they both work fine as I ran a few examples. However, when I tried to configure via cmake in a separate directory ‘build’, I wasn’t able to get CMAKE_INSTALL_PREFIX and many of the by-default files mentioned in the manual. However, I have attached a picture of the files that I got in the build directory. Further when I tried to compile by typing make -j2, I got the following error:No targets specified and no makefile found. Stop.

Best regards,

Dear Shudhashil,

I don’t quite understand what you mean with “wasn’t able to get CMAKE_INSTALL_PREFIX and many of the by-default files”. In your posed information I am missing the most crucial part: what is the output you get on the terminal when running

$ cd build
$ cmake ..

? If something goes wrong there or is missing you will not get make files.


Hi Simon,

So I have attached a screenshot of the output I got on the terminal after running: ```
cd build cmake …

Regarding the default files like CMAKE_INSTALL_PREFIX that is mentioned in the manual, I didn’t get any of those files either after running cmake … in the build directory


Hi Shudhashil,

please copy the text rather than making screenshots - this would allow to search through it.

The problem you are facing is that CMake cannot find all files it requires from your ROOT installation. Are you sure you have a recent ROOT6 version installed and sourced before running CMake?

In any case, the cmake run you posted was not executed in an empty build/ directory, could you please remove all files from that directory, make source to source ROOT6 and Geant4 and then run cmake .. again?

If you then still have problems, please paste the full text here.

You don’t get the makefiles because CMake errors and does not write these files. CMake needs to pass without error.


Hi Simon,

Yes I have the recent root 6.14 version installed before hand and have been doing a few data analysis on it. So as you suggested I deleted the contents in the build directory and made source to source ROOT6 and Geant4 and then ran cmake …

Here’s what it is showing:

$ mkdir build

$ cd build

$ source ~/Desktop/MyPrograms/Geant4/bin/

$ source ~/Desktop/MyPrograms/mybuild/bin/

$ cmake ..
-- Git project directory is clean.
-- Building Allpix^2 version v1.3+576^g2927ef8c.
-- Building "RelWithDebInfo"
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.13") found components:  doxygen dot 
-- Found LATEX: /usr/bin/latex   
-- Found LaTeX compiler.
-- Found UnixCommands: /bin/bash  
-- Manual: adding 23 module descriptions
-- Manual: adding 7 example descriptions
-- The CXX compiler identification is GNU 7.4.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__Werror
-- Performing Test CXX_FLAG_WORKS__Werror - 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  
CMake Warning at cmake/clang-cpp-checks.cmake:8 (MESSAGE):
  Git hooks are not installed - consider installing them via
Call Stack (most recent call first):
  CMakeLists.txt:159 (INCLUDE)

-- Could NOT find clang-format
-- Could NOT check for clang-tidy, wrong compiler: GNU
CMake Warning at src/objects/CMakeLists.txt:11 (MESSAGE):
  Cannot find ROOT macros, including generic file as fallback.

CMake Error at /home/bharthua/Desktop/MyPrograms/mybuild/ROOTUseFile.cmake:2 (include):
  include could not find load file:

Call Stack (most recent call first):
  src/objects/CMakeLists.txt:12 (INCLUDE)

CMake Error at src/objects/CMakeLists.txt:18 (ROOT_GENERATE_DICTIONARY):
  Unknown CMake command "ROOT_GENERATE_DICTIONARY".

-- Configuring incomplete, errors occurred!
See also "/home/local/bharthua/Desktop/MyPrograms/allpix-squared/build/CMakeFiles/CMakeOutput.log".

Could you let me know what the problem is?

Best regards,

Hi Shudhashil

according to your CMake output, something is still wrong with your ROOT installation:

It tries to take /home/bharthua/Desktop/MyPrograms/mybuild/ROOTUseFile.cmake to find /home/local/bharthua/Documents/MyPrograms/root-6.14.02/cmake/modules/RootNewMacros.cmake - which are two different locations.

Please make sure to correctly install ROOT6, because this seems to be the issue here. Make e.g. sure to call make && make install when compiling ROOT, and to source the program from the resulting installed location, not from your ROOT build folder.

Best regards,

1 Like