Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code
-
- Posts: 16
- Joined: Tue Feb 07, 2023 11:19 pm America/New_York
Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code
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)
Filters:
-
- Subject Matter Expert
- Posts: 110
- Joined: Fri Jun 03, 2022 10:54 am America/New_York
- Location: NASA GSFC
- Been thanked: 8 times
- Contact:
Re: Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code
Sorry for the delayed response. Do you still have the same problem?
-
- Posts: 16
- Joined: Tue Feb 07, 2023 11:19 pm America/New_York
Re: Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code
Yes. I still face the same issue.
-
- Subject Matter Expert
- Posts: 271
- Joined: Thu Mar 05, 2009 10:25 am America/New_York
- Been thanked: 2 times
Re: Error in building OCSSW binaries; SeaDAS 8.2.0 Build from Source Code
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
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