Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upper case package issues with stack-stack-1.7.0 #1066

Closed
mcallic2 opened this issue Apr 10, 2024 · 6 comments
Closed

upper case package issues with stack-stack-1.7.0 #1066

mcallic2 opened this issue Apr 10, 2024 · 6 comments
Labels
bug Something is not working INFRA JEDI Infrastructure NOAA-EMC OAR-EPIC NOAA Oceanic and Atmospheric Research and Earth Prediction Innovation Center

Comments

@mcallic2
Copy link

Describe the bug
cmake function find_package essentially breaks due to upper case variables located in spack-stack/1.7.0

the warning message looks like this:

-- Found PNG: /mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.7.0/envs/ue-intel/install/intel/2021.5.0/libpng-1.6.37-lpk5hek/lib64/libpng.so (found version "1.6.37") 
CMake Warning (dev) at CMakeLists.txt:27 (find_package):
  Policy CMP0144 is not set: find_package uses upper-case <PACKAGENAME>_ROOT
  variables.  Run "cmake --help-policy CMP0144" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Environment variable JASPER_ROOT is set to:

    /mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.7.0/envs/ue-intel/install/intel/2021.5.0/jasper-2.0.32-lydwve7

  For compatibility, find_package is ignoring the variable, but code in a
  .cmake module might still use it.
This warning is for project developers.  Use -Wno-dev to suppress it.

To Reproduce
git clone https://github.com/NOAA-GFDL/GFDL-VortexTracker.git
cd GFDL-VortexTracker
mkdir build && cd build
module use /mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.7.0/envs/ue-intel/install/modulefiles/Core/
module load stack-intel
module load cmake/3.28.1
module load szip
module load hdf5
module load netcdf
module load jasper
module load zlib-ng
module load libpng
module load g2
module load g2tmpl
module load bacio/
module load w3emc
module load w3nco
cmake .. --> warnings appear
make --> fails due to libraries not loading

Expected behavior
expected behavior is that the cmake successfully builds, compiles, and creates executables

System:
Jet and Hera, the steps on hera differ slightly but the results are the same

Additional context
these issues do not arise when using /mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core/

@mcallic2 mcallic2 added the bug Something is not working label Apr 10, 2024
@climbfuji
Copy link
Collaborator

This is fortunately only a warning, but it is incredibly annoying. The reason you are seeing this now is that we have reverted a modification that we made to the spack develop code - previously we had used the case sensitive package names, but spack develop has always been using uppercase for the _ROOT environment variables.

We've raised this with the spack developers (@AlexanderRichert-NOAA did) because it is apparently not the right thing to do. Hopefully they agree, or we put back in our customization in 1.8.0 that we used up to 1.6.0 (i.e. 1.7.0 will be the only release with this issue).

@mcallic2
Copy link
Author

mcallic2 commented Apr 10, 2024

@climbfuji All good, @AlexanderRichert-NOAA suggested that I open this issue.
I do want to mention, that although what results due to the uppercase labeling, is only a warning, it does cause the build system to fail. With this being said, I am happy to use the other spack environments

@mcallic2 mcallic2 reopened this Apr 10, 2024
@climbfuji
Copy link
Collaborator

Thanks for the additional info. That must be something hardcoded like a hint package_ROOT in some CMakeLists.txt. If you plan to skip 1.7.0, then better not change your build. Sorry for the inconvenience, we shouldn't have adoped this change for 1.7.0.

I created this issue in spack develop spack/spack#43569 and also mentioned it in the their slack channel (https://spackpm.slack.com/archives/C5W7NKZJT/p1712752096643619).

@mcallic2
Copy link
Author

It's my pleasure, thanks so much for the speedy response!
Let me know if I can help with anything else and/or if you need anything from me

@climbfuji climbfuji added INFRA JEDI Infrastructure NOAA-EMC OAR-EPIC NOAA Oceanic and Atmospheric Research and Earth Prediction Innovation Center labels Apr 10, 2024
@climbfuji
Copy link
Collaborator

I've changed my mind. I would like to get this change reverted for 1.7.0 and fix the existing installations. There's a PR for this JCSDA/spack#421 - still need the green light from my spack-stack colleagues on this, though.

@climbfuji
Copy link
Collaborator

Closed via #1068

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working INFRA JEDI Infrastructure NOAA-EMC OAR-EPIC NOAA Oceanic and Atmospheric Research and Earth Prediction Innovation Center
Projects
None yet
Development

No branches or pull requests

2 participants