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

Unhelpful install instructions #306

Open
KingSupernova31 opened this issue Jan 8, 2025 · 1 comment
Open

Unhelpful install instructions #306

KingSupernova31 opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@KingSupernova31
Copy link

KingSupernova31 commented Jan 8, 2025

The README says to run cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=path/to/dependencies, but does not specify what dependencies are needed.

@edwardhartnett edwardhartnett added the documentation Improvements or additions to documentation label Jan 8, 2025
@webisu
Copy link
Collaborator

webisu commented Jan 10, 2025

Unfortunately installing the various libraries that wgrib2 needs is very system dependent.
I have only built wgrib2 on my Ubuntu system. I had to install software using github,
apt-get and synaptic. The following is from my notes.

--------------- to install iplib -------------------
Install openblas (ubuntu)
$ sudo apt-get install libopenblas-dev

rm -rf $HOME/ip
mkdir $HOME/ip
cd $HOME/ip
----download NCEPLIBS-ip from github (develop branch)
git clone "https://github.com/NOAA-EMC/NCEPLIBS-ip"
cd NCEPLIB-ip
edit CMakeLists.txt
change option(OPENMP "Use OpenMP threading" OFF)
to option(OPENMP "Use OpenMP threading" ON)
mkdir build
cd build
-----------install libaec --------------------
ubuntu: sudo apt install libaec-dev
edit CMakeLists.txt option(USE_AEC "Use AEC?" on)

-----------install openjpeg --------------------
sudo apt install libopenjp2-7-dev

----------install netcdf and hdf4-----
synaptic install libnetcdf-dev .. installs many packages
sudo apt install netcdf-bin * need ncdump to pass wgrib2 tests *


png
install libpng by
synaptic libpng-dev png v 1.6

--------- install g2c --------------
export g2c_DIR=/usr/local/NCEPLIBS-g2c/lib/cmake/g2c

cmake -DCMAKE_INSTALL_PREFIX=$HOME/ip ..
make

do not do "make -j(some integer)"

make test
(sudo) make install

----- Caution -----------------
If someone did a "root build", the ip build will be in /usr/local
This will over ride the "user build"!
So a user cannot install a newer version of ip!

After you have installed the library, Now to build wgrib2
need to get wgrib2

git clone [email protected]:NOAA-EMC/wgrib2.git
cd wgrib2
ex enable netcdf
edit CMakeLists.txt option(USE_NETCDF "Use NetCDF?" on)
enable AEC
edit CMakeLists.txt option(USE_AEC "Use AEC?" off)
enable openjpeg
edit CMakeLists.txt option(USE_OPENJPEG "Use NetCDF?" on)
enable ipolates
edit CMakeLists.txt option(USE_IPOLATES "Use Ipolates" on)
(comments may have changed)

mkdir build
cd build
export g2c_DIR=/usr/local/NCEPLIBS-g2c/lib/cmake/g2c
cmake ..
cmake .. -DCMAKE_BUILD_TYPE=Release
make
make test

parallel build
make -jN
make -jN test
(sudo) make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: No status
Development

No branches or pull requests

4 participants