rest-for-physics / framework

The main project containing the core C++ classes defining framework behaviour and primordial analysis and helper tools. It centralises all other rest-for-physics repositories through submodules.
GNU General Public License v3.0
19 stars 11 forks source link

Adding LCG to thisREST.sh if LCG environment is identified #532

Closed jgalan closed 4 months ago

jgalan commented 4 months ago

jgalan Ok: 7 Powered by Pull Request Badge

The following PR adds some code inside thisREST.cmake to identify if we are using LCG environment. It will do so in case LCG_VERSION is found. And if it is found it will use the path defined by C_INCLUDE_PATH to load the environment inside thisREST.sh.

jgalan commented 4 months ago

Besides the comment I have left on the OS test, I would also try not to be too specific about the LCG release we currently use (that might change in the future). But otherwise the code looks good.

The point here is to identify if the user has loaded LCG_104. I don't really know how to do this, perhaps there is a good way? I just check that the cmake command path is coming from /cvmfs/, lcg and x86_64-el9-gcc11. If we are able to identify which script was sourced in the environment, then probably we wold find a more generic and clean way to do this.

jgalan commented 4 months ago

Apparently there is a LGC_VERSION defined as system variable:

[jgalan@naf-iaxo21 rest-framework]$ env | grep LCG_VERSION
LCG_VERSION=104

However, not sure about how to catch the architecture, perhaps just pick up the string from a random variable?

Just find LGC_104 and get the string between that and include?

C_INCLUDE_PATH=/cvmfs/sft.cern.ch/lcg/views/LCG_104/x86_64-el9-gcc11-opt/include
LouisHelary commented 4 months ago

jgalan Ok: 7 Powered by Pull Request Badge

The following PR adds some code inside thisREST.cmake to identify if we are using /cvmfs/sft.cern.ch/lcg/views/LCG_104/x86_64-el9-gcc11-opt/setup.sh. In case it is found, thisREST.sh will load first that script.

I have observed the following problem when using /cvmfs/.../lcg../ installation.

Screenshot 2024-07-13 at 20 50 11

I observe the same error, but only if I dont compile a release. If I use the script ./install_rest_release_LCG.sh v2.4.3 instead I can't reproduce the problem. Do you have older compilation logs available?

Install the project... -- Install configuration: "" CMake Warning at cmake_uninstall.cmake:2 (message): Cannot find install manifest: /tmp/cronjob-rest-release-v2.4.3/build/install_manifest.txt

-- Installing: /nfs/dust/iaxo/user/lhelary/LCG_rest/test/install/lib/libRestFramework.so

jgalan commented 4 months ago

Hi @lobis , there are issues with the certificate when downloading from sultan. Certificate validation may be set as a ROOT configuration parameter. Perhaps it can be changed in the docker image?

https://root-forum.cern.ch/t/error-in-davixopen-can-not-open-file-with-davix/19355

lobis commented 4 months ago

Hi @lobis , there are issues with the certificate when downloading from sultan. Certificate validation may be set as a ROOT configuration parameter. Perhaps it can be changed in the docker image?

https://root-forum.cern.ch/t/error-in-davixopen-can-not-open-file-with-davix/19355

I think this is just an issue with the web server, it shouldn't take long to fix (hopefully) on the server's end. We are aware of the issue.

jgalan commented 4 months ago

Great, then I think this PR is ready to be merged.