Failed to compile OCSSW on Debian 11

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
jvaldezch
Posts: 27
Joined: Fri Aug 24, 2018 2:52 pm America/New_York
Answers: 0

Failed to compile OCSSW on Debian 11

by jvaldezch » Thu Apr 21, 2022 1:16 pm America/New_York

Hi,

So far I have been no able to compile OCSSW tools from source on Debian 11 (Buster).

Code: Select all

sudo apt install libjansson-dev libnetcf-dev libnetcdf-c++4

export CC=gcc-10
export CXX=g++-10
export FC=gfortran-10
export OCSSWROOT=/data/apps/seadas-8.2.0/ocssw
export OCSSW_DEBUG=1
source $OCSSWROOT/OCSSW_bash.env

cd $OCSSWROOT
git clone https://oceandata.sci.gsfc.nasa.gov/ocssw/ocssw-src.git
cd $OCSSWROOT/ocssw-src
mkdir build
cd build
cmake ..

But I got this error:

Code: Select all

-- Failed to find NetCDF interface for CXX
CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find NetCDF (missing: NETCDF_HAS_INTERFACES)
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
  oel_util/cmake/Modules/FindNetCDF.cmake:118 (find_package_handle_standard_args)
  oel_hdf4/libbin/CMakeLists.txt:7 (find_package)


-- Configuring incomplete, errors occurred!
The error is very similar (I guess) when I try to run a binary using

Code: Select all

./install_ocssw --bin --install_dir $seadas_dir --tag V2022.0
In this case when I try to run ./l2gen I got this error:

Code: Select all

/data/apps/seadas-8.2.0/ocssw/bin/./l2gen: error while loading shared libraries: libnetcdff.so.7: cannot open shared object file: No such file or directory
Thanks for the help.

Tags:

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Re: Failed to compile OCSSW on Debian 11

by gnwiii » Tue Apr 26, 2022 2:25 pm America/New_York

You probably need to add `--opt` to get

Code: Select all

./install_ocssw --bin --opt --install_dir $seadas_dir --tag V2022.0 ...
and some sensors to your command line. You should end up with

Code: Select all

$OCSSWROOT/opt/lib/libnetcdff.so.7
.

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 258
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Been thanked: 2 times

Re: Failed to compile OCSSW on Debian 11

by OB SeaDAS - dshea » Thu May 05, 2022 11:35 am America/New_York

The directions to compile the source code are here:

https://seadas.gsfc.nasa.gov/build_ocssw/

It looks like you never built the $OCSSWROOT/opt/src which is step 6.

don

Post Reply