William.Hatheway
Active member
Full WRF and WPS Installation Example (GNU)
Follow the below instructions to install WRF and WPS with a GNU compiler. Alternatively, use this script for the library installations, but pay attention to the notes in the script. From a terminal window, create the following new directory: mkdir wrf_dependencies Set the following...
forum.mmm.ucar.edu
Hi WRF/WPS team,
I’ve been using the “Full WRF and WPS Installation Example (GNU)” guide (Jan 10, 2023) and ran into a build issue that affects current GNU/Linux environments: the dependency step for jasper-1.900.1 no longer builds successfully with modern GCC defaults unless additional compiler flags are provided.
What happens
With a modern GCC toolchain, jasper-1.900.1 fails to compile (notably in the jpc sources such as jpc_qmfb.c) due to incompatible pointer-type diagnostics being treated as fatal, and it may also stop earlier on implicit function declaration diagnostics. When Jasper fails, the Jasper library is never installed, which later causes WPS to fail when linking GRIB2 support (e.g., -ljasper not found).
What fixed it
For Jasper 1.900.1, the following flags were required to complete the build:
-Wno-incompatible-pointer-types
-Wno-error=incompatible-pointer-types
-Wno-error=implicit-function-declaration
Applying these flags (for the Jasper build step) allowed libjasper to be produced and installed, and WPS then proceeded to build normally.
Request
Could the GNU install example be updated to reflect this reality on modern GCC-based systems? Concretely:
Add a note that jasper-1.900.1 may require additional GCC flags on newer distributions, and list the required flags above?