Visitar URL original
cpython\Modules\socketmodule.c(7473,5): error C2065: 'HVSOCKET_CONTAINE R_PASSTHRU': undeclared identifier · Issue #93656 · python/cpython · GitHub
Skip to content

cpython\Modules\socketmodule.c(7473,5): error C2065: 'HVSOCKET_CONTAINE R_PASSTHRU': undeclared identifier #93656

Description

@jschwar313

Bug report

I forked the main branch on cpython and cloned it to my local Windows environment. I then ran build.bat -e -d in my windows cmd as an administrator and I received the above error.

Your environment

I have 64-bit python 3.10.4 on Windows 10 64-bit version 21H2 (OS build 19044.1741)
I have visual studio 2019 Community Edition installed Version 16.11.15

Here is the output from running the build script as mentioned below.

H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild>build.bat -e -d
Using py -3.10 (found 3.10 with py.exe)
Fetching external libraries...
bzip2-1.0.8 already exists, skipping.
sqlite-3.38.4.0 already exists, skipping.
xz-5.2.5 already exists, skipping.
zlib-1.2.12 already exists, skipping.
Fetching external binaries...
libffi-3.4.2 already exists, skipping.
openssl-bin-1.1.1n already exists, skipping.
tcltk-8.6.12.1 already exists, skipping.
Finished.
Using "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" (found in the Visual Studio installation)
Using py -3.10 (found 3.10 with py.exe)

H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" "H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /clp:summary /p:Configuration=Debug /p:Platform=x64 /p:IncludeExternals=true /p:IncludeCTypes=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe"
_freeze_module.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\win32_freeze_module_d.exe
Killing any running python_d.exe instances...
Generated sources are up to date
Getting build info from "C:\Program Files\Git\cmd\git.exe"
Building heads/main:30610d2837 main
deepfreeze.c
pythoncore.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\python312_d.dll
_ctypes_test.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_ctypes_test_d.pyd
_testbuffer.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_testbuffer_d.pyd
_testcapi.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_testcapi_d.pyd
testinternalcapi.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_testinternalcapi
d.pyd
_testembed.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_testembed_d.exe
_testimportmultiple.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_testimportmulti
ple_d.pyd
_testmultiphase.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_testmultiphase_d.py
d
_testconsole.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_testconsole_d.pyd
python3dll.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\python3_d.dll
_overlapped.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_overlapped_d.pyd
pyexpat.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\pyexpat_d.pyd
pywlauncher.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\pyw_d.exe
venvwlauncher.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\venvwlauncher_d.exe
_msi.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_msi_d.pyd
pylauncher.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\py_d.exe
venvlauncher.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\venvlauncher_d.exe
_elementtree.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_elementtree_d.pyd
pyshellext.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\pyshellext_d.dll
_zoneinfo.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_zoneinfo_d.pyd
_queue.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_queue_d.pyd
_multiprocessing.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_multiprocessing_d.
pyd
_decimal.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_decimal_d.pyd
_asyncio.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_asyncio_d.pyd
_ctypes.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_ctypes_d.pyd
sqlite3.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\sqlite3_d.dll
select.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\select_d.pyd
socketmodule.c
unicodedata.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\unicodedata_d.pyd
_bz2.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_bz2_d.pyd
winsound.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\winsound_d.pyd
_uuid.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_uuid_d.pyd
_tkinter.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_tkinter_d.pyd
liblzma.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64\liblzma_d.lib
_sqlite3.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_sqlite3_d.pyd
_hashlib.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_hashlib_d.pyd
_lzma.vcxproj -> H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild\amd64_lzma_d.pyd
H:\Users\LindaJim\Documents\SourceCode\Software\cpython\Modules\socketmodule.c(7473,5): error C2065: 'HVSOCKET_CONTAINE
R_PASSTHRU': undeclared identifier [H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild_socket.vcxproj]

Build FAILED.

H:\Users\LindaJim\Documents\SourceCode\Software\cpython\Modules\socketmodule.c(7473,5): error C2065: 'HVSOCKET_CONTAINE
R_PASSTHRU': undeclared identifier [H:\Users\LindaJim\Documents\SourceCode\Software\cpython\PCbuild_socket.vcxproj]
0 Warning(s)
1 Error(s)

Time Elapsed 00:00:12.76

Activity

  1. jschwar313 commented on Jun 9, 2022

    @jschwar313
    Author

    The main branch I forked in GitHub is https://github.com/python/cpython

  2. erlend-aasland commented on Jun 14, 2022

    @erlend-aasland
    Contributor
  3. jborean93 commented on Jun 14, 2022

    @jborean93
    Contributor

    I'm no expert in all this but it sounds like potentially the Windows headers that are present don't include hvsocket.h where this (and others are defined). It seems like hvsocket.h was added in Windows 10 14393 (late 2016). Maybe your installed Windows SDK is based on a version older than this?

  4. erlend-aasland commented on Jun 14, 2022

    @erlend-aasland
    Contributor

    If the HV socket feature was added in Windows 10, we should add a guard for Windows 10 for this feature, and also update the docs to mention this.

  5. jborean93 commented on Jun 15, 2022

    @jborean93
    Contributor

    Is there an expectation of a minimum Windows version for building CPython? If there isn't we can probably add a guard to get it compiling on older hosts but if there is, do we want to go out of our way to get it working. I'm happy either way, I just don't know what the general practice for all this is.

    We can certainly add docs to state the Hyper-V sockets will only work on Windows 10/Server 2016. The only thing I will add is it looks like Python 3.12 will be coming out in 2023-10 which is pretty much the EOL of Server 2012, 2012 R2, and Win 8. Does Python follow this same support cycle for what Windows versions it runs on? PEP 11 seems to indicate they follow the same lifecycle as what Windows supports.

  6. erlend-aasland commented on Jun 15, 2022

    @erlend-aasland
    Contributor

    I'll let @zooba take over from here :) I don't use Windows, and I don't know which Windows version Python 3.12 will or should support.

  7. zooba commented on Jun 15, 2022

    @zooba
    Member

    We can certainly rule out older Windows SDKs. Those are forwards/backwards compatible, so anyone can use the latest one regardless of what version of Windows they are building on or targeting.

    PCbuild/project.props contains a minimum WinSDK version, which will be upgraded if a newer one is detected. If we know which version is required, that field can just be updated.

  8. erlend-aasland commented on Jun 15, 2022

    @erlend-aasland
    Contributor

    PCbuild/pcbuild.proj, I presume? :)

  9. zooba commented on Jun 15, 2022

    @zooba
    Member

    No, it's in the props file that gets imported by each project.

  10. erlend-aasland commented on Jun 15, 2022

    @erlend-aasland
    Contributor

    Got it, thanks!

  11. erlend-aasland commented on Jun 21, 2022

    @erlend-aasland
    Contributor

    IIUC, we can close this as a result of GH-94069.

  12. added
    pendingThe issue will be closed if no feedback is provided
    on Jun 21, 2022
  13. removed
    pendingThe issue will be closed if no feedback is provided
    on Jun 21, 2022
  14. jschwar313 commented on Jun 21, 2022

    @jschwar313
    Author
  15. erlend-aasland commented on Jun 21, 2022

    @erlend-aasland
    Contributor

    What do you mean by “closing as not planned”? Could you please explain that more clearly?

    If you follow the link in my last post, you'll see that the PR it leads to removes the HVSOCKET_CONTAINER_PASSTHRU constant from socketmodule.c.

    No problematic constant => no compilation warning => no issue => we close the issue as "not planned"

  16. jschwar313 commented on Jun 21, 2022

    @jschwar313
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowstype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions