Building libvpx with Visual Studio 2015 on Windows 10 using Bash

3.4k Views Asked by At

I've found a bug in libvpx which is impeding my use of alpha in videos. I've fixed the bug but it means I must rebuild libvpx (the prior build is lost in the mists of time except for the headers and libraries). I've fetched version 1.6.1 and followed the instructions here https://github.com/webmproject/libvpx, generating the Visual Studio 2015 solution using this command line in Bash on Windows 10:

configure --target=x86_64-win64-vs14 --as=auto --enable-vp9-highbitdepth --enable-vp8 --enable-vp9 --enable-error-concealment --enable-runtime-cpu-detect --enable-libyuv

Everything looks fine: I've opened the solution in Visual Studio 2015 and attempted to build the vpx project, which has yielded many object files and assembled assembly sources, but ultimately I get the following error:

LINK : fatal error LNK1181: cannot open input file 'x64\Debug\vpx\vpx_ports_emms_asm.obj'

There is no source file with this name, so there is no corresponding obj file. Looking through the project, there are a number of .mk files one of which has the name vpx_ports and contains the following text:

PORTS_SRCS-yes += vpx_ports.mk

PORTS_SRCS-yes += bitops.h
PORTS_SRCS-yes += mem.h
PORTS_SRCS-yes += msvc.h
PORTS_SRCS-yes += system_state.h
PORTS_SRCS-yes += vpx_timer.h

ifeq ($(ARCH_X86)$(ARCH_X86_64),yes)
PORTS_SRCS-yes += emms.asm
PORTS_SRCS-yes += x86.h
PORTS_SRCS-yes += x86_abi_support.asm
endif

PORTS_SRCS-$(ARCH_ARM) += arm_cpudetect.c
PORTS_SRCS-$(ARCH_ARM) += arm.h

This looks to me like some sort of makefile wizardry with which I am unfamiliar. There are no other vpx_ports_* files in the project. There ARE several other .mk files in the project.

Cygwin is recommended, and I tried using that rather than Bash on Windows but achieved the same result. Ultimately, I want to fix the bug and get on with my life. Any help is welcome, whether it's explaining to me how to resolve the linker bug or suggesting an alternative build mechanism.

[Edit 1]
Progress: the build script creates custom build commands for the asm files, such as

yasm -Xvc -g cv8 -f win64  -I"." -I".." "%(FullPath)" -o $(IntDir)vpx_ports_emms_asm.obj

However, -o specifies the output directory, not the output file name (despite what the documentation may say), in the latest version of yasm; the file was indeed successfully assembled to emms.obj. Sadly, there doesn't seem to be an option to specify the output filename.

1

There are 1 best solutions below

0
On

It turns out that I installed the wrong YASM. On the webmproject site, the build prerequisites warn against using the VS integrated version.