Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code
Posted: 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)
'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)