The AOCC is based on LLVM 12, so the problem rises from the clang / flang support with the libraries.
The test here was done on CentOS 7.9, with AOCC 3.0.0, szip 2.1.1, HDF5 1.12.0, NetCDF-C 4.8.0 and NetCDF-Fortran 4.5.3. Also, a copy of cmake 3.20.3 was built from source with built-in gcc 4.8.5.