Skip to content

Pybind11 build failed on MSVC + std:c++latest on windows #1601

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

Closed
QuellaZhang opened this issue Nov 9, 2018 · 6 comments
Closed

Pybind11 build failed on MSVC + std:c++latest on windows #1601

QuellaZhang opened this issue Nov 9, 2018 · 6 comments

Comments

@QuellaZhang
Copy link

Pybind11 failed when build with std:c++latest by msvc on Windows, I use latest version 978d439 on master branch. Could you please help take a look at this?

You can repro this issue as the steps below:

  1. git clone https://github.com/pybind/pybind11 D:\Pybind11\src
  2. open a VS 2017 amd64 command prompt as admin and browse to D:\Pybind11
  3. set CL=/std:c++latest
  4. cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 ..\src\

Failures:
================================== FAILURES ===================================
______________________________ test_string_view _______________________________

     capture = <conftest.Capture object at 0x00000000051CE470>
     
         @pytest.mark.skipif(not hasattr(m, "has_string_view"), reason="no <string_view>")
         def test_string_view(capture):
             """Tests support for C++17 string_view arguments and return values"""
             assert m.string_view_chars("Hi") == [72, 105]
             assert m.string_view_chars("Hi 🎂") == [72, 105, 32, 0xf0, 0x9f, 0x8e, 0x82]
     >       assert m.string_view16_chars("Hi 🎂") == [72, 105, 32, 0xd83c, 0xdf82]
     E       TypeError: string_view16_chars(): incompatible function arguments. The following argument types are supported:
     E           1. (arg0: unicode) -> list
     E       
     E       Invoked with: 'Hi \xf0\x9f\x8e\x82'
     
     test_builtin_casters.py:117: TypeError
@wjakob
Copy link
Member

wjakob commented Nov 9, 2018

The CI builds test c++latest on MSVC2017, and they seem to work fine.

@QuellaZhang
Copy link
Author

Sorry for the confusion, we (the Microsoft C++ team) use the Pybind11 project as part of our "Real world code" tests, that next release of MSVC will have this behavior.

@QuellaZhang
Copy link
Author

Hi, @wjakob , recently VS2019 preview 1 was released, could you try this version? You can download it here: https://visualstudio.microsoft.com/vs/preview/ .

@QuellaZhang
Copy link
Author

Any update?

@QuellaZhang
Copy link
Author

@wjakob Any update about this issue?

@YannickJadoul
Copy link
Collaborator

pybind11 was somehow never tested with the C++17 standard against Python 2.7. Fixed in #2314.

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

No branches or pull requests

3 participants