Skip to content

windows builds: devenv freetype /update appears not to have an effect #16243

Closed

Description

@eric-wieser

Despite attempting to upgrade the freetype sln file with /upgrade, when building using the 2017 msbuild as part of setup.py I get the following failure:

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
    Build started 2020-01-16 14:46:40.
    Project "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.sln" on node 1 (Clean;Build target(s)).
    ValidateSolutionConfiguration:
      Building solution configuration "Release|x64".
    Project "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.sln" (1) is building "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.vcxproj" (2) on node 1 (Clean target(s)).
    CoreClean:
      Creating directory ".\..\..\..\objs\vc2010\x64\Release\".
    Done Building Project "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.vcxproj" (Clean target(s)).
    Project "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.sln" (1) is building "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.vcxproj" (2:2) on node 1 (default targets).
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.vcxproj]
    Done Building Project "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.vcxproj" (default targets) -- FAILED.
    Done Building Project "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.sln" (Clean;Build target(s)) -- FAILED.

    Build FAILED.

    "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.sln" (Clean;Build target) (1) ->
    "C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.vcxproj" (default target) (2:2) ->
    (PlatformPrepareForBuild target) ->
      C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\wiese\Repos\numeric-python\matplotlib\build\freetype-2.6.1\builds\windows\vc2010\freetype.vcxproj]

Activity

  1. eric-wieser commented on Jan 16, 2020

    @eric-wieser
    ContributorAuthor

    Making the following change appears to fix the issue for me on 3.8:

    --- matplotlib\setupext.py	Thu Jan 16 14:56:25 2020
    +++ matplotlib\setupext.py	Thu Jan 16 14:58:44 2020
    @@ -566,8 +566,7 @@
                 # cc.spawn(["devenv", str(sln_path), "/upgrade"])
                 cc.spawn(["msbuild", str(sln_path),
                           "/t:Clean;Build",
    -                      f"/p:Configuration=Release;Platform={msbuild_platform}"])
    +                      f"/p:Configuration=Release;Platform={msbuild_platform}",
    +                      "/p:PlatformToolset=v140"])
                 # Move to the corresponding Unix build path.
                 (src_path / "objs" / ".libs").mkdir()
                 # Be robust against change of FreeType version.

    but I'm not sure how ideal hard-coding v140 is. It's better than falling back on v100 at least...

  2. anntzer commented on Jan 16, 2020

    @anntzer
    Contributor

    We may be able to reuse https://github.com/python/cpython/blob/9baf242fc733ab8a52a0b6201d95c6fdb8251745/PCbuild/python.props#L7-L21? (by patching the relevant file in the freetype build script)

  3. Kojoley commented on Feb 11, 2020

    @Kojoley
    Member

    @eric-wieser could you please check if #16401 fixes the issue?

  4. eric-wieser commented on Feb 11, 2020

    @eric-wieser
    ContributorAuthor

    Yes, that seemed to do the trick

  5. added this to the v3.3.0 milestone on Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions