HDFGroup / hdf4

Official HDF4 Library Repository
Other
15 stars 25 forks source link

error: call to undeclared function 'test_mgr_szip'; ISO C99 and later do not support implicit function declarations #788

Open samfux84 opened 1 day ago

samfux84 commented 1 day ago

Hi,

I am trying to build HDF4 4.2.15 with Intel OneAPI 2023.2.0 and get the following error:

/cluster/home/sfux/spack/spack/lib/spack/env/oneapi/icx -DHAVE_CONFIG_H -I. -I../../hdf/src  -I../../hdf/src -I/cluster/software/stacks/2024-06/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/oneapi-2023.2.0/zlib-ng-2.1.4-sgtc5qn3prm2viidnrnq7bw5kf2elite/include -I/cluster/software/stacks/2024-06/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/oneapi-2023.2.0/libjpeg-turbo-3.0.0-tuyhr36jim6weztgfsi27hhn74idtwad/include -I/cluster/software/stacks/2024-06/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/oneapi-2023.2.0/libszip-2.1.1-v5nt2xppftuxijh4gjhk47f5tdxnx4v5/include   -O -MT mgr.o -MD -MP -MF .deps/mgr.Tpo -c -o mgr.o mgr.c
mgr.c:4080:5: error: call to undeclared function 'test_mgr_szip'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    test_mgr_szip();   /* write/read with szip compression */
    ^
mgr.c:4080:5: note: did you mean 'test_mgr_init'?
mgr.c:242:1: note: 'test_mgr_init' declared here
test_mgr_init(void)
^
1 error generated.
make[2]: *** [Makefile:783: mgr.o] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/litend.Tpo .deps/litend.Po
mv -f .deps/man.Tpo .deps/man.Po
mv -f .deps/chunks.Tpo .deps/chunks.Po
make[2]: Leaving directory '/cluster/home/sfux/spack/spack/var/spack/stage/spack-stage-hdf-4.2.15-jl64o2c6ow5etkfvf32ort7buik7zkyp/spack-src/hdf/test'
make[1]: *** [Makefile:425: all-recursive] Error 1
make[1]: Leaving directory '/cluster/home/sfux/spack/spack/var/spack/stage/spack-stage-hdf-4.2.15-jl64o2c6ow5etkfvf32ort7buik7zkyp/spack-src/hdf'
make: *** [Makefile:515: all-recursive] Error 1

The same issue is also reported in

https://forum.hdfgroup.org/t/help-building-hdf4-with-clang-error-implicit-declaration-of-function-test-mgr-szip-is-invalid-in-c99/7680

Is there any solution for this or can version 4.2.15 only be built if the compiler flag -Wimplicit-function-declaration is set?

Any help is appreciated.

Best regards

Sam

bmribler commented 1 day ago

Hi Sam,

Will it be possible for you to use 4.2.16? The issue was fixed there.

Thanks, Binh-Minh