Building libav 1.6.0 on the Jetson TX1 for gsteamer

Hi,

i’m struggling with building libav 1.6.0 for gstreamer natively on the Jetson board.

I use:
autogen.sh
make
and see the error:

CC libavformat/a64.o
In file included from ./libavutil/bswap.h:38:0,
from ./libavutil/intreadwrite.h:25,
from ./libavcodec/bytestream.h:31,
from libavformat/a64.c:23:
libavformat/a64.c: In function ‘a64_write_header’:
./libavutil/aarch64/bswap.h:38:5: error: invalid ‘asm’: invalid operand for code ‘w’
asm(“rev %w0, %w0” : “+r”(x));
^
./libavutil/aarch64/bswap.h:38:5: error: invalid ‘asm’: invalid operand for code ‘w’
./libavutil/aarch64/bswap.h:38:5: error: invalid ‘asm’: invalid operand for code ‘w’
asm(“rev %w0, %w0” : “+r”(x));
^
./libavutil/aarch64/bswap.h:38:5: error: invalid ‘asm’: invalid operand for code ‘w’
make[5]: *** [libavformat/a64.o] Error 1

Does anyone know why the makefile built by configure isn’t correct?

Thanks in advance.

Ok. I have the answer myself.
The problem is that the linux kernel is 64 Bit ARM and the Userland is 32Bit ARM.
configure thinks it has a 64Bit system and so the compiler for 32 Bit coughs over the attempt to compile code for 64Bit.

So what changes did you make to adjust for it?

If you tell configure not to use aarch64 it will do the right thing:

./configure --host=arm-linux-gnu

Hope it helps!