[Live-devel] compilation issue / vcpkg / windows

g.jaegy g.jaegy at imagine3d.fr
Fri Feb 4 01:58:42 PST 2022


While trying to build live555 through vcpkg (VS packet mananager), I get an error as the initial source tar.gz file had changed. I reported the issue to MS, they fixed the download link, however, with the latest release a compilation error occurs:

https://github.com/microsoft/vcpkg/compare/master...BillyONeal:live555?expand=1

C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1430~1.307\bin\Hostx64\x86\cl.exe   /TP -DNO_GETIFADDRS -IC:\Dev\vcpkg\buildtrees\live555\src\live-85d964aaa1.clean\BasicUsageEnvironment\include -IC:\Dev\vcpkg\buildtrees\live555\src\live-85d964aaa1.clean\groupsock\include -IC:\Dev\vcpkg\buildtrees\live555\src\live-85d964aaa1.clean\liveMedia\include -IC:\Dev\vcpkg\buildtrees\live555\src\live-85d964aaa1.clean\UsageEnvironment\include -IC:\Dev\vcpkg\installed\x86-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\MultiFramedRTPSink.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c C:\Dev\vcpkg\buildtrees\live555\src\live-85d964aaa1.clean\liveMedia\MultiFramedRTPSink.cpp
C:\Dev\vcpkg\buildtrees\live555\src\live-85d964aaa1.clean\liveMedia\MultiFramedRTPSink.cpp(377): error C2131: expression did not evaluate to a constant
C:\Dev\vcpkg\buildtrees\live555\src\live-85d964aaa1.clean\liveMedia\MultiFramedRTPSink.cpp(377): note: failure was caused by a read of a variable outside its lifetime
C:\Dev\vcpkg\buildtrees\live555\src\live-85d964aaa1.clean\liveMedia\MultiFramedRTPSink.cpp(377): note: see usage of 'this'

Upstream accidentally stepped on trying to use C99 VLAs; fOutBuf->curPacketSize() is not a constant.

	// Hack: Because the MKI + authentication tag at the end of the packet would
	// overwrite any following (still to be sent) frame data, we can't encrypt/tag
	// the packet in place.  Instead, we have to make a copy (on the stack) of
	// the packet, before encrypting/tagging/sending it:
	u_int8_t packet[fOutBuf->curPacketSize() + SRTP_MKI_LENGTH + SRTP_AUTH_TAG_LENGTH];
	memcpy(packet, fOutBuf->packet(), fOutBuf->curPacketSize());
	unsigned newPacketSize;

Cheers,

Grégory Jaegy
 




More information about the live-devel mailing list