OTB 6.2 Superbuild: hdf4 is hard too build
Dear devs,
I'm trying to compile the OTB 6.2 Superbuild under ArchLinux for more than 1 year – without success. Current git master builds great, but I need the old version for some legacy tools.
I've tried many things and need some expert's help now. So far I
- am compiling with -Wno-deprecated-copy -Wno-catch-value
- have patched the Superbuild to hdf-4.2.14
- URL "http://support.hdfgroup.org/ftp/HDF/HDF_Current/src/hdf-4.2.13.tar.gz"
- URL_MD5 a6aa950b3fce5162b96496d8ea0b82bf
+ URL "https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.14/src/hdf-4.2.14.tar.gz"
+ URL_MD5 77b8f327c88efda0eef56ee3fd95e6df
- have installed the https://aur.archlinux.org/packages/libtirpc-compat/ to get the symlink /usr/include/rpc/xdr.h
- have patched the configure.ac
--- hdf-4.2.14.orig/configure.ac
+++ hdf-4.2.14/configure.ac
@@ -685,6 +685,9 @@ case "$host" in
*-pc-cygwin*)
LIBS="$LIBS -ltirpc"
CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc" ;;
+ *-linux-gnu*)
+ LIBS="$LIBS -ltirpc"
+ CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc" ;;
*) ;;
esac
and still there are tons of gcc errors in xdrarray.c and xdrstdio.c: https://pastebin.com/dd6fnVeJ
Nevertheless I can perfectly compile hdf4 outside SuperBuild and even have the libraries and headers installed to /opt/hdf4 on my system.
How can I completely skip the hdf4 installation in the SuperBuild and just take the binaries from my system?
With USE_SYSTEM_HDF4=ON
I can't get CMake to find hdf4 inside /opt.
Edited by Luchs