Fortran derived type change needs fresh build
Fortran derived types are a dual to C / C++ struct. Using Fortran bind(C) attribute of a derived type allows the derived type contents to be passed back and forth with C / C++ using a corresponding struct definition. When modifying previously build Fortran source code that defines a derived type, a fresh build is required. This is because the Fortran module files .mod are not introspected by the build system, and hence the build will fail because there is a conflict between the old and new derived type definitions in the module files.
The solution is to delete the build directory and make a fresh build.