JeffersonLab / build_scripts

scripts to manage builds of GlueX software
4 stars 2 forks source link

alma9 troubles with version set 5.19.0 - cernlib fails & ROOT cannot find python #267

Open nsjarvis opened 2 months ago

nsjarvis commented 2 months ago

This is a bit weird as it was ok with the older version set 5.15.0

./Install_cernlib
====================
CERNLIB installation
====================
Checking for Fortran Compiler... gfortran
======================================
Configuration summary
---------------------
Architecture is: x86_64
Fortran compiler used: gfortran
CERN_LEVEL is: 2005
======================================
installing cernlib libraries
gmake[2]: Entering directory '/home/gluex/gluex_top/cernlib/2005/build'
making Makefiles in /scripts...
gmake[2]: Leaving directory '/home/gluex/gluex_top/cernlib/2005/build'
testing cernlib libraries
installing cernlib executables
installing the old patchy 4 executables
patching file make_patchy
patching file p4boot.sh0
patching file rceta.sh
installing the patchy 5 executables
gmake[2]: Entering directory '/home/gluex/gluex_top/cernlib/2005/build'
making Makefiles in /patchy...
gmake[2]: Leaving directory '/home/gluex/gluex_top/cernlib/2005/build'
installing cernlib includes
fixing known installation problems
Complete cernlib installation finished
Check the log files in the build/log directory
date > .build_done
grep -v src/packlib/kuip/code_motif/kmdial.c 2005/build/log/make.???? | grep -v "sprintf (cval, " | grep Error ; if [ $?
 -eq 0 ] ; then exit 1 ; else exit 0 ; fi
Error: pawX11 not executable
gmake[4]: *** [Makefile:343: pawX11] Error 1
gmake[3]: *** [Makefile:483: install.bin] Error 2
gmake[2]: *** [Makefile:500: install.bin] Error 2
Error: zftp not executable
gmake[5]: *** [Makefile:481: zftp] Error 1
gmake[4]: *** [Makefile:335: install.bin] Error 2
gmake[3]: *** [Makefile:473: install.bin] Error 2
gmake[2]: *** [Makefile:512: install.bin] Error 2
make[1]: *** [/home/gluex/gluex_top/build_scripts/Makefile_cernlib_Vogt:69: .error_check_done] Error 1
make[1]: Leaving directory '/home/gluex/gluex_top/cernlib'
make: *** [/home/gluex/gluex_top/build_scripts/Makefile_all:64: cernlib_make] Error 2
pass 1 failed, exiting
gluex_install.sh info: done

install_log_5_19_0.txt

nsjarvis commented 2 months ago

Also adding some old news here for the knowledgebase. We have python3.11, it arrived with alma9. Root does not like it.

mkdir -p root-6.24.04/build_dir
cd root-6.24.04/build_dir ; cmake3 .. -DCMAKE_INSTALL_PREFIX=..  -Dgdml=ON -Droofit=ON -Dmysql=OFF -Ddavix=OFF -Dbuiltin_tbb=ON -DCMAKE_CXX_STANDARD=11
-- The C compiler identification is GNU 11.4.1
-- The CXX compiler identification is GNU 11.4.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- 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
-- Found Git: /usr/bin/git (found version "2.43.5") 
-- Looking for Python
-- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Development NumPy Development.Module Development.Embed) (found version "3.11.7")
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Python2_INCLUDE_DIRS Python2_LIBRARIES Python2_NumPy_INCLUDE_DIRS Interpreter Development NumPy Development.Module Development.Embed) 
    Reason given by package: 
        Interpreter: Wrong major version for the interpreter "/bin/python"

CMake Warning at cmake/modules/SearchRootCoreDeps.cmake:222 (message):
  No supported Python 2 or 3 development packages were found; PyROOT will not
  be built.
Call Stack (most recent call first):
  CMakeLists.txt:129 (include)
nsjarvis commented 2 months ago

This is after disabling 3.11

-- Looking for Python
-- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Development NumPy Development.Module Development.Embed) (found v
ersion "3.9.18")
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Python2_INCLUDE_DIRS Python2_LIBRARIES Python2_NumPy_INCLUDE_DIRS Interpreter Develo
pment NumPy Development.Module Development.Embed) 
    Reason given by package: 
        Interpreter: Wrong major version for the interpreter "/bin/python"

CMake Warning at cmake/modules/SearchRootCoreDeps.cmake:222 (message):
  No supported Python 2 or 3 development packages were found; PyROOT will not
  be built.
Call Stack (most recent call first):
  CMakeLists.txt:129 (include)
nsjarvis commented 2 months ago

Update August 19

I made another attempt at this. This is what I did:

  1. updated gluex_install with git pull
  2. ran the prerequisites script ./gluex_prereqs_almalinux_9.sh. This downloaded many things and concluded with ./gluex_prereqs_almalinux_9.sh: line 22: /gluex_install/gluex_prereqs_postprocessor.sh: No such file or directory
  3. made a new directory and ran the installer gluex_install/gluex_install.sh -t aug18
    This ended with
    Could NOT find Python (missing: Python_EXECUTABLE Python_INCLUDE_DIRS
    Python_LIBRARIES Interpreter Development Development.Module
    Development.Embed)
    Call Stack (most recent call first):
    /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
    /usr/share/cmake/Modules/FindPython.cmake:622 (find_package_handle_standard_args)
    CMakeLists.txt:13 (find_package)

The log file is too big to attach here. It is in /w/halld-scshelf2101/njarvis/alma9/aug18_install_log.txt

aaust commented 1 month ago

For some reason, the necessary packages (e.g. python-devel) were installed for python3.9 but ROOT is trying to use python3.11. I make these additional 2 steps to compile the full stack with the correct dependencies for python3.9 on gluon02:

  1. In build_scripts, force root to use python3.9 which is linked to the default /usr/bin/python:

    diff --git a/Makefile_root_6_inc b/Makefile_root_6_inc
    index 287ff70..582c2cd 100644
    --- a/Makefile_root_6_inc
    +++ b/Makefile_root_6_inc
    @@ -70,7 +70,7 @@ $(ROOTDIR)/.clone_done:
    
    $(ROOTDIR)/.cmake_done: $(SOURCE_TARGET)
        mkdir -p $(BUILD_DIR)
    -       cd $(BUILD_DIR) ; $(CMAKE) .. -DCMAKE_INSTALL_PREFIX=.. $(CMAKE_VERBOSE_OPTION) -Dgdml=ON -Droofit=ON -Dmysql=OFF -Ddavix=OFF -Dbuiltin_tbb=ON -DCMAKE_CXX_STANDARD=11
    +       cd $(BUILD_DIR) ; $(CMAKE) .. -DCMAKE_INSTALL_PREFIX=.. $(CMAKE_VERBOSE_OPTION) -Dgdml=ON -Droofit=ON -Dmysql=OFF -Ddavix=OFF -Dbuiltin_tbb=ON -DCMAKE_CXX_STANDARD=11 -DPYTHON_EXECUTABLE=/usr/bin/python
        date > $@
  2. In diracxx’s CMakeLists.txt, force it to use python3.9:
    13c13
    <   find_package(Python REQUIRED COMPONENTS Interpreter Development)
    ---
    >   find_package(Python 3.9 EXACT COMPONENTS Interpreter Development)

I don't know why the prerequisite packages were not installed for python3.11 instead.