New submission from Patrik Kullman <[EMAIL PROTECTED]>:

I compiled ffmpeg with libfaac support on my ARM (ARM926EJ-Sid(wb) rev 0 (v5l),
arch: 5TEJ) but when I tried to run "ffmpeg -i audio.ac3 -acodec libfaac -ac 2
-ab 384k audio.aac", I got the following output:

FFmpeg version SVN-r14706, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-libfaac
libavutil version: 49.8.0
libavcodec version: 51.64.0
libavformat version: 52.20.0
libavdevice version: 52.1.0
built on Aug 13 2008 10:01:11, gcc: 4.1.3 20080304 (prerelease)
Illegal instruction

Strace didn't help much:

open("audio.ac3", O_RDONLY|O_LARGEFILE) = 3
_llseek(3, 0, [0], SEEK_SET) = 0
brk(0x7c2000) = 0x7c2000
read(3,
"[EMAIL PROTECTED]'!z\32\240\341\301\343t\10E\10\6\225\0343\215"...,
3276 = 32768
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGILL +++

The GDB backtrace told me this:

#0  ac3_probe (p=0x800) at ./libavutil/bswap.h:68
#1  0x0001104c in av_open_input_file (ic_ptr=0x400010e4,
    filename=0xbeed9710 "\001", fmt=<value optimized out>,
    buf_size=<value optimized out>, ap=0x755d60) at libavformat/utils.c:328
#2  0x00009f30 in main (argc=<value optimized out>, argv=<value optimized out>)
    at transcode.c:50

Which mortehu (freenode/#ffmpeg) traced to the "rev" function which apparently
was used because HAVE_ARMV6 was set during configuration.
We traced this in the configure-script to the "check_asm" function which only
tries to compile, but not execute, the pieces of asm.
That function should really use check_exec instead of check_cc since it has no
checks for cross-compilation (which check_exec has).

mortehu wrote this patch which I tested and it works:

--- configure   (revision 14338)
+++ configure   (working copy)
@@ -440,8 +440,8 @@
     name="$1"
     asm="$2"
     shift 2
-    check_cc "$@" <<EOF && enable $name || disable $name
-int foo(void){ asm volatile($asm); }
+    check_exec "$@" <<EOF && enable $name || disable $name
+int main(void){ asm volatile($asm); return 0; }
 EOF
 }

----------
messages: 2773
nosy: nomego
priority: normal
status: new
substatus: new
title: Detection of ARMv6 support in configure-script
type: patch

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue580>
______________________________________________________

Reply via email to