Re: [netcdf-hdf] hdf compilation problem with gcc 4.3.2

  • To: Charlie Zender <zender@xxxxxxx>
  • Subject: Re: [netcdf-hdf] hdf compilation problem with gcc 4.3.2
  • From: Elena Pourmal <epourmal@xxxxxxxxxxxx>
  • Date: Fri, 23 Jan 2009 10:35:49 -0600
Dear Charlie,

The problem was addressed after the 1.8.2 release. Please try the latest snapshot of the HDF5 1.8 branch

ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/snapshots/v18/hdf5-1.8.2-post3.tar.gz

Elena

On Jan 23, 2009, at 10:24 AM, Charlie Zender wrote:

A long way into the compilation of hdf 1.8.1 and 1.8.2 on my
ubuntu 8.10 i386 and x86_64 boxes, gcc encounters the following error:

gcc -DHAVE_CONFIG_H -I. -I../src -I../src -I../test -I../tools/lib
-Df2cFortran -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_POSIX_SOURCE -D_BSD_SOURCE    -DNDEBUG
-UH5_DEBUG_API  -std=c99 -pedantic -Wall -Wextra -Wundef -Wshadow
-Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align
-Wwrite-strings -Wconversion -Wsign-compare -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 -Wmultichar -Wformat-nonliteral
-Wformat-security -Wformat-y2k -Wunreachable-code -Wendif-labels
-Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch
-Wmissing-field-initializers -Wvariadic-macros
-Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var -O
-fomit-frame-pointer -finline-functions -MT zip_perf.o -MD -MP -MF
.deps/zip_perf.Tpo -c -o zip_perf.o zip_perf.c

zip_perf.c: In function ‘error’:

zip_perf.c:186: attention : function might be possible candidate for
‘printf’ format attribute
zip_perf.c: In function ‘write_file’:

zip_perf.c:248: attention : conversion to ‘long unsigned int’ from ‘int’
may change the sign of the result
zip_perf.c: In function ‘get_unique_name’:

zip_perf.c:333: attention : request for implicit conversion from ‘void
*’ to ‘char *’ not permitted in C++
zip_perf.c: In function ‘fill_with_random_data’:

zip_perf.c:452: attention : conversion to ‘long unsigned int’ from
‘ssize_t’ may change the sign of the result
zip_perf.c:462: attention : conversion to ‘long unsigned int’ from ‘int’
may change the sign of the result
zip_perf.c: In function ‘do_write_test’:

zip_perf.c:528: attention : conversion to ‘long unsigned int’ from
‘ssize_t’ may change the sign of the result
zip_perf.c: In function ‘fill_with_random_data’:

/usr/include/bits/fcntl2.h:45: attention : ne sera jamais exécuté

/usr/include/bits/fcntl2.h:49: attention : ne sera jamais exécuté

/usr/include/bits/fcntl2.h:51: attention : ne sera jamais exécuté

/usr/include/bits/fcntl2.h:57: attention : ne sera jamais exécuté

/usr/include/bits/fcntl2.h:60: attention : ne sera jamais exécuté

/usr/include/bits/fcntl2.h:58: attention : ne sera jamais exécuté

zip_perf.c: In function ‘do_write_test’:
/usr/include/bits/fcntl2.h:45: attention : ne sera jamais exécuté
/usr/include/bits/fcntl2.h:45: attention : ne sera jamais exécuté
/usr/include/bits/fcntl2.h:57: attention : ne sera jamais exécuté
/usr/include/bits/fcntl2.h:60: attention : ne sera jamais exécuté
/usr/include/bits/fcntl2.h:58: attention : ne sera jamais exécuté
/usr/include/bits/fcntl2.h:51: attention : ne sera jamais exécuté
/usr/include/bits/fcntl2.h:57: attention : ne sera jamais exécuté
/usr/include/bits/fcntl2.h:60: attention : ne sera jamais exécuté
/usr/include/bits/fcntl2.h:58: attention : ne sera jamais exécuté
/usr/include/bits/fcntl2.h:54: attention : ne sera jamais exécuté
zip_perf.c: In function ‘error’:
zip_perf.c:181: attention : function might be possible candidate for
attribute ‘noreturn’
zip_perf.c: In function ‘main’:
/usr/include/bits/unistd.h:39: attention : ne sera jamais exécuté
/usr/include/bits/unistd.h:42: attention : ne sera jamais exécuté
/usr/include/bits/unistd.h:43: attention : ne sera jamais exécuté
/usr/include/bits/unistd.h:40: attention : ne sera jamais exécuté
/usr/include/bits/string3.h:82: attention : ne sera jamais exécuté
In function ‘open’,
   inlined from ‘do_write_test’ at zip_perf.c:548,
   inlined from ‘main’ at zip_perf.c:649:
/usr/include/bits/fcntl2.h:51: erreur: call to ‘__open_missing_mode’
declared with attribute error: open with O_CREAT in second argument
needs 3 arguments
make[2]: *** [zip_perf.o] Erreur 1
make[2]: quittant le répertoire « /data/zender/tmp/hdf5-1.8.1/ perform »
make[1]: *** [all-local] Erreur 2
make[1]: quittant le répertoire « /data/zender/tmp/hdf5-1.8.1 »
make: *** [all-recursive] Erreur 1

Here are my configuration flags:
export CC='gcc'
export CPPFLAGS='-Df2cFortran'
export CXX='g++'
export FC='gfortran'
export F77='gfortran'
export F90='gfortran'
export FCFLAGS=''
export FFLAGS=''
export F90FLAGS=''
export NETCDF4_ROOT=/usr/local
export HDF5_ROOT=${NETCDF4_ROOT}
./configure --prefix=${HDF5_ROOT} --enable-cxx --enable-fortran

And the compiler:
zender@virga:/data/zender/tmp/hdf5-1.8.1$ gcc --version
gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2

Any help appreciated,
Charlie
--
Charlie Zender, Department of Earth System Science
University of California, Irvine (949) 824-2987 :)
_______________________________________________
netcdf-hdf mailing list
netcdf-hdf@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/