Page 1 of 1

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

Posted: Wed Mar 01, 2023 4:56 am America/New_York
by reema_mathew
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)

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

Posted: Fri Mar 17, 2023 12:05 pm America/New_York
by OB General Science - guoqingw
Sorry for the delayed response. Do you still have the same problem?

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

Posted: Fri Mar 17, 2023 2:20 pm America/New_York
by reema_mathew
Yes. I still face the same issue.

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

Posted: Fri Mar 17, 2023 6:28 pm America/New_York
by OB SeaDAS - dshea
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