Hello,
Recently I upgraded to OS 10.6 with Xcode 3.1.2(gcc 4.2.1).
But, I failed to build HDF 4.2r4 with intel fortran 11.1.
As the HDF release note said that "only the 32-bit version of
the Intel compiler is supported", I followed it.
I can build zlib and jpeg libraries, but can't HDF as stated below.
Are there any tips or suggestions?
Best,
Yuichiro Hagihara
$ tar xzf zlib-1.2.3.tar.gz
$ cd zlib-1.2.3
$ ./configure
$ make test
$ sudo make install
$ tar xzf jpegsrc.v6b.tar.gz
$ cd jpeg-6b
$ cp /usr/share/libtool/config/config.guess .
$ cp /usr/share/libtool/config/config.sub .
$ ./configure --enable-shared --enable-static
$ make
$ sudo make install
$ tar xzf HDF4.2r3
$ cd HDF4.2r3
$ ./configure --with-jpeg=/usr/local --with-zlib=/usr/local --prefix=/usr/local
Configure summary
Compiling Options:
···
------------------
Compilation Mode: Default
C Compiler: gcc
CFLAGS: -O2
CPPFLAGS: -I/usr/include/rpc -I/usr/local/include -I/usr/local/include -DBIG_LONGS -DSWAP
LDFLAGS: -L/usr/local/lib -L/usr/local/lib
Shared Libraries: no
Static Libraries: yes
Languages:
----------
Fortran: Yes
Fortran Compiler: ifort
FFLAGS:
Features:
---------
SZIP compression: disabled
HDF support for NetCDF-3 APIs:
------------------------------
HDF4-NetCDF: Yes
$ make
Making all in hdf
Making all in src
make all-am
/bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/usr/include/rpc -I/usr/local/include -I/usr/local/include -DBIG_LONGS -DSWAP -O2 -MT atom.lo -MD -MP -MF .deps/atom.Tpo -c -o atom.lo atom.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/usr/include/rpc -I/usr/local/include -I/usr/local/include -DBIG_LONGS -DSWAP -O2 -MT atom.lo -MD -MP -MF .deps/atom.Tpo -c atom.c -o atom.o
In file included from hdf.h:20,
from atom.c:64:
hdfi.h:1352: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'you'
In file included from hdf.h:20,
from atom.c:64:
hdfi.h:1355:1: warning: "GOT_MACHINE" redefined
hdfi.h:760:1: warning: this is the location of the previous definition
hdfi.h:1359:1: warning: "DF_MT" redefined
hdfi.h:775:1: warning: this is the location of the previous definition
hdfi.h:1361: error: redefinition of typedef 'VOIDP'
hdfi.h:779: error: previous declaration of 'VOIDP' was here
hdfi.h:1362: error: redefinition of typedef '_fcd'
hdfi.h:780: error: previous declaration of '_fcd' was here
hdfi.h:1363: error: redefinition of typedef 'char8'
hdfi.h:781: error: previous declaration of 'char8' was here
hdfi.h:1364: error: redefinition of typedef 'uchar8'
hdfi.h:782: error: previous declaration of 'uchar8' was here
hdfi.h:1365: error: redefinition of typedef 'int8'
hdfi.h:783: error: previous declaration of 'int8' was here
hdfi.h:1366: error: redefinition of typedef 'uint8'
hdfi.h:784: error: previous declaration of 'uint8' was here
hdfi.h:1367: error: redefinition of typedef 'int16'
hdfi.h:785: error: previous declaration of 'int16' was here
hdfi.h:1368: error: redefinition of typedef 'uint16'
hdfi.h:786: error: previous declaration of 'uint16' was here
hdfi.h:1369: error: redefinition of typedef 'int32'
hdfi.h:787: error: previous declaration of 'int32' was here
hdfi.h:1370: error: redefinition of typedef 'uint32'
hdfi.h:788: error: previous declaration of 'uint32' was here
hdfi.h:1371: error: redefinition of typedef 'intn'
hdfi.h:789: error: previous declaration of 'intn' was here
hdfi.h:1372: error: redefinition of typedef 'uintn'
hdfi.h:790: error: previous declaration of 'uintn' was here
hdfi.h:1373: error: redefinition of typedef 'intf'
hdfi.h:793: error: previous declaration of 'intf' was here
hdfi.h:1374: error: redefinition of typedef 'float32'
hdfi.h:791: error: previous declaration of 'float32' was here
hdfi.h:1375: error: redefinition of typedef 'float64'
hdfi.h:792: error: previous declaration of 'float64' was here
hdfi.h:1376: error: conflicting types for 'hdf_pint_t'
hdfi.h:794: error: previous declaration of 'hdf_pint_t' was here
make[3]: *** [atom.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1