Hello,
I am currently working with WRF version 4.4 and WPS version 4.4 on an Ubuntu 22.04.3 LTS system running on an x86_64 architecture.
The system has an Intel Xeon CPU with 72 cores available and 187 GB of RAM. I have set up a Conda environment named wrf_gcc11_env with GCC 11.4.0 and GFortran 11.4.0. NetCDF libraries for both C and Fortran are installed inside this Conda environment located at /..../miniconda3/envs/wrf_gcc11_env. Other necessary libraries such as libjpeg, libpng, jasper, and zlib are also installed through Conda and verified to be present along with their header files. Although OpenMPI is installed, I am currently building WPS in serial mode.
During the build process, the geogrid.exe and metgrid.exe components compile and link successfully without any errors. However, the compilation of ungrib.exe fails at the linker stage with errors related to undefined references, particularly referencing the function jpc_decode. These errors suggest conflicts or version mismatches between libjasper and libjpeg in the Conda environment. I have observed warnings indicating that libjpeg.so.9, which is required by libjasper.so, may conflict with libjpeg.so.8. Despite multiple attempts to address this by setting environment variables and patching configure.wps to ensure the proper order of library linking, the linker errors for ungrib.exe persist. I have manually checked that the necessary libraries and headers exist in the Conda environment directories and that the build is using the Conda gfortran compiler. I have also ensured that ./clean -a and ./configure steps are performed fresh before rebuilding.
So far, I have tried verifying and correcting the NetCDF and other library paths, modifying configure.wps for the compression libraries and includes, and making sure environment variables such as NETCDF, JASPERLIB, JASPERINC, LD_LIBRARY_PATH, and PATH point correctly to the Conda environment. I have run the build inside a screen session to avoid connection issues and checked for mismatched libjpeg versions, attempting to align them using Conda.
I am reaching out to see if anyone else has encountered similar linker errors with ungrib.exe involving libjasper and libjpeg conflicts. I would appreciate guidance on best practices for resolving these version conflicts without having to reinstall system libraries. Additionally, I am interested in any known workarounds or patches for WPS 4.4 that address linker issues with ungrib.exe in Conda-managed environments. If building g2clib or jasper from source outside Conda might help, I would welcome any recommendations on versions or approaches.
Also, compile.log is enclosed (I have tried at least 50 compilations).
Thank you very much for your help!
I am currently working with WRF version 4.4 and WPS version 4.4 on an Ubuntu 22.04.3 LTS system running on an x86_64 architecture.
The system has an Intel Xeon CPU with 72 cores available and 187 GB of RAM. I have set up a Conda environment named wrf_gcc11_env with GCC 11.4.0 and GFortran 11.4.0. NetCDF libraries for both C and Fortran are installed inside this Conda environment located at /..../miniconda3/envs/wrf_gcc11_env. Other necessary libraries such as libjpeg, libpng, jasper, and zlib are also installed through Conda and verified to be present along with their header files. Although OpenMPI is installed, I am currently building WPS in serial mode.
During the build process, the geogrid.exe and metgrid.exe components compile and link successfully without any errors. However, the compilation of ungrib.exe fails at the linker stage with errors related to undefined references, particularly referencing the function jpc_decode. These errors suggest conflicts or version mismatches between libjasper and libjpeg in the Conda environment. I have observed warnings indicating that libjpeg.so.9, which is required by libjasper.so, may conflict with libjpeg.so.8. Despite multiple attempts to address this by setting environment variables and patching configure.wps to ensure the proper order of library linking, the linker errors for ungrib.exe persist. I have manually checked that the necessary libraries and headers exist in the Conda environment directories and that the build is using the Conda gfortran compiler. I have also ensured that ./clean -a and ./configure steps are performed fresh before rebuilding.
So far, I have tried verifying and correcting the NetCDF and other library paths, modifying configure.wps for the compression libraries and includes, and making sure environment variables such as NETCDF, JASPERLIB, JASPERINC, LD_LIBRARY_PATH, and PATH point correctly to the Conda environment. I have run the build inside a screen session to avoid connection issues and checked for mismatched libjpeg versions, attempting to align them using Conda.
I am reaching out to see if anyone else has encountered similar linker errors with ungrib.exe involving libjasper and libjpeg conflicts. I would appreciate guidance on best practices for resolving these version conflicts without having to reinstall system libraries. Additionally, I am interested in any known workarounds or patches for WPS 4.4 that address linker issues with ungrib.exe in Conda-managed environments. If building g2clib or jasper from source outside Conda might help, I would welcome any recommendations on versions or approaches.
Also, compile.log is enclosed (I have tried at least 50 compilations).
Thank you very much for your help!