Hello,
I'm using a cross-compile script, which uses Cygwin, MingW, GCC and NASM, to compile x264 and FFmpeg among other libraries.
I've always used Cygwin's NASM ("NASM version 2.10.05 compiled on Sep 11 2012"), untill not so long ago x264 changed to minimum required version of NASM to v2.13. I've successfully compiled NASM 2.13.02 myself by doing a simple ./configure and make, and with it I've successfully compiled x264.
Next I wanted to replace it for Cygwin's NASM to compile all other libraries with the latest NASM as well.
The following is an excerpt from FFmpeg's '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
No problem at all as you can see.
When I use NASM 2.13.02 however I'm getting:
/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'
It somehow can't open Cygwin paths... How is this possible? Is this something I forgot while compiling NASM 2.13.02?
NASM's 'configure' did warn me about:
checking for asciidoc... no
checking for xmlto... no
configure: WARNING: No asciidoc package found
configure: WARNING: No xmlto package found
but I don't know if those are important for this.