Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

build.bat --tail-call-interp and errors/warnings in socketmodule #145929

Closed
Labels
@hunterhogan

Description

@hunterhogan

Bug report

Bug description:

Runningbuild.bat --tail-call-interp ... leads to 1 error and 10 warnings about "Modules\socketmodule.c" and "Modules\socketmodule.h".

  1. The build fails due to 1 error in "Modules\socketmodule.c."
  2. "\Modules\socketmodule.c" leads to 4warning : ... is deprecated statements.
  3. "\Modules\socketmodule.h" leads to 5warning : the current #pragma pack alignment value is modified in the included file [-Wpragma-pack] [C:\Users\hunte\AppData\Local\cpython\PCbuild\FILE.vcxproj] statements, where "FILE" is _freeze_module, _socket, or pythoncore.
  4. The build succeeds if in "Modules\socketmodule.c," I change line 3375 fromint dummy; toDWORD dummy;.

Details

  1. Source files: github/python/cpython/3.14
  2. Commandbuild.bat --pgo --tail-call-interp "/p:PlatformToolset=ClangCL" "/p:LLVMInstallDir=%pathCLang%" "/p:LLVMToolsVersion=%LLVMToolsVersion%" "/p:WholeProgramOptimization=true".
  3. Bothbuild.bat -d andbuild.bat, with the same source files, lead to 1 Warning and 0 Errorsc:\clones\cpython\Modules\unicodedata.c(1478,62): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [c:\clones\cpython\PCbuild\unicodedata.vcxproj].
  4. In total,build.bat --tail-call-interp ... leads to 715 warnings and 1 error.
    1. No other errors or warnings refer to a "*.c" or "*.h" file.
    2. One warning statesC:\Users\hunte\AppData\Local\cpython\PCbuild\pythoncore.vcxproj(720,5): warning : Toolset ClangCL is not used for official builds. Your build may have errors or incompatibilities.
    3. All other warnings stateclang-cl : warning : argument unused during compilation: '/GL' [-Wunused-command-line-argument] [PATHto\cpython\PCbuild\FILE.vcxproj], where "FILE" is one of exactly 45 different names. I think there are 55 "*.vcxproj" files in the directory.

The 1 error and 10 warnings about "Modules\socketmodule.c" and "Modules\socketmodule.h"

..\Modules\socketmodule.c(3377,51): error : incompatible pointer types passing 'int *' to parameter of type 'LPDWORD' (aka 'unsigned long *') [-Wincompatible-pointer-types] [C:\Users\hunte\AppData\Local\cpython\PCbuild\_socket.vcxproj]..\Modules\socketmodule.c(6208,9): warning : 'gethostbyname' is deprecated: Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [-Wdeprecated-declarations] [C:\Users\hunte\AppData\Local\cpython\PCbuild\_socket.vcxproj]..\Modules\socketmodule.c(6313,9): warning : 'gethostbyaddr' is deprecated: Use getnameinfo() or GetNameInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [-Wdeprecated-declarations] [C:\Users\hunte\AppData\Local\cpython\PCbuild\_socket.vcxproj]..\Modules\socketmodule.c(6731,23): warning : 'inet_addr' is deprecated: Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [-Wdeprecated-declarations] [C:\Users\hunte\AppData\Local\cpython\PCbuild\_socket.vcxproj]..\Modules\socketmodule.c(6775,33): warning : 'inet_ntoa' is deprecated: Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [-Wdeprecated-declarations] [C:\Users\hunte\AppData\Local\cpython\PCbuild\_socket.vcxproj]..\Modules\socketmodule.h(21,11): warning : the current #pragma pack alignment value is modified in the included file [-Wpragma-pack] [C:\Users\hunte\AppData\Local\cpython\PCbuild\_freeze_module.vcxproj]..\Modules\socketmodule.h(21,11): warning : the current #pragma pack alignment value is modified in the included file [-Wpragma-pack] [C:\Users\hunte\AppData\Local\cpython\PCbuild\_socket.vcxproj]..\Modules\socketmodule.h(21,11): warning : the current #pragma pack alignment value is modified in the included file [-Wpragma-pack] [C:\Users\hunte\AppData\Local\cpython\PCbuild\pythoncore.vcxproj]..\Modules\socketmodule.h(53,11): warning : the current #pragma pack alignment value is modified in the included file [-Wpragma-pack] [C:\Users\hunte\AppData\Local\cpython\PCbuild\_freeze_module.vcxproj]..\Modules\socketmodule.h(53,11): warning : the current #pragma pack alignment value is modified in the included file [-Wpragma-pack] [C:\Users\hunte\AppData\Local\cpython\PCbuild\_socket.vcxproj]..\Modules\socketmodule.h(53,11): warning : the current #pragma pack alignment value is modified in the included file [-Wpragma-pack] [C:\Users\hunte\AppData\Local\cpython\PCbuild\pythoncore.vcxproj]

Success

  1. In "Modules\socketmodule.c," I changed line 3375 fromint dummy; toDWORD dummy;.
  2. Rerun the build script.
  3. 547 Warnings and 0 Errors.

There are a few different file names betweenuniqueWarningsBefore.txt anduniqueWarningsAfter.txt if you think it's important.

Information you can almost certainly ignore.

Environment

Microsoft Windows [Version 10.0.26200.8037]

curl 8.18.0 (Windows) libcurl/8.18.0 Schannel zlib/1.3.1 WinIDN WinLDAP

clang version 22.1.1 (https://github.com/llvm/llvm-project fef02d48c08db859ef83f84232ed78bd9d1c323a)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\clones\clang_msvc\bin

Python 3.14.3 (tags/v3.14.3:323c59a, Feb 3 2026, 16:04:56) [MSC v.1944 64 bit (AMD64)]

Visual Studio configuration

My batch files to build and install tail-call-interp

_variables.cmd

SETpath314raw=%LOCALAPPDATA%\cpython

go.cmd

@ECHOOFFCALL C:\apps\Z0Z_\buildPython\_variables.cmd:: LLVM clang versionSETpathCLang=C:\clones\clang_msvcSETURLreleases=https://github.com/llvm/llvm-project/releasesFOR /F"tokens=3"%%GIN ('%pathCLang%\bin\clang.exe --version^|findstr clang')DOSETversionLLVM=%%GFOR /F"delims="%%GIN ('curl -L -s -oNUL -w"%%{url_effective}""%URLreleases%/latest"')DOSETURLlatest=%%GFOR /F"tokens=7 delims=/"%%GIN ("%URLlatest%")DOSETLLVMdirectory=%%GSET"versionLLVMlatest=%LLVMdirectory:llvmorg-=%"IFNOT"%versionLLVM%"=="%versionLLVMlatest%" (IFNOTEXIST%pathCLang%MKDIR%pathCLang%SETpathRelativeLLVM=clang+llvm-%versionLLVMlatest%-x86_64-pc-windows-msvcSETfilename_tar=%pathRelativeLLVM%.tarSETfilename_xz=%filename_tar%.xzcurl -L"%URLreleases%/download/%LLVMdirectory%/%filename_xz%" -o"%pathCLang%\%filename_xz%"CALL 7z x -aoa"-o%pathCLang%""%pathCLang%\%filename_xz%"CALL 7z x -aoa"-o%pathCLang%""%pathCLang%\%filename_tar%""%pathRelativeLLVM%\*"ROBOCOPY%pathCLang%\%pathRelativeLLVM%%pathCLang% /MOVE /E /NJH /NDL /NFLDEL%pathCLang%\%filename_tar%DEL%pathCLang%\%filename_xz%)%pathCLang%\bin\clang.exe --version:: github/python/cpython/3.14 syncPUSHd%path314raw%CALL git checkout 3.14CALL git pullPOPd:: PCbuild\build.batPUSHd"%path314raw%\PCbuild"FOR /F"tokens=1 delims=."%%GIN ("%versionLLVMlatest%")DOSETLLVMToolsVersion=%%GCALL build.bat --pgo --tail-call-interp"/p:PlatformToolset=ClangCL""/p:LLVMInstallDir=%pathCLang%"^"/p:LLVMToolsVersion=%LLVMToolsVersion%""/p:WholeProgramOptimization=true"@REM   -Wno-unused-command-line-argumentPOPd

regedit_copyFiles.cmd

@ECHOOFFCALL C:\apps\Z0Z_\buildPython\_variables.cmdSETz=zSETpath314zCompiled=%path314raw%\PCbuild\amd64SETpath314zInstalled=%LOCALAPPDATA%\Programs\Python\Python314COPY /Y"%path314zCompiled%\python.exe""%path314zInstalled%\python3.14%z%.exe"COPY /Y"%path314zCompiled%\python.pdb""%path314zInstalled%\python3.14%z%.pdb"COPY /Y"%path314zCompiled%\pythonw.exe""%path314zInstalled%\pythonw3.14%z%.exe"COPY /Y"%path314zCompiled%\pythonw.pdb""%path314zInstalled%\pythonw3.14%z%.pdb"COPY /Y"%path314zCompiled%\python3.*""%path314zInstalled%\python3%z%.*"COPY /Y"%path314zCompiled%\python314.*""%path314zInstalled%\python314%z%.*"MOVE /Y"%path314zInstalled%\*.lib""%path314zInstalled%\libs\""%path314zInstalled%\python3.14%z%.exe" -VVSET"keyRoot=HKCU\Software\Python\PythonCore\3.14%z%"REG ADD"%keyRoot%" /F /T REG_SZ /V DisplayName     /D"Python 3.14 (64-bit, tail-call interpreter)"REG ADD"%keyRoot%" /F /T REG_SZ /V SupportUrl      /D"https://www.python.org/"REG ADD"%keyRoot%" /F /T REG_SZ /V Version         /D"3.14"REG ADD"%keyRoot%" /F /T REG_SZ /V SysVersion      /D"3.14"REG ADD"%keyRoot%" /F /T REG_SZ /V SysArchitecture /D"64bit"REG ADD"%keyRoot%\InstallPath" /F /T REG_SZ /VE                        /D%path314zInstalled%\REG ADD"%keyRoot%\InstallPath" /F /T REG_SZ /V ExecutablePath          /D"%path314zInstalled%\python3.14%z%.exe"REG ADD"%keyRoot%\InstallPath" /F /T REG_SZ /V WindowedExecutablePath  /D"%path314zInstalled%\pythonw3.14%z%.exe"REG ADD"%keyRoot%\PythonPath" /F /T REG_SZ /VE /D%path314zInstalled%\Lib\;%path314zInstalled%\DLLs\py -0p

45 filenames with warning about unused /GL

_asyncio.vcxproj_bz2.vcxproj_ctypes_test.vcxproj_ctypes.vcxproj_decimal.vcxproj_elementtree.vcxproj_freeze_module.vcxproj_hashlib.vcxproj_lzma.vcxproj_multiprocessing.vcxproj_overlapped.vcxproj_queue.vcxproj_remote_debugging.vcxproj_socket.vcxproj_sqlite3.vcxproj_testbuffer.vcxproj_testcapi.vcxproj_testclinic_limited.vcxproj_testclinic.vcxproj_testconsole.vcxproj_testembed.vcxproj_testimportmultiple.vcxproj_testinternalcapi.vcxproj_testlimitedcapi.vcxproj_testmultiphase.vcxproj_testsinglephase.vcxproj_tkinter.vcxproj_uuid.vcxproj_wmi.vcxproj_zoneinfo.vcxproj_zstd.vcxprojliblzma.vcxprojpyexpat.vcxprojpylauncher.vcxprojpyshellext.vcxprojpython3dll.vcxprojpythoncore.vcxprojpywlauncher.vcxprojselect.vcxprojsqlite3.vcxprojunicodedata.vcxprojvenvlauncher.vcxprojvenvwlauncher.vcxprojwinsound.vcxprojzlib-ng.vcxproj

55 "`*.vcxproj`" files in PCBuild directory

_asyncio.vcxproj_bz2.vcxproj_ctypes_test.vcxproj_ctypes.vcxproj_decimal.vcxproj_elementtree.vcxproj_freeze_module.vcxproj_hashlib.vcxproj_lzma.vcxproj_multiprocessing.vcxproj_overlapped.vcxproj_queue.vcxproj_remote_debugging.vcxproj_socket.vcxproj_sqlite3.vcxproj_ssl.vcxproj_testbuffer.vcxproj_testcapi.vcxproj_testclinic_limited.vcxproj_testclinic.vcxproj_testconsole.vcxproj_testembed.vcxproj_testimportmultiple.vcxproj_testinternalcapi.vcxproj_testlimitedcapi.vcxproj_testmultiphase.vcxproj_testsinglephase.vcxproj_tkinter.vcxproj_uuid.vcxproj_wmi.vcxproj_zoneinfo.vcxproj_zstd.vcxprojliblzma.vcxprojopenssl.vcxprojpyexpat.vcxprojpylauncher.vcxprojpyshellext.vcxprojpython_uwp.vcxprojpython.vcxprojpython3dll.vcxprojpythoncore.vcxprojpythonw_uwp.vcxprojpythonw.vcxprojpywlauncher.vcxprojselect.vcxprojsqlite3.vcxprojtcl.vcxprojtk.vcxprojunicodedata.vcxprojvenvlauncher.vcxprojvenvwlauncher.vcxprojwinsound.vcxprojxxlimited_35.vcxprojxxlimited.vcxprojzlib-ng.vcxproj

10 files in directory that didn't have unused /GL warning

_ssl.vcxprojopenssl.vcxprojpython_uwp.vcxprojpython.vcxprojpythonw_uwp.vcxprojpythonw.vcxprojtcl.vcxprojtk.vcxprojxxlimited_35.vcxprojxxlimited.vcxproj

CPython versions tested on:

3.14

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp