Because we at FreeBSD have a source package manager called Ports with
over 20000 packages, we thought it would be nice to waste some CPU
cycles on the build cluster to see how well Clang performs.
Unfortunately it was only capable of building 7030 packages
successfully. This sounds very bad, but when you keep in mind that it
wasn't able to build libiconv (on which 9600 other ports depend directly
or indirectly, mainly because of GNU make), that's still quite
The build cluster only attempted to build 7241 ports, of which 211
failed. The error logs can be viewed here:
After some filtering and sorting, I've come up with this list, where
I've categorized all error logs:
I'll discuss some of the categories here:
A lot of ports currently don't build, because they depend on
C89, or at least GCC's `-std=gnu89' semantics. Most of them have
missing symbols, because they use GNU-style inlining, while
Clang uses ISO C99 style inlining by default (because it uses
We also have one breakage here, because the code in question
uses a variable called `restrict'.
This is something we'll probably change in the Ports framework,
where we can mark ports that require a different -std= to be
added to the CFLAGS.
On the build cluster we also had a problem with autoconf's way
of detecting math functions in libm. We've not been able to
reproduce them outside of the build cluster yet... It may be
similar to PR4290, where Clang dislikes autoconf's way of
building conftests for functions in <stdio.h>. Maybe it has
already been fixed in the mean time.
Once these issues have been sorted out, I'm sure we can get better
coverage of the Ports tree and hopefully be able to try to build at
least 15000+ packages.
So Clang is doing quite a good job already, but we're not there yet.
We'll keep submitting bug reports until we're satisfied.
I'd like to thank Erwin Lansing for performing the build!