-1

I'm trying to install FFMPEG to Kali Linux 2.0 So far I've been trying to use the following commands:

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure
make
make install

However when I try and make it I get the following errors:

Screenshot

libavcodec/x86/imdct36.asm:393: error: operation size not specified
library.mak:30: recipe for target 'libavcodec/x86/imdct36.o' failed
make: *** [libavcodec/x86/imdct36.o] Error 1

I'm really stumped as how to resolve this as my skill are only moderate...

tripleee
  • 175,061
  • 34
  • 275
  • 318
NeMesiS
  • 59
  • 1
  • 5
  • 3
    your screen shot is illegible and it considered bad form on S.O. to include such items when a plain copy/paste from your terminal into your Q will make for something that is readable AND searchable (experts look for certain phrases and use their browser's search feature). Please edit you Q with plain text of your problem, use the `{}` tool at the top left of edit box on highlighted text to keep proper formatting for code/data/errMsgs/etc. Good luck. – shellter Apr 26 '16 at 04:04
  • Thanks, I hope now it's acceptable. – NeMesiS Apr 26 '16 at 04:19
  • 2
    The dupe flag on this question is very misleading. – MetaFight Sep 03 '16 at 09:50

2 Answers2

2

I came across the answer just by chance, but I needed to install YASM before compiling...

apt-get install yasm
NeMesiS
  • 59
  • 1
  • 5
  • 2
    the configure script tests for the presence of yasm, and if it isn't there but nasm is, it'll set the Makefiles to use nasm. but the assembly language obviously isn't acceptable to nasm. – jcomeau_ictx Dec 06 '16 at 15:52
0

this particular problem took a lot of tracking down, due to the large numbers of macros in the source. line 393 reads:

DEFINE_IMDCT

and looking for that macro, we find it at line 179. but it has numerous instructions in it, and conditionals, and any one of those could be the culprit. so first what we do is make V=1 to turn on verbose (normal) GNU make output. then we see:

jcomeau@aspire:~/rentacoder/jcomeau/floureon/ffmpeg$ nasm -f elf -DPIC -g -F dwarf -I./ -I.// -Pconfig.asm -I libavcodec/x86/ -o libavcodec/x86/imdct36.o libavcodec/x86/imdct36.asm

we change that to:

jcomeau@aspire:~/rentacoder/jcomeau/floureon/ffmpeg$ nasm -l /tmp/imdct36.lst -f elf -DPIC -g -F dwarf -I./ -I.// -Pconfig.asm -I libavcodec/x86/ -o libavcodec/x86/imdct36.o libavcodec/x86/imdct36.asm

to get a listing file. looking into the listing for the operation size not specified error, we find it at line 102741, at level <4> of the macro expansion. scrolling up, we find the level 2 instruction at line 102668 as extractps [%3 + %4], %1, 1 and the level 1 instruction at line 102583, STORE m6, m7, outq + 16*SBLIMIT, 4*SBLIMIT.

so we go back to libavcodec/x86/imdct36.asm, search for STORE, and find it at line 145. sure enough, we find 3 extractps instructions under it:

extractps [%3 +   %4], %1, 1
extractps [%3 + 2*%4], %1, 2
extractps [%3 + 3*%4], %1, 3

we change them to:

extractps dword [%3 +   %4], %1, 1
extractps dword [%3 + 2*%4], %1, 2
extractps dword [%3 + 3*%4], %1, 3

assuming 32-bit operands. and sure enough, it finishes the build after that, without having to install yasm.

how do I know it shouldn't be qword instead? I don't, but it doesn't make sense, since extractps only uses 32 bit destinations: "Extract a single-precision floating-point value from xmm2 at the source offset specified by imm8 and store the result to reg or m32. The upper 32 bits of r64 is zeroed if reg is r64." (http://www.felixcloutier.com/x86/EXTRACTPS.html).

jcomeau_ictx
  • 37,688
  • 6
  • 92
  • 107