Error Reported When Compiling the g2 Module
Symptom
During the NCEPLIBS compilation and installation, the g2 module reports the following error:

Key Process and Cause Analysis
None
Conclusion and Solution
Install and deploy JPEG and JASPER.
- Install JPEG and import the environment variables.
cd /path/to/JPEG git clone git://github.com/LuaDist/libjpeg.git cd libjpeg/ git branch git checkout 6c0fcb8 ./configure --prefix=/path/to/JPEG make make install export PATH=/path/to/JPEG/bin:$PATH export LD_LIBRARY_PATH=/path/to/JPEG/lib:$LD_LIBRARY_PATH
- Install JASPER and import the environment variables.
cd /path/to/JASPER wget https://www.ece.uvic.ca/~frodo/jasper/software/jasper-1.900.2.tar.gz tar -zxvf jasper-1.900.2.tar.gz cd jasper-1.900.2/ ./configure --prefix=/path/to/JASPER make all install export PATH=/path/to/JASPER/bin:$PATH export LD_LIBRARY_PATH=/path/to/JASPER/lib:$LD_LIBRARY_PATH
- Modify the /g2/src/g2-build/CMakeCache.txt file.
- Open the /g2/src/g2-build/CMakeCache.txt file.
vi /path/to/NCEPLIBS/NCEPLIBS-1.2.0/build/g2/src/g2-build/CMakeCache.txt
- Press i to enter the edit mode and add the JASPER and JPEG installation paths.
//Path to a file. JASPER_INCLUDE_DIR:PATH=/path/to/JASPER/include/ //Path to a library. JASPER_LIBRARY_DEBUG:FILEPATH=/path/to/JASPER/lib/ //Path to a library. JASPER_LIBRARY_RELEASE:FILEPATH=JASPER_LIBRARY_RELEASE-NOTFOUND //Path to a file. JPEG_INCLUDE_DIR:PATH=/path/to/JPEG/include //Path to a library. JPEG_LIBRARY_DEBUG:FILEPATH=/path/to/JPEG/lib //Path to a library. JPEG_LIBRARY_RELEASE:FILEPATH=JPEG_LIBRARY_RELEASE-NOTFOUND
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the /g2/src/g2-build/CMakeCache.txt file.
- Perform the compilation again.
make
Parent topic: Troubleshooting