Skip to content

Instantly share code, notes, and snippets.

@karlyeurl
Last active May 12, 2023 08:31
Show Gist options
  • Save karlyeurl/97a28c1015fbac510031b1695ede97e8 to your computer and use it in GitHub Desktop.
Save karlyeurl/97a28c1015fbac510031b1695ede97e8 to your computer and use it in GitHub Desktop.
wgrib2 on debian - aarch64 (RPI4)

install deps:

apt-get install -y build-essential libaec-dev zlib1g-dev libcurl4-openssl-dev libboost-dev curl wget zip unzip bzip2 gfortran gcc g++ m4 automake

edit makefile:

export CC=gcc
export FC=gfortran
#USE_NETCDF3=0
#USE_NETCDF4=1
#USE_JASPER=1
#USE_OPENJPEG=0
AARCH_specific_flag=--build=aarch64-unknown-linux-gnu

Then to the line 971 (starting with cd ${jasperdir} add {$AARCH_specific_flag} right after the ./configure Do the same for netcdf and libproj and you're good to go

build:

run make it will complain and ask to wget things, such as:

wget https://downloads.unidata.ucar.edu/netcdf-c/4.9.0/netcdf-c-4.9.0.tar.gz
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.gz

hdf5 will take ages to test while compiling, that's just how it is.

the wgrib2 binary will sit in ./wgrib2/wgrib2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment