Error in building the science processing software used within OBPG

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
zengkai
Posts: 4
Joined: Thu Oct 06, 2022 3:39 am America/New_York
Answers: 0

Error in building the science processing software used within OBPG

by zengkai » Mon Oct 24, 2022 10:01 pm America/New_York

When I followed the steps on the website (https://seadas.gsfc.nasa.gov/build_ocssw/) to build the scientific processing code,
step 6:
"Build the third party libraries
. /BuildIt.py"
There is a problem:
"configure: error: couldn't find rpc headers
Unknown error encountered installing hdf4"

I have searched some solutions on Google but it doesn't work. Can anyone offer some help?
Thanks in advance,
Kai

Tags:

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Re: Error in building the science processing software used within OBPG

by gnwiii » Tue Oct 25, 2022 7:55 pm America/New_York

You don't mention your OS, so I can only offer general advice: use your system's package management tools to find the package that provides the rpc.h file. Over the years there have been changes to the package names. For linux, https://sourceware.org/pipermail/libc-announce/2020/000029.html mentions changes to the packaging of rpc.h and associated header files. As a result, google searches often provide obsolete advice.

zengkai
Posts: 4
Joined: Thu Oct 06, 2022 3:39 am America/New_York
Answers: 0

Re: Error in building the science processing software used within OBPG

by zengkai » Sat Oct 29, 2022 10:28 am America/New_York

Thank you for your advice. Sorry for not stating my OS. I am using the latest Ubuntu 22.04 LTS version. I am a novice linux user and this problem has not been solved yet. I found that the rpc.h file exists in the folder shown, but it doesn't seem to be retrieved.

$:ls /usr/include/tirpc/rpc
auth_des.h clnt_stat.h pmap_prot.h rpc_com.h svc_auth.h xdr.h
auth_gss.h des_crypt.h pmap_rmt.h rpcent.h svc_dg.h
auth.h des.h raw.h rpc.h svc.h
auth_unix.h key_prot.h rpcb_clnt.h rpc_msg.h svc_mt.h
clnt.h nettype.h rpcb_prot.h rpcsec_gss.h svc_soc.h
clnt_soc.h pmap_clnt.h rpcb_prot.x svc_auth_gss.h types.h

----------------------------------------------------
The full running information is as follows:
/home/zengkai/SeaDAS/ocssw/opt/src/hdf4/hdf-4.2.15/bin/missing: Unknown `--is-lightweight' option
Try `/home/zengkai/SeaDAS/ocssw/opt/src/hdf4/hdf-4.2.15/bin/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking shell variables initial values... done
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking if basename works... yes
checking if xargs works... yes
checking for config x86_64-unknown-linux-gnu... no
checking for config x86_64-unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-unknown... no
checking for config linux-gnu... found
gfortran: error: unrecognized command-line option '-V'
gfortran: fatal error: no input files
compilation terminated.
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking if Java JNI interface enabled... no
checking whether ln -s works... yes
checking for ar... ar
checking for bison... bison -y
checking for flex... flex
checking for diff... diff -w
checking for makeinfo... makeinfo
checking for neqn... neqn
checking for tbl... tbl
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.lt
config.lt: creating libtool
checking if we should install only statically linked executables... no
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for compress2 in -lz... yes
checking for compress2... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_start_decompress in -ljpeg... yes
checking for szlib... suppressed
checking for xdr library support... checking rpc/rpc.h usability... no
checking rpc/rpc.h presence... no
checking for rpc/rpc.h... no
checking for rpc/rpc.h... (cached) no
configure: error: couldn't find rpc headers
Unknown error encountered installing hdf4
----------------------------------------------------------------
Any other specific suggestions on how to proceed? I would really appreciate it!

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Re: Error in building the science processing software used within OBPG

by gnwiii » Sun Oct 30, 2022 5:20 pm America/New_York

zengkai wrote: Sat Oct 29, 2022 10:28 am America/New_York Thank you for your advice. Sorry for not stating my OS. I am using the latest Ubuntu 22.04 LTS version. I am a novice linux user and this problem has not been solved yet. I found that the rpc.h file exists in the folder shown, but it doesn't seem to be retrieved.

$:ls /usr/include/tirpc/rpc
auth_des.h clnt_stat.h pmap_prot.h rpc_com.h svc_auth.h xdr.h
auth_gss.h des_crypt.h pmap_rmt.h rpcent.h svc_dg.h
auth.h des.h raw.h rpc.h svc.h
auth_unix.h key_prot.h rpcb_clnt.h rpc_msg.h svc_mt.h
clnt.h nettype.h rpcb_prot.h rpcsec_gss.h svc_soc.h
clnt_soc.h pmap_clnt.h rpcb_prot.x svc_auth_gss.h types.h
[...]os.environ["CFLAGS"] = "-I%s/include %s" % (os.environ["LIB3_DIR"], os.environ["CFLAGS"])
os.environ["LDFLAGS"] = "-L%s/lib %s" % (os.environ["LIB3_DIR"], os.environ["LDFLAGS"])


Any other specific suggestions on how to proceed? I would really appreciate it!
(From my not relieable memory): In "$OCSSWROOT/opt/src/hdf4/BuildIt.py", you need to adjust the lines:

Code: Select all

os.environ["CFLAGS"] = "-I%s/include %s" % (os.environ["LIB3_DIR"], os.environ["CFLAGS"])
os.environ["LDFLAGS"] = "-L%s/lib %s" % (os.environ["LIB3_DIR"], os.environ["LDFLAGS"])
Try adding "-I/usr/include/tirpc/" to CFLAGS, and add a new line to add"-ltirpc" (note the nearly invisible difference betwen lower case "L" and capital"I" in some browsers) to LIBS. This may take some experimenting, so it is best to set OCSSW_DEBUG=1 so the hdf-4.2.15 directory is preserved. Running BuldIt.ps should generate an "hdf-4*/config.log" file with details of errors. You can rerun the configure line to experiment with settings for CFLAGS and LIBS.

zengkai
Posts: 4
Joined: Thu Oct 06, 2022 3:39 am America/New_York
Answers: 0

Re: Error in building the science processing software used within OBPG

by zengkai » Mon Oct 31, 2022 4:35 am America/New_York

Thank you very much. This problem has been solved by following your tips, but there is a new error:
------------------------------------------------------
/usr/bin/ld: ../../mfhdf/libsrc/.libs/libmfhdf.so: undefined reference to `xdr_enum'
/usr/bin/ld: ../../mfhdf/libsrc/.libs/libmfhdf.so: undefined reference to `xdr_int'
/usr/bin/ld: ../../mfhdf/libsrc/.libs/libmfhdf.so: undefined reference to `xdr_u_long'
/usr/bin/ld: ../../mfhdf/libsrc/.libs/libmfhdf.so: undefined reference to `xdr_long'
/usr/bin/ld: ../../mfhdf/libsrc/.libs/libmfhdf.so: undefined reference to `xdr_bytes'
/usr/bin/ld: ../../mfhdf/libsrc/.libs/libmfhdf.so: undefined reference to `xdr_opaque'
/usr/bin/ld: ../../mfhdf/libsrc/.libs/libmfhdf.so: undefined reference to `xdr_double'
/usr/bin/ld: ../../mfhdf/libsrc/.libs/libmfhdf.so: undefined reference to `xdr_float'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:682: cdftest] Error 1
make[2]: Leaving directory '/home/zengkai/SeaDAS/ocssw/opt/src/hdf4/hdf-4.2.15/mfhdf/test'
make[1]: *** [Makefile:430: all-recursive] Error 1
make[1]: Leaving directory '/home/zengkai/SeaDAS/ocssw/opt/src/hdf4/hdf-4.2.15/mfhdf'
make: *** [Makefile:515: all-recursive] Error 1
Unknown error encountered installing hdf4
-----------------------------------------------------------------
Any advice?

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Re: Error in building the science processing software used within OBPG

by gnwiii » Mon Oct 31, 2022 8:52 am America/New_York

zengkai wrote: Mon Oct 31, 2022 4:35 am America/New_York Thank you very much. This problem has been solved by following your tips, but there is a new error:
------------------------------------------------------
/usr/bin/ld: ../../mfhdf/libsrc/.libs/libmfhdf.so: undefined reference to `xdr_enum'
[...]
Unknown error encountered installing hdf4
-----------------------------------------------------------------
Any advice?
Something about your libtirpc configuration is not working for hdf4. The changes I suggested duplicate settings already made by the configure script. The version of hdf4 in the OCSSW src directory has support for libtirpc, but linux distros differ in things like the naming of the include directories. You should examine "config.log" for entries related to "tirpc". It may help to rename you latest "opt/src/hdf4/hdf-4.2.15" directory and run the original BuildIt.py script with OCSSWDEBUG=1 so you can compare the two config.log files.

zengkai
Posts: 4
Joined: Thu Oct 06, 2022 3:39 am America/New_York
Answers: 0

Re: Error in building the science processing software used within OBPG

by zengkai » Fri Nov 04, 2022 2:41 am America/New_York

Thank you very much. I have not found a solution to solve this problem directly. This error seems to be caused by incompatible linux version. I did not get this error after reinstalling Ubuntu 18.04, and then Built successfully.

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Re: Error in building the science processing software used within OBPG

by gnwiii » Sat Nov 05, 2022 8:53 am America/New_York

zengkai wrote: Fri Nov 04, 2022 2:41 am America/New_York Thank you very much. I have not found a solution to solve this problem directly. This error seems to be caused by incompatible linux version. I did not get this error after reinstalling Ubuntu 18.04, and then Built successfully.
Glad you found a solution. Using the same distro as the application developers is usually a good idea if you are able to do that.

Post Reply