The problem is not whether your application and dynamic libraries were compiled with different versions of clang and / or gcc. The problem is whether there is ultimately one C base library that manages one kind of FILE * object and has one compatible implementation fclose().
On MacOS and Linux, at least the answer to all these questions is likely to be yes. In my experience, it's hard to get two different, incompatible C libraries in a mix; you have to really work on it.
: , , , . , Unix- C, /lib/libc.{a,so}. , "" , , , , , , . , , , , , , , .