Page 1 of 1

make command error when building ocssw binaries

Posted: Tue Jun 30, 2020 4:32 am America/New_York
by mcanto
Hi,
I have successfully built the third party libraries (using ./BuildIt.py). However, when building the binaries, I get the error:

In file included from /export/home/l-p/mcanto/ocssw/ocssw-src/oel_hdf4/libnav/get_zenaz.c:3:0:
/export/home/l-p/mcanto/ocssw/opt/include/proj_api.h:37:2: error: #error 'To use the proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
#error 'To use the proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
  ^
make[2]: *** [oel_hdf4/libnav/CMakeFiles/nav.dir/get_zenaz.c.o] Error 1
make[1]: *** [oel_hdf4/libnav/CMakeFiles/nav.dir/all] Error 2
make: *** [all] Error 2


Has someone encountered this problem and knows how to resolve it? Would very much appreciate any ideas! Complete make command log is attached.

Thank you in advance!

Tess
attachment 1

make command error when building ocssw binaries

Posted: Tue Jun 30, 2020 7:50 am America/New_York
by gnwiii
From the log, you seem to running the "make" command as root.   It is not good practice to do complex builds and installs as "root": 1) an error can do widespread damage to the system, 2) root's environment is often different from that of a regular user.   On my system, $OCSSWROOT/opt/include/proj_api.h has: #define PJ_VERSION 492, which matches the archive version: $OCSSWROOT/opt/src/proj4/proj.4-4.9.2.tar.gz.   It may be the NASA folks are in the process of preparing a new release so you ended up with an "under construction" version.

make command error when building ocssw binaries

Posted: Tue Jun 30, 2020 7:34 pm America/New_York
by mcanto
Thanks for the reply, George.
I am working inside a singularity module on a CentOS 7 dedicated for SeaDAS processing - no one else is using it but me. I remember previously that I had a write permission issue, hence the IT guy helping me suggested to invoke CentOS7 image inside the container as root. That build was successful until I had to do this current compilation/build.
I have proj-7.0.0 instead of 492 - you might be correct then about the "under construction" version :sad:

make command error when building ocssw binaries

Posted: Tue Jun 30, 2020 11:12 pm America/New_York
by OB SeaDAS - dshea
How did you get the lib3 source files (ocssw/opt/src)? 

When using the SeaDAS 7.5.3 GUI or the install_ocssw.py script you will get proj4 version 4.9.2.  It is true that our latest in-house development code is using proj version 7.0.0, but it is strange that you have that version using install_ocssw.py or the GUI.  Proj 7.0.0 has a few changes to the API which is the errors you are seeing.

don

make command error when building ocssw binaries

Posted: Wed Jul 01, 2020 8:09 pm America/New_York
by lmckinna
Don - I've been working with Tess to get ocssw built on an old CentOS machine. Looks like I shared the wrong version of opt/src. I think we're getting closer to this building properly now. I will contact you directly with further detail.

Cheers,
Lachlan