Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.14.5 fortran lib fails to build on arch i386 - Error: There is no specific subroutine for the generic ‘verify’ at (1) #5036

Open
pini-gh opened this issue Oct 29, 2024 · 9 comments
Assignees
Labels
Component - Fortran Fortran wrappers Confirmed Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug / Bugfix Please report security issues to [email protected] instead of creating an issue on GitHub

Comments

@pini-gh
Copy link

pini-gh commented Oct 29, 2024

Describe the bug
While building on current Debian unstable i386 with gfortran 14.2.0 the build fails with:

+ gfortran -I. -I../../../../fortran/test -I../../src -I../../fortran/src -std=f2008 -Waliasing -Wall -Wcharacter-truncation -Wextra -Wimplicit-interface -Wsurprising -Wunderflow -pedantic -Wintrinsics-std -Wimplicit-procedure -Wreal-q-constant -Wfunction-elimination -Wrealloc-lhs -Wrealloc-lhs-all -Wno-c-binding-type -Winteger-division -Wfrontend-loop-interchange -fdiagnostics-urls=never -fno-diagnostics-color -s -Wno-unused-dummy-argument -Wno-array-temporaries -O3 -I../../fortran/src -I../../fortran/src -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -c -o tH5T_F03.o ../../../../fortran/test/tH5T_F03.F90
../../../../fortran/test/tH5T_F03.F90:3009:17:

 3009 |         IF(.NOT.(orig_data(i,j).EQ.orig_data(i,j))) CYCLE  ! skip IF value is NaN
      |                 1
Warning: Equality comparison for REAL(4) at (1) [-Wcompare-reals]
../../../../fortran/test/tH5T_F03.F90:1184:81:

 1184 |        CALL verify("h5kind_to_type",dset_data_r31(i),data_out_r31(i),total_error)
      |                                                                                 1
Error: There is no specific subroutine for the generic ‘verify’ at (1)
make[4]: *** [Makefile:1563: tH5T_F03.o] Error 1

Full build log: https://buildd.debian.org/status/fetch.php?pkg=hdf5&arch=i386&ver=1.14.5%2Brepack-1%7Eexp1&stamp=1730037856&raw=0

Expected behavior
Successful build.

Platform (please complete the following information)

  • HDF5 version 1.14.5
  • OS and version: Debian unstable i386
  • Compiler and version: GCC 14.2.0
  • Build system (e.g. CMake, Autotools) and version: Autotools
    • autoconf 2.72
    • automake 1.16.5
  • Any configure options you specified
    cd debian/build-serial && ../../configure --build=i686-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=\${prefix}/lib/i386-linux-gnu --libexecdir=\${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --host=i686-linux-gnu --build=i686-linux-gnu --libdir=\${prefix}/lib/i386-linux-gnu --mandir=\${prefix}/share/man --with-pthread --enable-linux-lfs --enable-shared --enable-build-mode=production --disable-sharedlib-rpath --with-zlib --with-default-api-version=v114 --with-szlib --enable-fortran --enable-fortran2003 --enable-hltools --enable-ros3-vfd --includedir=\${prefix}/include/hdf5/serial --with-flavor=serial --with-default-plugindir=/usr/lib/i386-linux-gnu/hdf5/serial/plugins --enable-unsupported --enable-threadsafe --enable-cxx --enable-java
  • MPI library and version (parallel HDF5) : not relevant (serial build)

Additional context
This error doesn't occur when building for arch amd64 (x86_64).

@hyoklee
Copy link
Member

hyoklee commented Oct 30, 2024

@pini-gh , thank you for your report!
FYI, this problem occurs on i386 + Alpine + CMake as well.

@pini-gh
Copy link
Author

pini-gh commented Nov 1, 2024

Any fix available?

@derobins derobins added the Type - Bug / Bugfix Please report security issues to [email protected] instead of creating an issue on GitHub label Nov 4, 2024
@derobins derobins added the Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. label Nov 4, 2024
@pini-gh
Copy link
Author

pini-gh commented Nov 4, 2024

May I suggest a higher priority? This issue is a blocker for transitioning HDF5 1.14 into the next Debian stable release (trixie).

@derobins
Copy link
Member

derobins commented Nov 7, 2024

Hi @pini-gh !

We've been slowly moving away from supporting i386 since, well, nobody really supports it anymore. We are planning to get some i386 CI up, though, if only to see if we're making bad type size assumptions that we'll see in the warning output.

Since we do want Debian to deploy recent versions of HDF5, I'll have our Fortran people look at this ASAP (they say it's not going to be that hard to fix). As for a fix, we are retiring the 1.14 maintenance line, though we might have a 1.14.6 release next year (probably in the late spring, after 2.0 goes out). Can Debian work with a source patch until then? I think the fix will be fairly small.

@derobins derobins added Priority - 1. High 🔼 These are important issues that should be resolved in the next release and removed Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. labels Nov 7, 2024
@pini-gh
Copy link
Author

pini-gh commented Nov 7, 2024

Can Debian work with a source patch until then? I think the fix will be fairly small.

Sure. Thanks!

@brtnfld
Copy link
Contributor

brtnfld commented Nov 12, 2024

@pini-gh, can you try it with a cmake build? For our Alpine i386 CI testing, I could not reproduce the error about an invalid KIND. The only Fortran test that fails is with h5rget_obj_name_f with optional parameters and a blank string (or a smaller string) being passed in, which is strange because, with the optional parameters, it does not use the string. It seg faults when returning from the Fortran call; the C call is successful. If I specify a specific string length to pass to the API, I can get it to pass. It is probably a compiler issue; the gfortran version was 13.

@pini-gh
Copy link
Author

pini-gh commented Nov 12, 2024

@brtnfld
Unfortunately the Debian package does an autotools build. Il would be difficult for me to adapt it for a cmake build. But I could try and provide you with a docker image to reproduce the error into a Debian unstable i386 environment. What do you think?

@brtnfld
Copy link
Contributor

brtnfld commented Nov 12, 2024

Yes, a docker image would be helpful.

@pini-gh
Copy link
Author

pini-gh commented Nov 12, 2024

First, create this Dockerfile:

$ cat Dockerfile-hdf5-debian-i386 
FROM debian:unstable-20241111

ENV DEBIAN_FRONTEND=noninteractive
RUN echo "deb-src http://ftp.debian.org/debian/ experimental main" >/etc/apt/sources.list.d/experimental-src.list
RUN apt update && apt install -y build-essential git && apt -y build-dep hdf5

RUN adduser --quiet hdf5
USER hdf5
RUN cd && git clone -b hdf5_1.14.5 https://github.com/HDFGroup/hdf5
WORKDIR /home/hdf5/hdf5

Then build the image:

$ docker build -t hdf5-debian-i386 --platform 386 -f Dockerfile-hdf5-debian-i386 .

Run the image:

$ docker run -it --rm hdf5-debian-i386

Finally configure and build into the container:

$ ./configure --disable-silent-rules --enable-build-mode=production --enable-fortran --enable-fortran2003 --disable-hltools
$ make

The build should end with:

+ gfortran -I. -I../../src -I../../fortran/src -I../../fortran/src -I../../fortran/src -c -o tH5T_F03.o tH5T_F03.F90
tH5T_F03.F90:1184:81:

 1184 |        CALL verify("h5kind_to_type",dset_data_r31(i),data_out_r31(i),total_error)
      |                                                                                 1
Error: There is no specific subroutine for the generic 'verify' at (1)
make[2]: *** [Makefile:1557: tH5T_F03.o] Error 1
make[2]: Leaving directory '/home/hdf5/hdf5/fortran/test'
make[1]: *** [Makefile:915: all-recursive] Error 1
make[1]: Leaving directory '/home/hdf5/hdf5/fortran'
make: *** [Makefile:732: all-recursive] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Fortran Fortran wrappers Confirmed Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug / Bugfix Please report security issues to [email protected] instead of creating an issue on GitHub
Projects
None yet
Development

No branches or pull requests

4 participants