CFT: building multimedia/vlc with clang on 9.1+

Oliver Heesakkers freebsd at heesakkers.info
Thu Feb 7 10:00:08 UTC 2013


Op za 19 jan 2013 22:09:03 schreef Juergen Lock:
> Hi!
> 
>  As having to depend on gcc 4.6+ on i386 is kindof a waste on 9.1+
> where we have clang too, and clang might generate better code than
> the old gcc 4.2.1 in base on amd64 anyway I thought what if we have
> the vlc port default to using clang on 9.1+ when it's available?
> So I propse the patch below for testing by anyone on 9.1 or later,
> also on i386 where I can't test myself, please report any issues
> or regressions you find.
> 

I ran into an issue yesterday with an MKV. The error was:

"mkv error: cannot find KaxSegment or missing mandatory KaxInfo."

Searching this brought me to:
http://forum.videolan.org/viewtopic.php?f=13&t=98175

Where the answer is: "Your g++ is to old", they also provide a workaround 
patch to mkv.hpp that supposedly exposes a security issue:

#define MKV_IS_ID( el, C ) ( EbmlId( (*el) ) == C::ClassInfos.GlobalId )

After some quick testing (all FreeBSD 9.1 RELEASE amd64):

clang 3.1 without patching: MKV error
clang 3.1 with that patch : OK
USE_GCC=4.6 without patch : OK


	Oliver


More information about the freebsd-ports mailing list