Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
reema_mathew
Posts: 11
Joined: Tue Feb 07, 2023 11:19 pm America/New_York
Answers: 0

Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code

by reema_mathew » Wed Mar 01, 2023 4:56 am America/New_York

I'm trying to build SeaDAS 8.2.0 from source code. All third party libraries are built successfully.

'build' directory is successfully created and command 'cmake ..' is also successfully executed.

While trying to build OCSSW binaries using the command 'make -j 20', I get the following output:

(truncated output)
...
[ 25%] Building C object oel_hdf4/liboli/CMakeFiles/oli.dir/wviifor.c.o
[ 25%] Building C object oel_hdf4/liboli/CMakeFiles/oli.dir/wviiinv.c.o
[ 25%] Linking C shared library liboli.so
[ 25%] Linking C executable l1agen_modis
[ 25%] Built target oli
[ 25%] Built target l1agen_modis
[ 25%] Linking CXX shared library libgenutils.so
/usr/bin/ld: CMakeFiles/genutils.dir/argpar-help.c.o:/home/reema/ocssw_src/oel_util/libgenutils/argpar.h:187: multiple definition of `argpar_program_name'; CMakeFiles/genutils.dir/argpar.c.o:/home/reema/ocssw_src/oel_util/libgenutils/argpar.h:187: first defined here
/usr/bin/ld: CMakeFiles/genutils.dir/argpar-help.c.o:/home/reema/ocssw_src/oel_util/libgenutils/argpar.h:190: multiple definition of `argpar_ostream'; CMakeFiles/genutils.dir/argpar.c.o:/home/reema/ocssw_src/oel_util/libgenutils/argpar.h:190: first defined here
/usr/bin/ld: CMakeFiles/genutils.dir/argpar-json.c.o:/home/reema/ocssw_src/oel_util/libgenutils/argpar.h:187: multiple definition of `argpar_program_name'; CMakeFiles/genutils.dir/argpar.c.o:/home/reema/ocssw_src/oel_util/libgenutils/argpar.h:187: first defined here
/usr/bin/ld: CMakeFiles/genutils.dir/argpar-json.c.o:/home/reema/ocssw_src/oel_util/libgenutils/argpar.h:190: multiple definition of `argpar_ostream'; CMakeFiles/genutils.dir/argpar.c.o:/home/reema/ocssw_src/oel_util/libgenutils/argpar.h:190: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [oel_util/libgenutils/CMakeFiles/genutils.dir/build.make:657: oel_util/libgenutils/libgenutils.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:1673: oel_util/libgenutils/CMakeFiles/genutils.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 25%] Linking CXX shared library libcgal_interp.so
[ 25%] Built target cgal_interp
make: *** [Makefile:146: all] Error 2


What might possibly be going wrong here? Is there any workaround?

(OS: Ubuntu 22.04
gcc/g++/gfortran: 11.3.0
cmake: 3.22.1)

Filters:

OB General Science - guoqingw
Subject Matter Expert
Subject Matter Expert
Posts: 79
Joined: Fri Jun 03, 2022 10:54 am America/New_York
Answers: 0
Location: NASA GSFC
Been thanked: 1 time
Contact:

Re: Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code

by OB General Science - guoqingw » Fri Mar 17, 2023 12:05 pm America/New_York

Sorry for the delayed response. Do you still have the same problem?

reema_mathew
Posts: 11
Joined: Tue Feb 07, 2023 11:19 pm America/New_York
Answers: 0

Re: Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code

by reema_mathew » Fri Mar 17, 2023 2:20 pm America/New_York

Yes. I still face the same issue.

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

Re: Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code

by OB SeaDAS - dshea » Fri Mar 17, 2023 6:28 pm America/New_York

with gcc11 you need some newer updates to the code. I have built opt/src and ocssw_src on ubuntu22.04 by installing tag T2023.5

install_ocssw -t T2023.5 --src
cd $OCSSWROOT
rm -rf build
mkdir build
cd build
cmake ..
make -j 20 install

Your other option would be to install gcc-9, g++-9 and gfortran-9. If you change the compiler then you will need to rebuild opr/src and ocssw_src

don

Post Reply