我正在 64 位 Windows 7 下构建 libvpx(但希望针对 win32 平台构建),按照此处的说明进行操作:
http://www.webmproject.org/code/build-prerequisites/
我正在使用 Mingw 并使用 yasm 1.1.0 执行此操作。
我主要完成了所有流程,这导致为 MSVS 2010 创建了所有项目和解决方案文件。
当我在 MSVS 2010 中打开解决方案时,libvpx 无法构建(所有其他项目都依赖于此),出现以下错误:
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
在 SO 和其他网站上搜索给了我类似的东西,比如:
http://code.google.com/p/webrtc/issues/detail?id=197
但据我了解,它与 webrtc 有关,并且 OP 可能也在构建 yasm,这与我的情况不同 - 我不是在构建 yasm,而是从其网站下载。
简而言之,以下步骤会在我这边产生这个问题:
- 安装明威
- 确保 MingW/bin 在系统路径中
- 下载yasm(通用可执行文件)
- 复制 yasm-1.1.0-win32.exe 到 MingW/bin 目录
- 将 yasm-1.1.0-win32.exe 重命名为 yasm.exe
- 打开命令提示符,确保我不在 Mingw/bin 目录中,然后输入 yasm
- 它响应: yasm: 没有指定输入文件,所以我确信 yasm.exe 是从其他目录中找到的
- 遵循http://www.webmproject.org/code/build-prerequisites/中的所有步骤
- 直到构建 VS 项目
- 运行制作
- 确保生成所有项目和 .sln 文件
- 在 MSVS 2010 中打开 .sln 文件(需要从 2008 转换到 2010,并且转换过程完美无缺)
- 构建解决方案 - 它失败(但构建 obj_int_extract 给我 obj_int_extract.exe 文件)
- 然后尝试只构建 vpx 项目,给我上面提到的与 yasm 相关的错误
现在,由于我没有构建 yasm,而仅依赖 yasm.exe,所以我不应该收到此错误,对吧?同样出于同样的原因,我真的不在乎 x86insn_gas.gperf 或 x86insn_nasm.gperf 是否存在 - 如果我错了,请纠正我。
有没有人遇到过这个问题,可以更好地指导我吗?
作为参考,make 命令的输出在视图中没有显示什么奇怪的东西,这里是:
$ 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).
*
编辑:我把 MSVS IDE 路径放到系统路径,然后再次运行 make 命令,这一次,上面的警告没有显示,相反,我得到了更多的警告(与 MSBuild 相关):
由于字符(30k)限制,仅提及相关位:
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).
当由 MSVS 2010 编译时,我得到:
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 ==========
希望尽快找到解决办法
谢谢你的时间!
Edit2 (20-12-2013): 好的,根据 Michael 的建议,我尝试使用 cygwin 执行此操作(MingW 可能会处理 ; 不同),但遇到了一些错误:
...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
关于cygwin有什么建议吗?