Opened 6 years ago

Closed 6 years ago

#3364 closed defect (fixed)

Configure script fails to detect ARM Compiler 5.04

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


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 Changed 6 years ago by statham-arm

  • Component changed from undetermined to ffmpeg
  • Version changed from unspecified to git-master

comment:2 Changed 6 years ago by cehoyos

  • Component changed from ffmpeg to build system

comment:3 Changed 6 years ago by cehoyos

  • Keywords arm added

comment:4 Changed 6 years ago by michael

  • Resolution set to fixed
  • Status changed from new to closed

should be fixed in db55365d0f938ee93ed660a14c07f10f2a66dd10
if not, please reopen ticket

Note: See TracTickets for help on using tickets.