Closed climbfuji closed 4 years ago
For reference, this is the error for Jasper (which hopefully doesn't need to be fixed):
CMake Error at src/appl/cmake_install.cmake:50 (file):
file RPATH_CHANGE could not write new RPATH:
/lustre/f2/pdata/esrl/gsd/ufs/modules/NCEPlibs-ufs-v1.0.0.beta01/intel-18.0.3.222/cray-mpich-7.4.0/lib64
to the file:
/lustre/f2/pdata/esrl/gsd/ufs/modules/NCEPlibs-ufs-v1.0.0.beta01/intel-18.0.3.222/cray-mpich-7.4.0/bin/jasper
No valid ELF RPATH or RUNPATH entry exists in the file;
Call Stack (most recent call first):
cmake_install.cmake:51 (include)
Update: if I only build the wgrib2 library on gaea, but not the executable, then the build works. But having wgrib2 to inspect the model input and output is useful.
This will be addressed by PRs https://github.com/NOAA-EMC/NCEPLIBS/pull/44 and https://github.com/NOAA-EMC/NCEPLIBS-external/pull/22 (and the submodule pointer updates associated with these PRs)
These PRs were merged.
On Cray systems, the default is to link static libraries. This causes two problems, (1) when building JasPER, and (2) when building wgrib2. Problem (1) can presumably be avoided with -DBUILD_JASPER=OFF (since the default OS version will do, need to check - for the actual error when linking see comment below), but (2) cannot.
The problem is that the final linker step for the wgrib2 executable wants to link against a static version of libintlc, which does not exist. This is the command that fails:
Repeating this step manually and adding
-Wl,-Bdynamic
before-lifcore
solves the problem.I don't have a solution yet for the build system, though. Probably need to patch wgrib2?