ユーザ用ツール

サイト用ツール


サイドバー

Top

タグ

検索タグ

メニュー


ChangeLog

ページ日付
Python のインストール 2020/02/17 18:11
Python エラー 2020/02/17 18:08
Python 関連 2020/02/17 17:56
主要レジストリ パス 2020/02/17 06:33
Windows 10 の Shell コマンドの取得 2020/02/17 06:31
Brave 2020/02/16 20:58
iPhone/iOS 関連 2020/02/16 20:57
Windows 関連 2020/02/16 16:32
Windows 10 の修復 2020/02/16 09:51
Windows インストールメディアの作成 2020/02/16 09:32
Rufus - Live USB 作成ツール 2020/02/16 09:24
PowerShell(Windows) 2020/02/16 07:57
PowerShell(Linux) 2020/02/16 07:57
タグ 2020/02/16 07:55
.NET Core 2020/02/15 11:36
.NET Core 2020/02/15 11:26
.NET Core 2020/02/15 11:13
Linux 関連 2020/02/15 11:12
Avast Free Antivirus - 無料のセキュリティ対策ソフト 2020/02/15 11:01
Fedora Copr (Cool Other Package Repo) リポジトリを利用する 2020/02/15 10:43
python-python_build

Python のビルド

Visual Studio 2019

> git clone -b v3.7.4 https://github.com/python/cpython.git Python-3.7.4
> cd Python-3.7.4
> PCbuild\build.bat -e -d -p x64
> PCbuild\amd64\python_d.exe
Python 3.7.4 (tags/v3.7.4-dirty:e09359112e, Aug 15 2019, 11:50:09) [MSC v.1922 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>>

Visual Studio 2019 (clang-cl)

2019/08/15 現在、Visual Studio 2019 の clang-cl.exe ではビルドエラーが発生して Python のビルドはできない。

> PCbuild\build.bat -e -d -p x64
Using py -3.7 (found 3.7 with py.exe)
Fetching external libraries...
bzip2-1.0.6 already exists, skipping.
sqlite-3.28.0.0 already exists, skipping.
xz-5.2.2 already exists, skipping.
zlib-1.2.11 already exists, skipping.
Fetching external binaries...
openssl-bin-1.1.1c already exists, skipping.
tcltk-8.6.9.0 already exists, skipping.
Finished.
Using "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"  (found in the PATH)

c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"  "c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /p:Configuration="Release - Clang" /p:Platform=x64 /p:IncludeExternals=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe" /p:LLVMInstallDir="C:\Program Files\\LLVM"         
  Killing any running python.exe instances...
  Getting build info from "C:\Program Files\Git\cmd\git.exe"
  Building tags/v3.7.4-dirty:e09359112e tags/v3.7.4^0
c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj(500,5): warning : Toolset ClangCL is no
t used for official builds. Your build may have errors or incompatibilities.
  In file included from <built-in>:334:
<command line>(10,9): warning :  '_M_X64' macro redefined [-Wmacro-redefined] [c:\Users\tomoyan\.PythonInstaller\build\
Python-3.7.4\PCbuild\pythoncore.vcxproj]
<built-in>(328,9): message :  previous definition is here [c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\PCbuild
\pythoncore.vcxproj]
<built-in>(328,9): message : In file included from ..\Modules\_tracemalloc.c:1: [c:\Users\tomoyan\.PythonInstaller\buil
d\Python-3.7.4\PCbuild\pythoncore.vcxproj]
<built-in>(328,9): message : In file included from c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\Include\Python.
h:87: [c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\Include/pytime.h(123,59): warning :  declaration of 'struct timeva
l' will not be visible outside of this function [-Wvisibility] [c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\PC
build\pythoncore.vcxproj]
c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\Include/pytime.h(130,12): warning :  declaration of 'struct timeva
l' will not be visible outside of this function [-Wvisibility] [c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\PC
build\pythoncore.vcxproj]
c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\Include/pytime.h(135,12): warning :  declaration of 'struct timeva
l' will not be visible outside of this function [-Wvisibility] [c:\Users\tomoyan\.PythonInstaller\build\Python-3.7.4\PC
build\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(82,9): error :  declaration of anonymous struct must be a definition [c:\Users\tomoyan\.Pytho
nInstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(82,1): warning :  typedef requires a name [-Wmissing-declarations] [c:\Users\tomoyan\.PythonI
nstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(95,9): warning :  #pragma pack(pop, ...) failed: stack empty [-Wignored-pragmas] [c:\Users\to
moyan\.PythonInstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(102,5): error :  unknown type name 'frame_t' [c:\Users\tomoyan\.PythonInstaller\build\Python-
3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(322,11): error :  unknown type name 'frame_t'; did you mean 'trace_t'? [c:\Users\tomoyan\.Pyt
honInstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(122,3): message :  'trace_t' declared here [c:\Users\tomoyan\.PythonInstaller\build\Python-3.
7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(335,21): error :  no member named 'lineno' in 'trace_t' [c:\Users\tomoyan\.PythonInstaller\bu
ild\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(335,39): error :  no member named 'lineno' in 'trace_t' [c:\Users\tomoyan\.PythonInstaller\bu
ild\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(338,21): error :  no member named 'filename' in 'trace_t' [c:\Users\tomoyan\.PythonInstaller\
build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(338,41): error :  no member named 'filename' in 'trace_t' [c:\Users\tomoyan\.PythonInstaller\
build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(348,47): error :  unknown type name 'frame_t'; did you mean 'trace_t'? [c:\Users\tomoyan\.Pyt
honInstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(122,3): message :  'trace_t' declared here [c:\Users\tomoyan\.PythonInstaller\build\Python-3.
7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(355,12): error :  no member named 'filename' in 'trace_t' [c:\Users\tomoyan\.PythonInstaller\
build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(359,12): error :  no member named 'lineno' in 'trace_t' [c:\Users\tomoyan\.PythonInstaller\bu
ild\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(415,12): error :  no member named 'filename' in 'trace_t' [c:\Users\tomoyan\.PythonInstaller\
build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(426,5): error :  unknown type name 'frame_t'; did you mean 'trace_t'? [c:\Users\tomoyan\.Pyth
onInstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(122,3): message :  'trace_t' declared here [c:\Users\tomoyan\.PythonInstaller\build\Python-3.
7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(431,46): error :  no member named 'filename' in 'trace_t' [c:\Users\tomoyan\.PythonInstaller\
build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(432,33): error :  no member named 'lineno' in 'trace_t' [c:\Users\tomoyan\.PythonInstaller\bu
ild\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(493,26): error :  use of undeclared identifier 'frame_t' [c:\Users\tomoyan\.PythonInstaller\b
uild\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(106,39): message :  expanded from macro 'TRACEBACK_SIZE' [c:\Users\tomoyan\.PythonInstaller\b
uild\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(1069,40): error :  use of undeclared identifier 'frame_t' [c:\Users\tomoyan\.PythonInstaller\
build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(109,61): message :  expanded from macro 'MAX_NFRAME' [c:\Users\tomoyan\.PythonInstaller\build
\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(1072,27): error :  use of undeclared identifier 'frame_t' [c:\Users\tomoyan\.PythonInstaller\
build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(109,61): message :  expanded from macro 'MAX_NFRAME' [c:\Users\tomoyan\.PythonInstaller\build
\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(1089,12): error :  use of undeclared identifier 'frame_t' [c:\Users\tomoyan\.PythonInstaller\
build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(106,39): message :  expanded from macro 'TRACEBACK_SIZE' [c:\Users\tomoyan\.PythonInstaller\b
uild\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(1189,19): error :  unknown type name 'frame_t'; did you mean 'trace_t'? [c:\Users\tomoyan\.Py
thonInstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(122,3): message :  'trace_t' declared here [c:\Users\tomoyan\.PythonInstaller\build\Python-3.
7.4\PCbuild\pythoncore.vcxproj]
..\Modules\_tracemalloc.c(122,3): message : fatal error: too many errors emitted, stopping now [-ferror-limit=] [c:\Use
rs\tomoyan\.PythonInstaller\build\Python-3.7.4\PCbuild\pythoncore.vcxproj]

参考文献

python-python_build.txt · 最終更新: 2019/08/19 06:51 by ともやん