Clang and ports

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Feb 2 09:23:46 UTC 2012


On 02/02/2012 07:41, Joshua Isom wrote:
> I know that build cluster lists some ports that have problems with
> clang, but it doesn't say if they're tested or not.  I set up a clang
> jail to test out things before switching to clang for general use.  When
> I try running mencoder to encode a file to x264, it seg faults. Changing
> options doesn't change anything.  A gdb backtrace points to x264 being
> the problem.  Everything compiles and installs, but the build's
> useless.  Is clang ready for ports, or is it only safe for kernel/world?

It is certainly true that more ports will compile with the base gcc-4.2
compiler than will compile with clang.  It's also true that of the ports
that do compile, there will be more run-time failures with clang than
with gcc.

At the last test it was something like 18,000 out of 23,000 ports that
built successfully with clang -- remember though that figure (a)
includes a lot of ports that don't use a compiler at all (like shell
scripts or pure-perl code) and (b) some of the failures are because a
dependency failed to compile, which blocks testing on anything further
down the tree, or for reasons completely unrelated to the compiler, like
being unable to fetch distfiles.

See: http://wiki.freebsd.org/PortsAndClang

I personally have a FreeBSD 9-STABLE VM where everything (system+ports)
is compiled with clang, but it's just for testing, has nothing
particularly valuable on it and no one would care if it laid down and
died.  I am planning on upgrading my primary machine to 9.0 sometime
soon, and while still undecided whether to build the system with clang
or not, I certainly won't be enabling it for ports just yet.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120202/db0b2259/signature.pgp


More information about the freebsd-questions mailing list