Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libvpx: fix Visual Studio 2022 build + modernize #9467

Merged
merged 8 commits into from
Mar 10, 2022

Conversation

SpaceIm
Copy link
Contributor

@SpaceIm SpaceIm commented Feb 21, 2022

closes #8319


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

SSE4
SSE4 previously approved these changes Feb 23, 2022
@conan-center-bot

This comment has been minimized.

uilianries
uilianries previously approved these changes Mar 2, 2022
Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@conan-center-bot conan-center-bot requested a review from danimtb March 4, 2022 12:00
@SpaceIm
Copy link
Contributor Author

SpaceIm commented Mar 5, 2022

Hidden issue for Visual Studio (seen in test package):

  vpx.lib(vpx_src_vpx_codec.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
  Generating code

Comes from https://github.com/webmproject/libvpx/blob/8a50f70ffc5eea6c2392a5c176bfe43e450ecebc/build/make/gen_msvs_vcxproj.sh#L351-L353 I guess.

@SpaceIm SpaceIm dismissed stale reviews from uilianries and SSE4 via c0f6328 March 5, 2022 16:17
@conan-center-bot

This comment has been minimized.

@SSE4 SSE4 mentioned this pull request Mar 5, 2022
4 tasks
@SpaceIm SpaceIm force-pushed the libvpx-modernize branch from c0f6328 to 543c646 Compare March 5, 2022 18:11
@SpaceIm
Copy link
Contributor Author

SpaceIm commented Mar 5, 2022

Ok, looks good regarding /GL now.

There is still a runtime inconsistency in msvc debug builds, and I think it's the reason of the failures in #9624:

test package:

LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\J\w\BuildSingleReference\conan-center-index\recipes\libvpx\all\test_package\build\c45eddeb0b50b45da9f2f699609cd9b99d14c863\test_package.vcxproj]

Indeed during libvpx build, here the compile command of one of the compilation units:

Configuration:
[settings]
arch=x86_64
build_type=Debug
compiler=Visual Studio
compiler.runtime=MTd
compiler.version=16
os=Windows
[options]
libvpx:shared=False
[build_requires]
[env]

(...)

     2>ClCompile:

         C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\CL.exe /c /I. /IC:/j/w/buildsinglereference/.conan/data/libvpx/1.10.0/_/_/build/5cee3dbf09e6170d8084f1a4fc1e5ba536d96cbb/source_subfolder /Zi /nologo /W3 /WX- /diagnostics:column /sdl- /O2 /Ot /D WIN32 /D NDEBUG /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE /D _UNICODE /D UNICODE /Gm- /EHsc /MT /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"x64\Release\vp9rc\vp9_vp9_iface_common.obj" /Fd"C:\j\w\buildsinglereference\.conan\data\libvpx\1.10.0\_\_\build\5cee3dbf09e6170d8084f1a4fc1e5ba536d96cbb\x64\Release\vp9rcmt.pdb" /external:W3 /Gd /TC /FC /errorReport:queue C:\j\w\buildsinglereference\.conan\data\libvpx\1.10.0\_\_\build\5cee3dbf09e6170d8084f1a4fc1e5ba536d96cbb\source_subfolder\vp9\vp9_iface_common.c

     2>ClCompile:

         C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\CL.exe /c /I. /IC:/j/w/buildsinglereference/.conan/data/libvpx/1.10.0/_/_/build/5cee3dbf09e6170d8084f1a4fc1e5ba536d96cbb/source_subfolder /Zi /nologo /W3 /WX- /diagnostics:column /sdl- /Od /D WIN32 /D _DEBUG /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE /D _UNICODE /D UNICODE /Gm- /EHsc /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"x64\Debug\vp9rc\vp9_vp9_iface_common.obj" /Fd"C:\j\w\buildsinglereference\.conan\data\libvpx\1.10.0\_\_\build\5cee3dbf09e6170d8084f1a4fc1e5ba536d96cbb\x64\Debug\vp9rcmtd.pdb" /external:W3 /Gd /TC /FC /errorReport:queue C:\j\w\buildsinglereference\.conan\data\libvpx\1.10.0\_\_\build\5cee3dbf09e6170d8084f1a4fc1e5ba536d96cbb\source_subfolder\vp9\vp9_iface_common.c

So what happen here? libvpx builds both Release & Debug. But install target seems to install Release only, regardless of build_type.

@conan-center-bot

This comment has been minimized.

@SpaceIm SpaceIm changed the title libvpx: modernize libvpx: fix Visual Studio 2022 build + modernize Mar 5, 2022
@conan-center-bot

This comment has been minimized.

implementation is in C also, except one compilation unit in C++, so we keep compiler.libcxx & compiler.cppstd
@SpaceIm SpaceIm force-pushed the libvpx-modernize branch from f1a9e8e to 9e9e064 Compare March 5, 2022 21:40
also honor upstream lib name
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

SSE4
SSE4 previously approved these changes Mar 6, 2022
@SpaceIm SpaceIm force-pushed the libvpx-modernize branch from a05a721 to d8aeb44 Compare March 6, 2022 10:06
@SpaceIm SpaceIm requested review from uilianries and SSE4 March 6, 2022 12:27
@conan-center-bot
Copy link
Collaborator

All green in build 13 (d8aeb44ee824a1b35adf34b88dc35297bd99cec6):

  • libvpx/1.9.0@:
    All packages built successfully! (All logs)

  • libvpx/1.10.0@:
    All packages built successfully! (All logs)

  • libvpx/1.11.0@:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 1caa7f3 into conan-io:master Mar 10, 2022
@SpaceIm SpaceIm deleted the libvpx-modernize branch March 10, 2022 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] can't build libvpx with visual studio 2022 compiler
5 participants