When compiling grib-api on IBM architectures with the XLF compiler, we recommend disabling the creation of "shared libraries" and use static libraries only. Using shared libraries can cause runtime errors.
For more information, please see Installing grib-api.