Opened 11 years ago

Closed 11 years ago

#3364 closed defect (fixed)

Configure script fails to detect ARM Compiler 5.04

Reported by: Simon Tatham Owned by:
Priority: normal Component: build system
Version: git-master Keywords: arm
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg's configure script attempts to detect the ARM C/C++ compiler by grepping the output of "armcc --vsn". As of ARM Compiler 5.04, the --vsn output format has changed, and the grep no longer successfully detects the compiler.

For example, I ran the following configure command, with both ARM Compiler 5.04 and CodeSourcery ARM 2009q3 on my path:

./configure --extra-cflags="-O2 -marm" --cross-prefix=arm-none-linux-gnueabi- --sysroot=$CODESOURCERYDIR/arm-none-linux-gnueabi/libc --arch=arm --cc="armcc" --cross-prefix=arm-none-linux-gnueabi- --enable-gpl --enable-cross-compile --disable-asm --target-os=linux

and got the message

armcc is unable to create an executable file.
C compiler test failed.

whereas with ARM Compiler 5.03, ffmpeg successfully configured itself.

The problem is the line in the configure script which says

    elif $_cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then

which works on 5.03, whose --vsn output includes a line saying

ARM C/C++ Compiler, 5.03 [Build 117]

but 5.04's version dump looks like this instead:

Product: ARM Compiler 5.04
Component: ARM Compiler 5.04 (build 46)
Tool: armcc [5040046]

So that regular expression should be changed for one that will match both these pieces of output. In particular, it's better to match the 'Component: ARM Compiler' line than the 'Product:' line, since the latter can change to match larger products that ARM Compiler is being shipped as a component of.

Change History (4)

comment:1 by Simon Tatham, 11 years ago

Component: undeterminedffmpeg
Version: unspecifiedgit-master

comment:2 by Carl Eugen Hoyos, 11 years ago

Component: ffmpegbuild system

comment:3 by Carl Eugen Hoyos, 11 years ago

Keywords: arm added

comment:4 by Michael Niedermayer, 11 years ago

Resolution: fixed
Status: newclosed

should be fixed in db55365d0f938ee93ed660a14c07f10f2a66dd10
if not, please reopen ticket

Note: See TracTickets for help on using tickets.