iOS Build Environment Help Center

fatal error: could not build module 'Foundation', error: redefinition of module 'libxml2', and more

Pierre-Marie Baty

Hello

There are identified problems with the iOS 17 SDK, it's buggy because it defines the libxml module in several places. The next update of the builder will fix it. In the meantime, here's how to fix it yourself:

In the builder's install directory, overwrite the file called "SDK\usr\include\libxml2\libxml\module.modulemap" (which is a module *definition* file) with the "SDK\usr\include\libxml2\module.modulemap" one (which is a module *redirection* file). This way the compiler knows that libxml, libxml2 and libxml2\libxml are in fact the same module.

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty