Hi,
I'm having problems building HDF5 on our Solaris 2.8 machine. I've tried
searching through the message archive, and with google but I have not been
able to find any solutions to this. I hope to find the solution here.
On the machine, we have a build of g++ 4.2.4 installed into
/opt/gcc/gcc-4.2.4. It's specs are:
g++ -v
Using built-in specs.
Target: sparc-sun-solaris2.8
Configured with: /usr/gccbuild/gcc-4.2.4_src/configure
--with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls
--enable-languages=c,c++ --enable-threads=posix --with-cpu=v7
--prefix=/opt/gcc/gcc-4.2.4
I've untar'd the HDF5 source code into /data/HDF5/hdf5-1.8.2 and created a
directory /data/HDF5/build to configure and build the sources.
Running "../hdf-1.8.2/configure" from build results in the following:
../hdf5-1.8.2/configure
checking for a BSD-compatible install... ../hdf5-1.8.2/bin/install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ../hdf5-1.8.2/bin/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... sparc-sun-solaris2.8
checking host system type... sparc-sun-solaris2.8
checking shell variables initial values... done
checking if basename works... yes
checking if xargs works... yes
checking for cached host... none
checking for config sparc-sun-solaris2.8... no
checking for config sparc-sun-solaris2.x... no
checking for config sun-solaris2.8... no
checking for config sun-solaris2.x... no
checking for config sparc-solaris2.8... no
checking for config sparc-solaris2.x... no
checking for config sparc-sun... no
checking for config solaris2.8... no
checking for config solaris2.x... found
checking for config ../hdf5-1.8.2/config/site-specific/host-csgsolaris02...
no
checking for gcc... cc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
The above error occurs even though gcc is directly in the path. To get
round this, I set the environment variables CC=gcc and CXX=g++. The
configure step now appears to pass successfully with the following "STATUS"
at the end:
SUMMARY OF THE HDF5 CONFIGURATION
···
=================================
General Information:
-------------------
HDF5 Version: 1.8.2
Configured on: Mon Mar 23 11:26:56 GMT 2009
Configured by: build@csgsolaris02
Configure mode: production
Host system: sparc-sun-solaris2.8
Uname information: SunOS csgsolaris02 5.8 Generic_108528-23
sun4u sparc SUNW,Ultra-5_10
Byte sex: big-endian
Libraries:
Installation point: /data/HDF5/build/hdf5
Compiling Options:
------------------
Compilation Mode: production
C Compiler: /opt/gcc/gcc-4.2.4/bin/gcc (gcc-4.2.4)
CFLAGS/H5_CFLAGS: /-std=c99 -pedantic -Wall -Wextra -Wundef
-Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align
-Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
-Wnested-externs -Winline -Wno-long-long -Wfloat-equal
-Wmissing-format-attribute -Wmissing-noreturn -Wpacked
-Wdisabled-optimization -Wformat=2 -Wunreachable-code -Wendif-labels
-Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch
-Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs
-Wswitch-default -Wswitch-enum -Wunused-macros -Wunsafe-loop-optimizations
-Wc++-compat -Wvolatile-register-var -Wstrict-overflow -O
-fomit-frame-pointer -finline-functions
CPPFLAGS/H5_CPPFLAGS: / -LANG:std -DNDEBUG -UH5_DEBUG_API
Shared Libraries: yes
Static Libraries: yes
Statically Linked Executables: no
Extra libraries: -lz -lnsl -lsocket -lm -lsocket
Archiver: ar
Ranlib: ranlib
Debugged Packages:
API Tracing: no
Languages:
----------
Fortran: no
C++: no
Features:
---------
Parallel HDF5: no
High Level library: yes
Threadsafety: no
Default API Mapping: v18
With Deprecated Public Symbols: yes
I/O filters (external): deflate(zlib)
I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
MPE: no
Direct VFD: no
dmalloc: no
Clear file buffers before write: yes
Using memory checker: no
Function Stack Tracing: no
GPFS: no
Strict File Format Checks: no
Optimization Instrumentation: no
Linux Large File Support (LFS): no
Running make however, almost immediately fails with the following error:
In file included from ../../hdf5-1.8.2/src/H5private.h:29,
from ../../hdf5-1.8.2/src/H5.c:24:
../../hdf5-1.8.2/src/H5public.h:166: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'haddr_t'
In file included from ../../hdf5-1.8.2/src/H5.c:24:
../../hdf5-1.8.2/src/H5private.h:491: error: expected
specifier-qualifier-list before 'haddr_t'
In file included from ../../hdf5-1.8.2/src/H5.c:24:
../../hdf5-1.8.2/src/H5private.h:759: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'h5_stat_size_t'
../../hdf5-1.8.2/src/H5private.h:1229: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'HDstrtoll'
In file included from ../../hdf5-1.8.2/src/H5Dprivate.h:23,
from ../../hdf5-1.8.2/src/H5.c:25:
../../hdf5-1.8.2/src/H5Dpublic.h:105: error: expected '=', ',', ';', 'asm'
or '__attribute__' before 'H5Dget_offset'
In file included from ../../hdf5-1.8.2/src/H5FDprivate.h:24,
from ../../hdf5-1.8.2/src/H5Dprivate.h:26,
from ../../hdf5-1.8.2/src/H5.c:25:
...
The error is taking place on the typedef in H5public.h:
/*
* File addresses have their own types.
*/
#if H5_SIZEOF_INT64_T>=8
typedef uint64_t haddr_t;
# define HADDR_UNDEF ((haddr_t)(int64_t)(-1))
I checked back through the initial log of configure, and it believes that it
has these types:
checking for int64_t... yes
checking size of int64_t... 8
checking for uint64_t... yes
checking size of uint64_t... 8
checking for int_least64_t... yes
checking size of int_least64_t... 8
checking for uint_least64_t... yes
checking size of uint_least64_t... 8
checking for int_fast64_t... no
checking size of int_fast64_t... 0
checking for uint_fast64_t... no
checking size of uint_fast64_t... 0
Any advice on how I can proceed with this, without having to resort to
modifying the header files?
Regards,
Richard