title: Building x264 with YASM: failing the ASM check
body: <p>My question up front is, &quot;I have new yasm, I think x264 is supposed to be cool with that, why is x264 not cool with that?&quot;</p>
  <p>For reasons, I am building a CentOS docker image (based on centos:latest) that contains a from-scratch ffmpeg build, following the guide <a href="https://trac.ffmpeg.org/wiki/CompilationGuide/Centos" rel="nofollow noreferrer">here</a>. It's a good guide, it's worked for me before, so I was feeling good about it.</p>
  <p>Today I'm hitting a choke point on the libx264 build point: specifically, I say</p>
  <pre><code>PKG_CONFIG_PATH=&quot;/tmp/ffmpeg_build/lib/pkgconfig&quot; \
    ./configure \
    --prefix=&quot;/tmp/ffmpeg_build&quot; \
    --bindir=&quot;/tmp/bin&quot; \
    --enable-static
  </code></pre>
  <p>And I get a reply back</p>
  <blockquote>
  <p>Found no assembler</p>
  <p>Minimum version is nasm-2.13</p>
  <p>If you really want to compile without asm, configure with --disable-asm.</p>
  </blockquote>
  <p>That's unexpected. I have yasm, which I understand to be 1) there to do the things nasm does but better, and 2) to be the daisy-fresh most modern version given that I pulled it from its repo about an hour ago, and built it about fifty-nine minutes ago. For what it's worth, nasm is on the box too since the instructions request it, but it's below their stated version (i.e. it's &quot;NASM version 2.10.07 compiled on Jun  9 2014&quot;)</p>
  <p>So it seems like yasm is not being found. There's another <a href="https://stackoverflow.com/questions/10492178/cannot-find-yasm-even-though-i-have-installed-it">StackExchange question</a> that mentions that problem, which came out to a pathing issue. So, I added yasm to my path like so:</p>
  <pre><code>PATH=/tmp/ffmpeg_sources/yasm:$PATH \
    PKG_CONFIG_PATH=&quot;/tmp/ffmpeg_build/lib/pkgconfig&quot; \
    ./configure
    ...etc
  </code></pre>
  <p>That still gave the Found-no-assembler problem. As a last, confused resort, I told the script explicitly what I wanted to use for the variable $AS, because based on my quick look into configure, that looked like where yasm/nasm was meant to go. The command becomes:</p>
  <pre><code>AS=`which yasm`
    PKG_CONFIG_PATH=&quot;/tmp/ffmpeg_build/lib/pkgconfig&quot; \
    ./configure
    ...etc
  </code></pre>
  <p>That at least gave</p>
  <blockquote>
  <p>Found yasm 1.3.0</p>
  <p>Minimum version is nasm-2.13</p>
  <p>If you really want to compile without asm, configure with --disable-asm.</p>
  </blockquote>
  <p>Looking in the config.log I see the following:</p>
  <pre><code>checking whether /tmp/bin/yasm supports vmovdqa32 [eax]{k1}{z}, zmm0... no
  Failed commandline was:
  --------------------------------------------------
  /tmp/bin/yasm conftest.asm  -I. -I$(SRCPATH) -DARCH_X86_64=1 -I$(SRCPATH)/common/x86/ -f elf64  -o conftest.o
  conftest.asm:1: error: instruction expected after label
  conftest.asm:1: warning: ignoring unrecognized character `{'
  conftest.asm:1: warning: ignoring unrecognized character `}'
  conftest.asm:1: warning: ignoring unrecognized character `{'
  conftest.asm:1: warning: ignoring unrecognized character `}'
  --------------------------------------------------
  Failed program was:
  --------------------------------------------------
  vmovdqa32 [eax]{k1}{z}, zmm0
  --------------------------------------------------
  </code></pre>
  <p>So: what's the deal here? Is my assumption that yasm drop-in replaces nasm bad? Is yasm good for this purpose, but I'm not providing the right information to ./configure? Are my instructions for building ffmpeg for CentOS simply out of date with respect to this prerequisite and I should just try harder to get a modern nasm?</p>