Trying to compile the x264 library (x264-snapshot-20120805-2245-stable) for the ARM926 in my LG NAS. Running ./configure seems to give a binary which won’t link with ffmpeg. Config.log in ffmpeg gives the following errors:
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d26′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d22′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d2′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d20′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d24′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d0′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `q1′
collect2: ld returned 1 exit status
ERROR: libx264 not found
Here’s some random notes I used to make it work:
The .configure for x264 seems to default to cortex9 w/ Neon FPU… not present in my LGNAS. Run configure with the following options:
./configure –disable-neon –enable-gpl –prefix=/usr –enable-static –enable-shared –disable-asm
As a result I hand edited the config.mak as follows:
ARCH=ARM
MYCPU=arm926ej-s
SYS=LINUX
CC=gcc
CFLAGS=-Wshadow -O3 -fno-fast-math -Wall -I. -I$(SRCPATH) -std=gnu99 -mcpu=${MYCPU} -mtune=${MYCPU} -fPIC -fomit-frame-pointer -fno-tree-vectorize
Where did I get arm926ej-s ? cat /proc/cpuinfo
According to this post; the LGNAS CPU (Marvell “Kirkwood”) does not have VFP support (would be listed as vfp
under “Features” in cpuinfo) therefore do not specify a -mfpu= in the CFLAGS.
Do ‘make’; do ‘make install-lib-shared’.
In ffmpeg; pass the following configure command:
./configure –enable-gpl –enable-libx264 –enable-libfaac –enable-nonfree –enable-libxvid –prefix=/usr –disable-stripping –disable-armv6 –disable-altivec –disable-vis –enable-shared –disable-static
Did the same edit to ffmpeg’s config.mak as done in x264 config.mak.