Hi, I noticed that the CPU detection in the ffmpeg ebuild fails if march is set to "native". It's configure script will print WARNING: Unknown CPU "native", ignored. and switch to march=generic. I hacked a patch that works for me, but I am not much of a bash ninja and I am sure there is a cleaner approach. Anyway, you get the idea ;-) --- a/media-video/ffmpeg/ffmpeg-0.5-r1.ebuild 2009-05-21 21:06:31.000000000 +0200 +++ b/media-video/ffmpeg/ffmpeg-0.5-r1.ebuild 2009-06-09 21:12:06.000000000 +0200 @@ -137,8 +137,13 @@ src_compile() { # If they contain an unknown CPU it will not hurt since ffmpeg's configure # will just ignore it. for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do - myconf="${myconf} --cpu=$i" - break + if [[ "$i" == "native" ]]; then + i=`echo "int main() {return 0;}" | gcc ${CFLAGS} -x c -S -Q -v - 2>&1 | egrep -m 1 -o "\-march=.*" | cut -f 1 -d \ | cut -f 2 -d \=` + fi + if [[ "$i" != "" ]]; then + myconf="${myconf} --cpu=$i" + break + fi done # video hooking support. replaced by libavfilter, probably needs to be Reproducible: Always
Created attachment 194031 [details, diff] repost the patch, sry for the mess in the description
hi, here it still fails with: WARNING: Unknown CPU "k8-sse3", ignored. i guess there is a space missing somewhere...
sry, the patch is correct, but ffmpeg just doesn't know k8-sse3, probably it should be identified as k8 only...
http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=9025b25ce04900fa5a9d14871547ff80dab1996c So when the time is right just add $i -> ${i/native/host} kthxbye ;o)
(In reply to comment #4) > http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=9025b25ce04900fa5a9d14871547ff80dab1996c > > So when the time is right just add $i -> ${i/native/host} added such a thing in -9999; closing as fixed. We'll probably make a new snapshot soon.