Building libvpx under Windows 7 - yasm error

4.1k views Asked by At

I am building libvpx under 64 bit Windows 7 (but want to target build for win32 platform), following the instructions here:

http://www.webmproject.org/code/build-prerequisites/

I am doing this using Mingw, and using yasm 1.1.0.

I am mostly through all the processes, and that resulted in creating all project and solution files for MSVS 2010.

When I open the solution in MSVS 2010, libvpx is unable to build (and all other projects rely on this), giving me following error:

Error   1   error MSB3721: The command "yasm -Xvc -f Win32 -I .;..\libvpx-v1.2.0 -o Win32\Release\vpx\dct_mmx.obj -rnasm -pnasm   "..\libvpx-v1.2.0\vp8\encoder\x86\dct_mmx.asm"" exited with code 1.   D:\libvpx-v1.2.0\build\x86-msvs\yasm.targets    45  6   vpx

Searching on SO and other sites give me something similar, like:

http://code.google.com/p/webrtc/issues/detail?id=197

But from what I understand, it is related to webrtc, and the OP is probably building yasm as well, which is different from my case - I am not building yasm, and have it downloaded from its site.

Briefly, following steps produces this problem on my side:

  • install MingW
  • make sure MingW/bin is in system path
  • download yasm (general use executable)
  • copy yasm-1.1.0-win32.exe to MingW/bin directory
  • rename yasm-1.1.0-win32.exe to yasm.exe
  • open command prompt, and make sure I am not in Mingw/bin directory, and type yasm
  • it responds with: yasm: No input files specified, so I am sure yasm.exe is being located from other directories
  • follow all steps from http://www.webmproject.org/code/build-prerequisites/
  • reach till Build the VS Projects
  • run make
  • make sure all project and .sln files are generated
  • open .sln file in MSVS 2010 (needs converting from 2008 to 2010, and conversion process is flawless)
  • Build solution - it fails (but builds obj_int_extract giving me obj_int_extract.exe file )
  • then try to build only vpx project, giving me above mentioned error related to yasm

Now since I am not building yasm, and only relying on yasm.exe, I shouldn't be getting this error, right? Also for same reason, I really don't care if x86insn_gas.gperf or x86insn_nasm.gperf is there or not - please correct me if I am wrong.

Has anyone faced this issue, and can guide me better?

For reference, output from make command shows nothing strange in a view, here it is:

$ make
    [CREATE] obj_int_extract.vcproj
generating filter 'Source Files' from 1 files
generating filter 'Header Files' from 0 files
generating filter 'Resource Files' from 0 files
generating filter 'Build Files' from 0 files
Ignored files list (0 items) is:
    [CREATE] vpx.def
    [CREATE] vpx_config.asm
    [CREATE] vpx_rtcd.h
    [CREATE] vpx.vcproj
generating filter 'Source Files' from 223 files
generating filter 'Header Files' from 97 files
generating filter 'Resource Files' from 12 files
generating filter 'Build Files' from 12 files
Ignored files list (4 items) is:
    ../libvpx-v1.2.0/CHANGELOG
    ../libvpx-v1.2.0/vp8/common/rtcd_defs.sh
    ../libvpx-v1.2.0/build/make/version.sh
    ../libvpx-v1.2.0/build/make/rtcd.sh
    [CREATE] gtest.vcproj
generating filter 'Source Files' from 1 files
generating filter 'Header Files' from 0 files
generating filter 'Resource Files' from 0 files
generating filter 'Build Files' from 0 files
Ignored files list (0 items) is:
    [CREATE] test_libvpx.vcproj
generating filter 'Source Files' from 31 files
generating filter 'Header Files' from 10 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [vcproj] vpxdec.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=vpxdec --ver=8 --proj-guid=BA5FE66F-38DD-E034-F542-B1578C5FB950 --static-crt --
out=vpxdec.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp8  -I. -I"../libvp
x-v1.2.0" -L.  -lvpxmt -lwinmm ../libvpx-v1.2.0/md5_utils.c ../libvpx-v1.2.0/md5
_utils.h ../libvpx-v1.2.0/vpx_ports/vpx_timer.h ../libvpx-v1.2.0/vpx/vpx_integer
.h ../libvpx-v1.2.0/args.c ../libvpx-v1.2.0/args.h ../libvpx-v1.2.0/tools_common
.c ../libvpx-v1.2.0/tools_common.h ../libvpx-v1.2.0/nestegg/halloc/halloc.h ../l
ibvpx-v1.2.0/nestegg/halloc/src/align.h ../libvpx-v1.2.0/nestegg/halloc/src/hall
oc.c ../libvpx-v1.2.0/nestegg/halloc/src/hlist.h ../libvpx-v1.2.0/nestegg/halloc
/src/macros.h ../libvpx-v1.2.0/nestegg/include/nestegg/nestegg.h ../libvpx-v1.2.
0/nestegg/src/nestegg.c ../libvpx-v1.2.0/vpxdec.c ../libvpx-v1.2.0/examples.mk
generating filter 'Source Files' from 17 files
generating filter 'Header Files' from 11 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [vcproj] vpxenc.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=vpxenc --ver=8 --proj-guid=548DEC74-7A15-4B2B-AFC3-AA102E7C25C1 --static-crt --
out=vpxenc.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp8  -I. -I"../libvp
x-v1.2.0" -L.  -lvpxmt -lwinmm ../libvpx-v1.2.0/args.c ../libvpx-v1.2.0/args.h .
./libvpx-v1.2.0/y4minput.c ../libvpx-v1.2.0/y4minput.h ../libvpx-v1.2.0/tools_co
mmon.c ../libvpx-v1.2.0/tools_common.h ../libvpx-v1.2.0/vpx_ports/mem_ops.h ../l
ibvpx-v1.2.0/vpx_ports/mem_ops_aligned.h ../libvpx-v1.2.0/vpx_ports/vpx_timer.h
../libvpx-v1.2.0/libmkv/EbmlIDs.h ../libvpx-v1.2.0/libmkv/EbmlWriter.c ../libvpx
-v1.2.0/libmkv/EbmlWriter.h ../libvpx-v1.2.0/vpxenc.c ../libvpx-v1.2.0/examples.
mk
generating filter 'Source Files' from 14 files
generating filter 'Header Files' from 9 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [vcproj] vp8_scalable_patterns.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=vp8_scalable_patterns --ver=8 --proj-guid=0D6A210B-F482-4D6F-8570-4A9C01ACC88C
--static-crt --out=vp8_scalable_patterns.vcproj -I../libvpx-v1.2.0/vp8 -I../libv
px-v1.2.0/vp8  -I. -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm ../libvpx-v1.2.0/vp
8_scalable_patterns.c ../libvpx-v1.2.0/examples.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] simple_decoder.c
    [vcproj] simple_decoder.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=simple_decoder --ver=8 --proj-guid=D3BBF1E9-2427-450D-BBFF-B2843C1D44CC --stati
c-crt --out=simple_decoder.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp8
 -I. -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm simple_decoder.c ../libvpx-v1.2.0
/examples.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] postproc.c
    [vcproj] postproc.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=postproc --ver=8 --proj-guid=65E33355-F35E-4088-884D-3FD4905881D7 --static-crt
--out=postproc.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp8  -I. -I"../l
ibvpx-v1.2.0" -L.  -lvpxmt -lwinmm postproc.c ../libvpx-v1.2.0/examples.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] decode_to_md5.c
    [vcproj] decode_to_md5.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=decode_to_md5 --ver=8 --proj-guid=59120B9B-2735-4BFE-B022-146CA340FE42 --static
-crt --out=decode_to_md5.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp8  -
I. -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm ../libvpx-v1.2.0/md5_utils.h ../lib
vpx-v1.2.0/md5_utils.c decode_to_md5.c ../libvpx-v1.2.0/examples.mk
generating filter 'Source Files' from 4 files
generating filter 'Header Files' from 2 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] simple_encoder.c
    [vcproj] simple_encoder.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=simple_encoder --ver=8 --proj-guid=4607D299-8A71-4D2C-9B1D-071899B6FBFD --stati
c-crt --out=simple_encoder.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp8
 -I. -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm simple_encoder.c ../libvpx-v1.2.0
/examples.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] twopass_encoder.c
    [vcproj] twopass_encoder.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=twopass_encoder --ver=8 --proj-guid=73494FA6-4AF9-4763-8FBB-265C92402FD8 --stat
ic-crt --out=twopass_encoder.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp
8  -I. -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm twopass_encoder.c ../libvpx-v1.
2.0/examples.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] force_keyframe.c
    [vcproj] force_keyframe.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=force_keyframe --ver=8 --proj-guid=3C67CADF-029F-4C86-81F5-D6D4F51177F0 --stati
c-crt --out=force_keyframe.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp8
 -I. -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm force_keyframe.c ../libvpx-v1.2.0
/examples.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] decode_with_drops.c
    [vcproj] decode_with_drops.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=decode_with_drops --ver=8 --proj-guid=CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26 --st
atic-crt --out=decode_with_drops.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.
0/vp8  -I. -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm decode_with_drops.c ../libv
px-v1.2.0/examples.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] error_resilient.c
    [vcproj] error_resilient.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=error_resilient --ver=8 --proj-guid=DF5837B9-4145-4F92-A031-44E4F832E00C --stat
ic-crt --out=error_resilient.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp
8  -I. -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm error_resilient.c ../libvpx-v1.
2.0/examples.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] vp8_set_maps.c
    [vcproj] vp8_set_maps.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=vp8_set_maps --ver=8 --proj-guid=ECB2D24D-98B8-4015-A465-A4AF3DCC145F --static-
crt --out=vp8_set_maps.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp8  -I.
 -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm vp8_set_maps.c ../libvpx-v1.2.0/examp
les.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
    [EXAMPLE] vp8cx_set_ref.c
    [vcproj] vp8cx_set_ref.vcproj
../libvpx-v1.2.0/build/make/gen_msvs_proj.sh --exe --target=x86-win32-vs8 --name
=vp8cx_set_ref --ver=8 --proj-guid=C5E31F7F-96F6-48BD-BD3E-10EBF6E8057A --static
-crt --out=vp8cx_set_ref.vcproj -I../libvpx-v1.2.0/vp8 -I../libvpx-v1.2.0/vp8  -
I. -I"../libvpx-v1.2.0" -L.  -lvpxmt -lwinmm vp8cx_set_ref.c ../libvpx-v1.2.0/ex
amples.mk
generating filter 'Source Files' from 2 files
generating filter 'Header Files' from 1 files
generating filter 'Resource Files' from 1 files
generating filter 'Build Files' from 1 files
Ignored files list (0 items) is:
make[1]: Nothing to be done for `all'.
    [CREATE] vpx.sln
../libvpx-v1.2.0/build/make/gen_msvs_sln.sh \
             --dep=decode_to_md5:vpx  --dep=decode_with_drops:vpx  --dep=error_r
esilient:vpx  --dep=force_keyframe:vpx  --dep=postproc:vpx  --dep=simple_decoder
:vpx  --dep=simple_encoder:vpx  --dep=test_libvpx:vpx  --dep=twopass_encoder:vpx
  --dep=vp8_scalable_patterns:vpx  --dep=vp8_set_maps:vpx  --dep=vp8cx_set_ref:v
px  --dep=vpxdec:vpx  --dep=vpxenc:vpx \
            --dep=vpx:obj_int_extract \
            --dep=test_libvpx:gtest \
            --ver=8\
            --out=vpx.sln decode_to_md5.vcproj decode_with_drops.vcproj error_re
silient.vcproj force_keyframe.vcproj gtest.vcproj obj_int_extract.vcproj postpro
c.vcproj simple_decoder.vcproj simple_encoder.vcproj test_libvpx.vcproj twopass_
encoder.vcproj vp8_scalable_patterns.vcproj vp8_set_maps.vcproj vp8cx_set_ref.vc
proj vpx.vcproj vpxdec.vcproj vpxenc.vcproj
  * devenv.com not found in path.
  *
  * You will have to build all configurations manually using the
  * Visual Studio IDE. To allow make to build them automatically,
  * add the Common7/IDE directory of your Visual Studio
  * installation to your path, eg:
  *   C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
  *
  * Skipping build of Debug|Win32 (devenv.com not in path).
  *
  * Skipping build of Release|Win32 (devenv.com not in path).
  *

Edit: I put MSVS IDE path to system path, and run make command again, this time, above warning is not displayed, rather, I get few more warnings (related to MSBuild):

Due to character (30k) limitation, mentioning concerned bit only:

3>------ Build started: Project: vpx, Configuration: Debug Win32 ------
3>  asm_com_offsets.c
3>  asm_dec_offsets.c
3>  asm_enc_offsets.c
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1
151,5): warning MSB8012: TargetPath(d:\libvpx-v1.2.0-
build\Win32\Debug\gtest.lib) does not match the Library's OutputFile property va
lue (d:\libvpx-v1.2.0-build\Win32\Debug\gtestmtd.lib)
. This may cause your project to build incorrectly. To correct this, please make
 sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the v
alue specified in %(Lib.OutputFile).
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1
153,5): warning MSB8012: TargetName(gtest) does not match the Library's OutputFi
le property value (gtestmtd). This may cause your project to build incorrectly.
To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt)
 property values match the value specified in %(Lib.OutputFile).

When compiled by MSVS 2010, I get:

1>------ Build started: Project: vpx, Configuration: Debug Win32 ------
1>  asm_com_offsets.c
1>  asm_dec_offsets.c
1>  asm_enc_offsets.c
1>  Assembling emms.asm
1>  Assembling x86_abi_support.asm
1>  Assembling dequantize_mmx.asm
1>  Assembling idctllm_mmx.asm
1>  Assembling iwalsh_mmx.asm
1>  Assembling loopfilter_mmx.asm
1>  Assembling recon_mmx.asm
1>  Assembling sad_mmx.asm
1>  Assembling subpixel_mmx.asm
1>  Assembling variance_impl_mmx.asm
1>  Assembling idctllm_sse2.asm
1>  Assembling recon_sse2.asm
1>  Assembling sad_sse2.asm
1>  Assembling subpixel_sse2.asm
1>  Assembling loopfilter_sse2.asm
1>  Assembling iwalsh_sse2.asm
1>  Assembling variance_impl_sse2.asm
1>  Assembling sad_sse3.asm
1>  Assembling sad_ssse3.asm
1>  Assembling subpixel_ssse3.asm
1>  Assembling variance_impl_ssse3.asm
1>  Assembling sad_sse4.asm
1>  Assembling postproc_mmx.asm
1>  Assembling mfqe_sse2.asm
1>  Assembling postproc_sse2.asm
1>  Assembling dct_mmx.asm
1>  Assembling subtract_mmx.asm
1>  Assembling dct_sse2.asm
1>  Assembling fwalsh_sse2.asm
1>  Assembling quantize_sse2.asm
1>  Assembling subtract_sse2.asm
1>  Assembling temporal_filter_apply_sse2.asm
1>  Assembling quantize_ssse3.asm
1>  Assembling quantize_sse4.asm
1>  Assembling quantize_mmx.asm
1>  Assembling encodeopt.asm
1>  Assembling vpx_config.asm
1>D:\libvpx-v1.2.0\build\x86-msvs\yasm.targets(45,5): error MSB3721: The command "yasm -Xvc -f Win32 -g cv8 -I .;..\libvpx-v1.2.0 -o Win32\Debug\vpx\emms.obj -rnasm -pnasm   "..\libvpx-v1.2.0\vpx_ports\emms.asm"" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Hope to find the solution soon

Thanks for your time!

Edit2 (20-12-2013): Ok, as per suggestion by Michael, I tried to do this with cygwin (MingW might be treating ; differently), but came across some errors:

...initial process without any errors...
...
...
make[1]: Nothing to be done for 'all'.
    [CREATE] vpx.sln
../libvpx-v1.2.0/build/make/gen_msvs_sln.sh \
             --dep=twopass_encoder:vpx  --dep=postproc:vpx  --dep=decode_to_md5:vpx  --dep=vp8cx_set_ref:vpx  --dep=vpxenc:vpx  --dep=force_keyframe:vpx  --dep=test_libvpx:vpx  --dep=error_resilient:vpx  --dep=simple_decoder:vpx  --dep=decode_with_drops:vpx  --dep=vpxdec:vpx  --dep=vp8_scalable_patterns:vpx  --dep=vp8_set_maps:vpx  --dep=simple_encoder:vpx \
            --dep=vpx:obj_int_extract \
            --dep=test_libvpx:gtest \
            --ver=8\
            --out=vpx.sln twopass_encoder.vcproj gtest.vcproj postproc.vcproj decode_to_md5.vcproj vp8cx_set_ref.vcproj vpxenc.vcproj force_keyframe.vcproj test_libvpx.vcproj vpx.vcproj error_resilient.vcproj simple_decoder.vcproj decode_with_drops.vcproj vpxdec.vcproj obj_int_extract.vcproj vp8_scalable_patterns.vcproj vp8_set_maps.vcproj simple_encoder.vcproj
gen_msvs_sln.sh: Unknown GUID for obj_int_extract (dependency of vpx)
make[1]: *** No rule to make target 'vpx.sln', needed by '.projects'.  Stop.
Makefile:17: recipe for target '.DEFAULT' failed
make: *** [.DEFAULT] Error 2

Any suggestion regarding cygwin?

0

There are 0 answers