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

Incompatible function pointer when building with clang-16 #2715

Closed
ufdup89 opened this issue Jun 18, 2023 · 5 comments
Closed

Incompatible function pointer when building with clang-16 #2715

ufdup89 opened this issue Jun 18, 2023 · 5 comments
Assignees
Milestone

Comments

@ufdup89
Copy link

ufdup89 commented Jun 18, 2023

I am experiencing errors when compiling netcdf 4.9.2 with clang-16 and hdf5 1.14.1. Compiling with clang-15 and same hdf5 version works fine.

OS: macOS Ventura 13.4 (arm)

_ports_science_netcdf/netcdf/work/netcdf-c-4.9.2/libhdf5/hdf5open.c
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_netcdf/netcdf/work/netcdf-c-4.9.2/libhdf5/hdf5open.c:2902:20: error: incompatible function pointer types passing 'int (hid_t, const char *, const H5L_info2_t *, void *)' (aka 'int (long long, const char *, const H5L_info2_t *, void *)') to parameter of type 'H5L_iterate1_t' (aka 'int (*)(long long, const char *, const H5L_info1_t *, void *)') [-Wincompatible-function-pointer-types]
                   read_hdf5_obj, (void *)&udata) < 0)
                   ^~~~~~~~~~~~~
/opt/local/include/H5Lpublic.h:1684:42: note: passing argument to parameter 'op' here
                          H5L_iterate1_t op, void *op_data);
                                         ^
1 error generated.
@WardF WardF self-assigned this Jun 23, 2023
@WardF WardF added this to the 4.9.3 milestone Jun 23, 2023
@WardF
Copy link
Member

WardF commented Jun 23, 2023

Interesting, thank you for letting us know. I will take a look.

@WardF
Copy link
Member

WardF commented Aug 13, 2024

Taking a look at fixing this, I'm now observing it again after merging #2958. @edwardhartnett do you folks use clang at all? I'm uncertain why this passed the MacOS CI but fails locally using clang.

@edwardhartnett
Copy link
Contributor

No we don't use clang.

@brtnfld
Copy link
Contributor

brtnfld commented Aug 22, 2024

I'm also seeing this on Frontier builds with Cray and v4.9.2:

InstalledDir: /opt/cray/pe/cce/17.0.0/cce-clang/x86_64/share/../bin
Configuration file: /opt/cray/pe/cce/17.0.0/cce-clang/x86_64/bin/clang.cfg

v4.9.3-rc1 does not have an issue and successfully compiled.

@WardF
Copy link
Member

WardF commented Aug 22, 2024

Thanks for confirming @brtnfld. I'm prepping the netCDF-Fortran rc1 to go out tomorrow, although there appears to be an FPE-related issue in netCDF-Fortran (reported via our eSupport system) that I am going to open as a github issue; it may need to be addressed at a higher priority once I confirm it.

@WardF WardF closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants