multimedia/x264 workaround is broken

Matthew Rezny mrezny at
Tue Dec 25 02:55:44 UTC 2012

The Ports and Clang wiki page has x264 listed as a port with build problems, but has Y for the USE_GCC=any workaround. The last commit on the port, over 3 months ago, has a contradictory message, noting the workaround is insufficient and thus is only a temporary fix.

I am running 9.1-RELEASE/amd64 built WITH_CLANG_IS_CC and WITHOUT_GCC. I hit the deficiency in the workaround today while building ports.

I took the default port options, except to disable PGO as I expected that would be GCC specific. First attempt, configure fails with no working C compiler, config.log shows it tries to call "gcc" which does not exist because the port did not trigger any gcc from ports.

Second attempt, turn on GCC4.4+ option, clean and make again. Same failure, config.log is identical. Huh, why didn't it even try to build some GCC from ports? Looking at the Makefile I notice the blanket USE_GCC=any and later the conditional USE_GCC?=4.4+. So the workaround appears to smash the port's GCC4.4+ option and thus it could never actually use any GCC from ports with this workaround in place. The workaround is now the culprit in the brokenness when WITHOUT_GCC is used.

Third attempt, remove the offending USE_GCC=any line from the Makefile, turn off the GCC4.4+ option in the port, clean and make again. Success! The port builds clean with Clang, no errors or warnings except an ignored GCC specific option. I have not tested use of the port, that has to wait for others to finish building so I have some way to do so.

The immediate question is, what was the original error that mandated the workaround and does that error still occur with current version of Clang? If the latter is no, can we get rid of the temporary workaround?

Happy Festivus
(Air your grievances)

More information about the freebsd-ports mailing list