Wireshark-dev: Re: [Wireshark-dev] MSVC build errors

From: Gerald Combs <gerald@xxxxxxxxxxxxx>
Date: Tue, 9 Mar 2021 14:11:46 -0800
Spandsp defines its own inline versions of lrint and lrintf in include/spandsp/fast_convert.h if _M_IX86 or _M_X64 are defined. Whether they're intrinsic or not, this shouldn't be necessary in modern versions of Visual C++:

https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/lrint-lrintf-lrintl-llrint-llrintf-llrintl?view=msvc-140

It should be possible to fix this with #ifdefs in fast_convert.h. I'll try to do so in a bit.


BTW, it looks like libavcodec supports all of the codecs we use:

http://git.videolan.org/?p=ffmpeg.git;a=tree;f=libavcodec/libavcodec;h=d0d02fd4e4578324c507783fc33655b3a6c6bf91;hb=HEAD

Should we look at using it instead of SBC, spandsp, BCG729, iLBC, Opus, etc?

On 3/9/21 12:25 PM, Graham Bloice wrote:
Noted on my Build VM last night and now visible on the Windows buildbots, presumably due to a compiler update:

C:\buildbot\builders\wireshark-master-vs-eca\wireshark-win64-libs\spandsp-0.0.6-win64ws\include\spandsp/fast_convert.h(320,5): error C2169: 'lrint': intrinsic function, cannot be defined (compiling source file C:\buildbot\builders\wireshark-master-vs-eca\vscodeanalysis\build\plugins\codecs\G722\G722decode.c) [C:\buildbot\builders\wireshark-master-vs-eca\vscodeanalysis\build\cmbuild\plugins\codecs\G722\g722.vcxproj] C:\buildbot\builders\wireshark-master-vs-eca\wireshark-win64-libs\spandsp-0.0.6-win64ws\include\spandsp/fast_convert.h(325,5): error C2169: 'lrintf': intrinsic function, cannot be defined (compiling source file C:\buildbot\builders\wireshark-master-vs-eca\vscodeanalysis\build\plugins\codecs\G722\G722decode.c)

I'm unable to find these functions listed in the VS compiler intrinsics though, so I'm not sure what's going on.

--
Graham Bloice

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe