hdf5-1.8.9 fails to build with <gfortran-4.6

Hi,
currently H5test_kind_SIZEOF.f90 generates the code that fails to build
with any gcc version less than 4.6.0. Namely:

gfortran -I../../src -I../../fortran/src -c -o H5fortran_detect.o
H5fortran_detect.f90
H5fortran_detect.f90:175.16:

   REAL(KIND= 16) :: a
                1
Error: Kind 16 not supported for type REAL at (1)
H5fortran_detect.f90:178.21:

    a_size = SIZEOF(a)
                     1
Error: Symbol 'a' at (1) has no IMPLICIT type
make: *** [H5fortran_detect.o] Error 1

Is that change intended, i.e. do you drop support for older versions of
gnu compiler?

Full build.log can be found at downstream bug[1]

Cheers,
Kacper Kowalik

[1] https://bugs.gentoo.org/show_bug.cgi?id=419895

Hi,

It should work with older gfortran versions.

Is this from a clean install of hdf5? I ask because the program H5fortran_detect.f90 is generated from H5test_kind_SIZEOF.f90. H5test_kind_SIZEOF.f90 determines which REAL KINDS are available and the program detected KIND=16 as valid at some point. Is it possible you configured/make hdf5 using 4.6 but then compiled it, maybe as a later build, with an older version of gfortran? You need to make clean before you switch to another compiler so that H5test_kind_SIZEOF.f90 is run again with the current compiler.

···

On 2012-06-06 08:52, Kacper Kowalik wrote:

Hi,
currently H5test_kind_SIZEOF.f90 generates the code that fails to build
with any gcc version less than 4.6.0. Namely:

gfortran -I../../src -I../../fortran/src -c -o H5fortran_detect.o
H5fortran_detect.f90
H5fortran_detect.f90:175.16:

   REAL(KIND= 16) :: a
                1
Error: Kind 16 not supported for type REAL at (1)
H5fortran_detect.f90:178.21:

    a_size = SIZEOF(a)
                     1
Error: Symbol 'a' at (1) has no IMPLICIT type
make: *** [H5fortran_detect.o] Error 1

Is that change intended, i.e. do you drop support for older versions of
gnu compiler?

Full build.log can be found at downstream bug[1]

Cheers,
Kacper Kowalik

[1] https://bugs.gentoo.org/show_bug.cgi?id=419895

It's a clean build and furthermore no other hdf5 instance is present in
the system. I was able to reproduce it regardless of the original user's
report without any trouble.
Best regards,
Kacper

···

On 06.06.2012 20:48, brtnfld@hdfgroup.org wrote:

Hi,

It should work with older gfortran versions.

Is this from a clean install of hdf5? I ask because the program
H5fortran_detect.f90 is generated from H5test_kind_SIZEOF.f90.
H5test_kind_SIZEOF.f90 determines which REAL KINDS are available and the
program detected KIND=16 as valid at some point. Is it possible you
configured/make hdf5 using 4.6 but then compiled it, maybe as a later
build, with an older version of gfortran? You need to make clean before
you switch to another compiler so that H5test_kind_SIZEOF.f90 is run
again with the current compiler.

Ah yes, this problem sounded familiar, you can look at the discussion/resolution at:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48404

Scot

···

On 2012-06-06 15:01, Kacper Kowalik wrote:

On 06.06.2012 20:48, brtnfld@hdfgroup.org wrote:

Hi,

It should work with older gfortran versions.

Is this from a clean install of hdf5? I ask because the program
H5fortran_detect.f90 is generated from H5test_kind_SIZEOF.f90.
H5test_kind_SIZEOF.f90 determines which REAL KINDS are available and the
program detected KIND=16 as valid at some point. Is it possible you
configured/make hdf5 using 4.6 but then compiled it, maybe as a later
build, with an older version of gfortran? You need to make clean before
you switch to another compiler so that H5test_kind_SIZEOF.f90 is run
again with the current compiler.

It's a clean build and furthermore no other hdf5 instance is present in
the system. I was able to reproduce it regardless of the original user's
report without any trouble.
Best regards,
Kacper

Ah yes, this problem sounded familiar, you can look at the
discussion/resolution at:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48404

Scot

Thanks a lot! It's indeed the cause and looks like a bug on our end.
Sorry for the noise.
Cheers,
Kacper

···

On 06.06.2012 22:10, brtnfld@hdfgroup.org wrote:

On 2012-06-06 15:01, Kacper Kowalik wrote:

On 06.06.2012 20:48, brtnfld@hdfgroup.org wrote:

Hi,

It should work with older gfortran versions.

Is this from a clean install of hdf5? I ask because the program
H5fortran_detect.f90 is generated from H5test_kind_SIZEOF.f90.
H5test_kind_SIZEOF.f90 determines which REAL KINDS are available and the
program detected KIND=16 as valid at some point. Is it possible you
configured/make hdf5 using 4.6 but then compiled it, maybe as a later
build, with an older version of gfortran? You need to make clean before
you switch to another compiler so that H5test_kind_SIZEOF.f90 is run
again with the current compiler.

It's a clean build and furthermore no other hdf5 instance is present in
the system. I was able to reproduce it regardless of the original user's
report without any trouble.
Best regards,
Kacper

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

I'm being told that's expected behaviour, i.e. taking latest possible
gcc libs for runtime. Could we work it around by linking libgfortran
statically? This simple patch fixes it for me:

--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -181,6 +181,7 @@
else
   H5test_kind_SOURCES = $(srcdir)/H5test_kind.f90
endif
+H5test_kind_LDFLAGS=-static-libgfortran

# Mark this directory as part of the Fortran API
FORTRAN_API=yes

Cheers,
Kacper

···

On 06.06.2012 22:10, brtnfld@hdfgroup.org wrote:

Ah yes, this problem sounded familiar, you can look at the
discussion/resolution at:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48404

Scot