HDF-4.2.11 compile issue

When I compiled the HDF-4.2.11 and also the 4.2.14 and 4.2.15 versions, after successfully configuration, I failed the make step with the same problem related to ‘xdf’ and could not find a method to fix this.
libtool: link: ar cru .libs/libxdr.a xdr.o xdrfloat.o xdrstdio.o xdrarray.o
libtool: link: ranlib .libs/libxdr.a
libtool: link: ( cd “.libs” && rm -f “libxdr.la” && ln -s “…/libxdr.la” “libxdr.la” )
/opt/share/gcc/4.9.4/bin/gcc -DHAVE_CONFIG_H -I. -I…/…/hdf/src -I…/…/hdf/src -I/opt/share/jpeg/include -I/opt/share/zlib-1.2.11/include -I/opt/share/jpeg/include -I/opt/share/szip-2.1.1/include -I/opt/share/zlib-1.2.11/include -I/opt/share/jpeg/include -DSWAP -O3 -fomit-frame-pointer -MT xdrtest.o -MD -MP -MF .deps/xdrtest.Tpo -c -o xdrtest.o xdrtest.c
mv -f .deps/xdrtest.Tpo .deps/xdrtest.Po
/bin/sh …/…/libtool --tag=CC --mode=link /opt/share/gcc/4.9.4/bin/gcc -O3 -fomit-frame-pointer -L/opt/share/jpeg/lib -L/opt/share/zlib-1.2.11/lib -L/opt/share/szip-2.1.1/lib -L/opt/share/zlib-1.2.11/lib -L/opt/share/jpeg/lib -o xdrtest xdrtest.o -ljpeg -lz
libtool: link: /opt/share/gcc/4.9.4/bin/gcc -O3 -fomit-frame-pointer -o xdrtest xdrtest.o -L/opt/share/jpeg/lib -L/opt/share/zlib-1.2.11/lib -L/opt/share/szip-2.1.1/lib /opt/share/jpeg/lib/libjpeg.so -lz -Wl,-rpath -Wl,/opt/share/jpeg/lib -Wl,-rpath -Wl,/opt/share/jpeg/lib
xdrtest.o: In function main': xdrtest.c:(.text.startup+0x83): undefined reference to xdrstdio_create’
xdrtest.c:(.text.startup+0xd1): undefined reference to xdr_opaque' xdrtest.c:(.text.startup+0x163): undefined reference to xdr_opaque’
xdrtest.c:(.text.startup+0x18e): undefined reference to xdr_int' xdrtest.c:(.text.startup+0x1a2): undefined reference to xdr_vector’
xdrtest.c:(.text.startup+0x219): undefined reference to xdr_u_int' xdrtest.c:(.text.startup+0x22d): undefined reference to xdr_vector’
xdrtest.c:(.text.startup+0x2a8): undefined reference to xdr_long' xdrtest.c:(.text.startup+0x31f): undefined reference to xdr_long’
xdrtest.c:(.text.startup+0x333): undefined reference to xdr_vector' xdrtest.c:(.text.startup+0x3aa): undefined reference to xdr_u_long’
xdrtest.c:(.text.startup+0x3be): undefined reference to xdr_vector' xdrtest.c:(.text.startup+0x435): undefined reference to xdr_float’
xdrtest.c:(.text.startup+0x449): undefined reference to xdr_vector' xdrtest.c:(.text.startup+0x4c0): undefined reference to xdr_double’
xdrtest.c:(.text.startup+0x4d4): undefined reference to xdr_vector' xdrtest.c:(.text.startup+0x514): undefined reference to xdr_enum’
xdrtest.c:(.text.startup+0x528): undefined reference to xdr_vector' xdrtest.c:(.text.startup+0x5a8): undefined reference to xdrstdio_create’
xdrtest.c:(.text.startup+0x612): undefined reference to xdr_opaque' xdrtest.c:(.text.startup+0x6dc): undefined reference to xdr_opaque’
xdrtest.c:(.text.startup+0x753): undefined reference to xdr_int' xdrtest.c:(.text.startup+0x762): undefined reference to xdr_vector’
xdrtest.c:(.text.startup+0x872): undefined reference to xdr_u_int' xdrtest.c:(.text.startup+0x881): undefined reference to xdr_vector’
xdrtest.c:(.text.startup+0x97a): undefined reference to xdr_long' xdrtest.c:(.text.startup+0xa2a): undefined reference to xdr_long’
xdrtest.c:(.text.startup+0xa39): undefined reference to xdr_vector' xdrtest.c:(.text.startup+0xb3c): undefined reference to xdr_u_long’
xdrtest.c:(.text.startup+0xb4b): undefined reference to xdr_vector' xdrtest.c:(.text.startup+0xc4b): undefined reference to xdr_float’
xdrtest.c:(.text.startup+0xc5a): undefined reference to xdr_vector' xdrtest.c:(.text.startup+0xd85): undefined reference to xdr_double’
xdrtest.c:(.text.startup+0xd94): undefined reference to xdr_vector' xdrtest.c:(.text.startup+0xe73): undefined reference to xdr_enum’
xdrtest.c:(.text.startup+0xe82): undefined reference to `xdr_vector’
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:658: xdrtest] Error 1
make[2]: Leaving directory ‘/storage01/users/b159835/models/Spatial-Allocator/src/libs/hdf-4.2.11/mfhdf/xdr’
make[1]: *** [Makefile:396: all-recursive] Error 1
make[1]: Leaving directory ‘/storage01/users/b159835/models/Spatial-Allocator/src/libs/hdf-4.2.11/mfhdf’
make: *** [Makefile:481: all-recursive] Error 1

Please try the latest version: HDF4. Many improvements have been made. You’ll probably need --enable-hdf4-xdr and --disable-netcdf too.

You might also try the master branch of HDF4. That will be released as HDF 4.3.0 at the end of the month and removes the dependency on XDR.