FairRootGroup / FairSoft

Repository for installation routines of the external software required by FairRoot
GNU Lesser General Public License v3.0
16 stars 62 forks source link

Problems with centos7 installation #440

Closed EugeniaSpedicato closed 2 years ago

EugeniaSpedicato commented 2 years ago

Hi everyone,

I'm trying to install FairSoft on Centos7. Actually I'm using a docker centos7 image just to try and see what happens, but I've got some problems. May be some problems during the dependencies download step? Thank you for the help!

[root@5e59f3d23529 /]# git clone -b apr21_patches https://github.com/FairRootGroup/FairSoft
[...]
[root@5e59f3d23529 /]# FairSoft/legacy/setup-centos-7.sh
[...]
[root@5e59f3d23529 /]# cd FairSoft/
[root@5e59f3d23529 FairSoft]# mkdir build
[root@5e59f3d23529 FairSoft]# cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install FairSoftConfig.cmake
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- The Fortran compiler identification is GNU 4.8.5
-- 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
-- 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
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran - works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 - yes
-- Found Git: /usr/bin/git (found version "1.8.3.1") 
-- Found Patch: /usr/bin/patch  
-- Found UnixCommands: /usr/bin/bash  
--   
--   CXX STANDARD       C++17 (change with -DCMAKE_CXX_STANDARD=17)
--   
--   BUILD TYPE         RelWithDebInfo (change with -DCMAKE_BUILD_TYPE=...)
--   
--   PACKAGE SET        full (change with -DPACKAGE_SET=...)
--   
--   PACKAGE              VERSION         OPTION
--   boost                1.75.0          
--   clhep                2.4.4.0         
--   dds                  3.5.10          
--   faircmakemodules     0.2.0           
--   fairlogger           1.9.2           
--   fairmq               1.4.33          
--   flatbuffers          1.12.0          
--   fmt                  6.1.2           
--   geant3               3-8_fairsoft    
--   geant4               10.7.1          single-threaded (change with -DGEANT4MT=ON)
--   geant4_vmc           5-3             
--   hepmc                2.06.11         
--   odc                  0.18            
--   pythia6              428-alice1      
--   pythia8              8303            
--   root                 6.22.08         
--   vc                   1.4.1           
--   vgm                  4-8             
--   vmc                  1-0-p3          
--   zeromq               4.3.2           
--   
--   SOURCE CACHE       using upstream URLs (generate cache by building target 'source-cache' and pass via -DSOURCE_CACHE=...)
--   
--   INSTALL PREFIX     /FairSoft/install (change with -DCMAKE_INSTALL_PREFIX=...)
--   
--    -> export SIMPATH=/FairSoft/install
--   
-- Configuring done
-- Generating done
-- Build files have been written to: /FairSoft/build
[root@5e59f3d23529 FairSoft]# cd build
[root@5e59f3d23529 build]# make -j4
Scanning dependencies of target boost
Scanning dependencies of target zeromq
Scanning dependencies of target fmt
Scanning dependencies of target clhep
[  0%] Creating directories for 'boost'
[  0%] Creating directories for 'zeromq'
[  4%] Creating directories for 'clhep'
[  9%] Creating directories for 'fmt'
[  9%] Performing download step (download, verify and extract) for 'boost'
[  9%] Performing download step (git clone) for 'zeromq'
[  9%] Performing download step (download, verify and extract) for 'fmt'
[  9%] Performing download step (download, verify and extract) for 'clhep'
-- clhep download command succeeded.  See also /FairSoft/build/Log/clhep-download-*.log
[  9%] Performing move_dir step for 'clhep'
-- clhep move_dir command succeeded.  See also /FairSoft/build/Log/clhep-move_dir-*.log
[  9%] No update step for 'clhep'
[  9%] No patch step for 'clhep'
[  9%] Performing configure step for 'clhep'
CMake Error at /FairSoft/build/Stamp/clhep/clhep-configure-RelWithDebInfo.cmake:37 (message):
  Command failed: 1

   '/usr/bin/cmake3' '-DCLHEP_BUILD_CXXSTD=-std=c++17' '-GUnix Makefiles' '-C/FairSoft/build/tmp/clhep/clhep-cache-RelWithDebInfo.cmake' '/FairSoft/build/Source/clhep'

  See also

    /FairSoft/build/Log/clhep-configure.log

-- Log output is:
loading initial cache file /FairSoft/build/tmp/clhep/clhep-cache-RelWithDebInfo.cmake
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- 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
-- 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
-- libraries will be installed in /FairSoft/install/lib
CMake Error at cmake/Modules/ClhepVariables.cmake:238 (message):
  c++17 extension is not available for /usr/bin/c++
Call Stack (most recent call first):
  cmake/Modules/ClhepVariables.cmake:267 (_clhep_verify_cxx17)
  cmake/Modules/ClhepVariables.cmake:310 (_clhep_check_cxxstd)
  CMakeLists.txt:66 (clhep_set_compiler_flags)

-- Configuring incomplete, errors occurred!
See also "/FairSoft/build/Build/clhep/CMakeFiles/CMakeOutput.log".

CMake Error at /FairSoft/build/Stamp/clhep/clhep-configure-RelWithDebInfo.cmake:47 (message):
  Stopping after outputting logs.

make[2]: *** [Stamp/clhep/clhep-configure] Error 1
make[1]: *** [CMakeFiles/clhep.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
-- fmt download command succeeded.  See also /FairSoft/build/Log/fmt-download-*.log
[  9%] No patch step for 'fmt'
[  9%] No update step for 'fmt'
[  9%] Performing configure step for 'fmt'
CMake Error at /FairSoft/build/Stamp/fmt/fmt-configure-RelWithDebInfo.cmake:37 (message):
  Command failed: 1

   '/usr/bin/cmake3' '-DFMT_DOC=OFF' '-GUnix Makefiles' '-C/FairSoft/build/tmp/fmt/fmt-cache-RelWithDebInfo.cmake' '/FairSoft/build/Source/fmt'

  See also

    /FairSoft/build/Log/fmt-configure.log

-- Log output is:
loading initial cache file /FairSoft/build/tmp/fmt/fmt-cache-RelWithDebInfo.cmake
-- CMake version: 3.17.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working CXX compiler: /usr/bin/c++
CMake Error in /FairSoft/build/Build/fmt/CMakeFiles/CMakeTmp/CMakeLists.txt:
  Target "cmTC_00928" requires the language dialect "CXX17" (with compiler
  extensions), but CMake does not know the compile flags to use to enable it.

CMake Error at /usr/share/cmake3/Modules/CMakeTestCXXCompiler.cmake:37 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:47 (project)

-- Configuring incomplete, errors occurred!
See also "/FairSoft/build/Build/fmt/CMakeFiles/CMakeOutput.log".

CMake Error at /FairSoft/build/Stamp/fmt/fmt-configure-RelWithDebInfo.cmake:47 (message):
  Stopping after outputting logs.

make[2]: *** [Stamp/fmt/fmt-configure] Error 1
make[1]: *** [CMakeFiles/fmt.dir/all] Error 2
^Z
[1]+  Stopped                 make -j4
dennisklein commented 2 years ago

The system compiler of CentOS 7 (gcc 4.8.5) is too old for FairSoft apr21. Have a look at legacy/setup-centos-7.sh on how to install and use Redhat's devtoolset compilers on CentOS 7. Note, there are newer Devtoolsets than version 7, I recommend to use newest versions (10 or 11) if not constraint otherwise.

EugeniaSpedicato commented 2 years ago

Ok thank you so much!

dennisklein commented 2 years ago

Is this issue resolved?

EugeniaSpedicato commented 2 years ago

Yes thank you, actually when I changed from Docker to the real system where I had to install it (always Centos7) everything worked fine.