[FFmpeg-user] Can't use latest NASM with FFmpeg?

Reino Wijnsma rwijnsma at xs4all.nl
Tue Jan 2 18:11:02 EET 2018


Hello,

Since compiling x264.git requires NASM 2.13 now, I thought; let's try to use it to compile FFmpeg as well.
The FFmpeg builds I made this far used Cygwin's NASM. Here's an excerpt from 'ffbuild/config.log':

/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_WIN32_WINNT=0x0600 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=pentium3 -O2 -mfpmath=sse -msse -DCACA_STATIC -DLIBTWOLAME_STATIC -march=pentium3 -O2 -mfpmath=sse -msse -std=c11 -fomit-frame-pointer -c -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.c
nasm -v
NASM version 2.10.05 compiled on Sep 11 2012
check_x86asm movbe ecx, [5]
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
    1    movbe ecx, [5]
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
nasm -Werror -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
check_x86asm vmovdqa32 [eax]{k1}{z}, zmm0
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
    1    vmovdqa32 [eax]{k1}{z}, zmm0
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
nasm -f win32 -DPREFIX -Werror -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
/cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S:1: error: parser: instruction expected
check_x86asm vextracti128 xmm0, ymm0, 0
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
    1    vextracti128 xmm0, ymm0, 0
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
nasm -f win32 -DPREFIX -Werror -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
check_x86asm vpmacsdd xmm0, xmm1, xmm2, xmm3
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
    1    vpmacsdd xmm0, xmm1, xmm2, xmm3
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
nasm -f win32 -DPREFIX -Werror -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
check_x86asm vfmaddps ymm0, ymm1, ymm2, ymm3
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
    1    vfmaddps ymm0, ymm1, ymm2, ymm3
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
nasm -f win32 -DPREFIX -Werror -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
check_x86asm CPU amdnop
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
    1    CPU amdnop
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
nasm -f win32 -DPREFIX -Werror -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S
/cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.NvmIZN9O/test.S:1: error: unknown 'cpu' type
check_code cc arm_neon.h int16x8_t test = vdupq_n_s16(0)
check_cc
----------------------------------------------------------------

No problem whatsoever. When I try to use NASM's latest version however:

/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_WIN32_WINNT=0x0600 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=pentium3 -O2 -mfpmath=sse -msse -DCACA_STATIC -DLIBTWOLAME_STATIC -march=pentium3 -O2 -mfpmath=sse -msse -std=c11 -fomit-frame-pointer -c -o /cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/ffconf.Zrz2Fm8R/test.o /cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/ffconf.Zrz2Fm8R/test.c
nasm -v
NASM version 2.13.02 compiled on Jan  2 2018
check_x86asm movbe ecx, [5]
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.S
    1    movbe ecx, [5]
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.S
nasm -Werror -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.S
nasm: fatal: unable to open output file `/cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.o'
nasm -v
NASM version 2.13.02 compiled on Jan  2 2018
check_x86asm movbe ecx, [5]
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.S
    1    movbe ecx, [5]
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.S
nasm -Werror -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.S
nasm: fatal: unable to open output file `/cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.o'
yasm -v
yasm: warning: unrecognized option `-v'
yasm: No input files specified
yasm --version
yasm 1.3.0
Compiled on Aug 11 2014.
Copyright (c) 2001-2014 Peter Johnson and other Yasm developers.
Run yasm --license for licensing overview and summary.
check_x86asm movbe ecx, [5]
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.S
    1    movbe ecx, [5]
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.S
yasm -Werror -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.Zrz2Fm8R/test.S
: error: warnings being treated as errors
----------------------------------------------------------------

Luckily it then uses YASM instead, but can anyone explain what's going on, or what I'm doing wrong?

-- Reino



More information about the ffmpeg-user mailing list