Skip to content

Different (wrong?) MSVC version found in 46.0 #2019

Open
@sspasweden

Description

@sspasweden

Hi,

Upgrading from setuptools 45.2 to 46 I am having problem with it finding different versions of the msvc compiler. I am on Win10 with 32bit python 3.5.4.

Using setuptools 45.2, the following compiler path is used:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe

Using setuptools 46, the following compiler path is used:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe

The latter ends up with the following error:

fatal error C1047: The object or library file '*.lib' was created with an older compiler than other objects; rebuild old objects and libraries

whereas the former works (and have worked for several years). The lib that is being linked is built with the msvc 14.0 compiler.

This seems to be related to #1904 . Is this change of behavior according to expectations?

It seems that even though the range of msvc 14.x compilers should be binary compatible, there are exceptions: https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=vs-2019

The /GL flag restriction is probably what goes south here as it seems that setuptools enables this one by default?

A workaround (even though it is not very sustainable) is obviously to avoid updating setuptools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions