Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to build the latest ffmpeg from the git repo. However, as you can see below, autotools does not detect correctly that my box has 64-bit architecture (Ubuntu 12.04). Consequently, during the build, some x86 libs are required, but not present, and the build fails. How do I tackle this?

mvitkov@mms:~/projects/ffmpeg/build$ ../ffmpeg/configure --enable-shared
output:
install prefix /usr/local
source path /home/users/mvitkov/projects/ffmpeg/ffmpeg
C compiler gcc
ARCH x86 (generic)

On the other hand, autotools usually works fine:

mvitkov@mms:~/projects/x264/build$ ../x264/configure --enable-static output:
*platform: X86_64*

share|improve this question
    
I hope this is the correct SE for my question. –  Vorac Oct 26 '12 at 11:08
    
"ARCH=x86_64 ./configure" seems to work - everithing builds. However, configure still displays x86 (generic), so I'm leaving the question open. –  Vorac Oct 26 '12 at 13:04

1 Answer 1

So you want to build a 64bit version of ffmpeg? Are you sure your compiler isn't making 64bit binaries by default anyway? If it's not, the usual thing to do is to edit your CFLAGS, CXXFLAGS and LDFLAGS.

You'd probably use something like this:-

CFLAGS="-m64 -O3 -fPIC"  CXXFLAGS="$CFLAGS" LDFLAGS="-melf_x86_64 -O3" ../ffmpeg/configure --enable-static

It's always worth checking the other options available in 'configure --help'. ffmpeg has a LOT of optional dependencies, some of which you will probably want to enable.

The other way to target a specific architecture and platform is to use the --host, --target and --build configure flags. These are standard autotools flags. I always get them mixed up, but a concise explanation of them can be found on linuxforums.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.