ModelingToolkit V11 Library Split and Licensing, Community Feedback Requested

Afaiu reason for the GCC “runtime exception” is not that compiled works are derivatives of the compiler (they are normally not!). It is rather that C++ compilers are expected to provide stuff like the STL. So your compiled C++ binary is not derived from the used compiler, but if you use e.g. std::string then your compiled binary is a derived work of the GNU libstd++ implementation of std::string. I think it’s also a derived work of GNU libstdc++ if you compile with clang -stdlib=libstdc++.

I personally think that this is utterly insane C++ nonsense-- language and standard library should have been more separate, ABI over API. But :person_shrugging:

(I think the otherwise obvious approach – make libstdc++ LGPL instead of GPL – can’t really work, because you need to inline from libstdc++, dynamic linking is too slow, and LGPL afaiu doesn’t permit that)

There is no issue with GPLv3, but afaiu AGPL is incompatible with GPLv2.

In other words: Even if you don’t care about licenses at all and want to open-source everything, it would probably be problematic to distribute artifacts that depends on both GPLv2 and AGPL libraries (even if you don’t modify/fork the libraries).

I think you’d be allowed to pass on the source code to the resulting package; but I think you’d be in hot water if you additionally wanted to distribute a docker image with everything pre-compiled to your students in a course: GPLv2 demands that recipicients of the precompiled binary code inside the docker image are entitled to source code without onerous extra restrictions, but AGPL is considered such an incompatible onerous restriction by GPLv2. But IANAL, please discuss that in the FAQ!

1 Like