-
Notifications
You must be signed in to change notification settings - Fork 8
/
windows_build.txt
190 lines (150 loc) · 7.87 KB
/
windows_build.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
+---------------------------------------------------------------------------------------------+
| This file is left for historical reference. The official binary wheels for Windows are |
| created using the MSYS2 and the Mingw64 compiler suite. Please see the mingw64 directory |
| for more information. |
+---------------------------------------------------------------------------------------------+
Assumptions
===========
The solution files for MPIR, MPFR, and MPC support VS 2015/2017.
However, if VS 2008 and/or VS 2010 is installed, the "Platform
Toolset" setting can be used to select a specific compiler:
- v90 = VS 2008, Python 2.6 and 2.7
- v100 = VS 2010, Python 3.3 and 3.4
- v140 = VS 2015, Python 3.5, 3.6, and 3.7
- v141 = VS 2017
Assumes MPIR is placed in c:\src\mpir. (No version number.)
Assumes MPFR is placed in c:\src\mpfr. (No version number.)
Assumes MPC is placed in c:\src\mpc. (No version number.)
Assumes gmpy2 is placed in c:\src\gmpy2. (No version number.)
Assumes vsyasm is installed.
Compatibility note for vsyasm
=============================
VS 2015/2017 change the platform identifier for 32-bit builds from
"win32" to "Win32". To work around the issue with vsyasm v1.3.0, edit
the "vsyasm.props" file. After the following line:
<CommandLineTemplate>"$(YasmPath)"vsyasm.exe -Xvc -f $(Platform) [AllOptions] [AdditionalOptions] [Inputs] </CommandLineOptions>
add this line:
<CommandLineTemplate Condition="'$(Platform)' == 'Win32'">"$(YasmPath)"vsyasm.exe -Xvc -f win32 [AllOptions] [AdditionalOptions] [Inputs] </CommandLineOptions>
Compiling MPIR
==============
cd c:\src\mpir\build.vc10
python mpir_config.py
# enter 3 (Pentium 3) and 18 (AMD K8)
Start Visual Studio 2010 and open c:\src\mpir\build.vc10\mpir.sln.
Select "Release" and "Win32"
Open "lib_mpir_p3" properties
- Change "Platform Toolset" if needed.
- Change "Character Set" to "Not Set". (Probably not needed.)
- Change "Optimization" to "/O2". (Set uniformly in MPFR and MPC too.)
- Change "Runtime Library" to "Multi-threaded DLL /MD".
- Change "Buffer Security Check" to "No".
Select "Build"
- Ignore preinv* warnings (I think)
- Ignore *_ux and *_sx warnings if using v90 toolset (i.e. VS2008).
Select "Release" and "x64"
Open "lib_mpir_k8" properties
- Change "Platform Toolset" if needed.
- Change "Character Set" to "Not Set". (Probably not needed.)
- Change "Optimization" to "/O2". (Set uniformly in MPFR and MPC too.)
- Change "Runtime Library" to "Multi-threaded DLL /MD".
- Change "Buffer Security Check" to "No".
Select "Build"
- Ignore preinv* warnings (I think)
- Ignore *_ux and *_sx warnings if using v90 toolset (i.e. VS2008).
Compiling MPFR
==============
Start Visual Studio 2010 and open c:\src\mpfr\build.vc10\lib_mpfr.sln.
Select "Release" and "Win32"
Open "lib_mpfr" properties
- Change "Platform Toolset: if needed.
- Change settings to match MPIR except "Enable Fiber-Safe Optimizations" should
be set.
Select "Build"
Select "Release" and "x64"
Open "lib_mpfr" properties
- Change "Platform Toolset: if needed.
- Change settings to match MPIR except "Enable Fiber-Safe Optimizations" should
be set.
Select "Build"
Compiling MPC
=============
Start Visual Studio 2010 and open c:\src\mpfr\build.vc10\mpc.sln.
Select "Release" and "Win32"
Open "mpc_lib" properties
- Change "Platform Toolset: if needed.
- Change remaining settings to match MPIR.
Select "Build"
Select "Release" and "x64"
Open "lib_mpfr" properties
- Change "Platform Toolset: if needed.
- Change remaining settings to match MPIR.
Select "Build"
Copy the library files
======================
The header files will be copied c:\src\BB\vsNNNN\include and the library files
will be copied to c:\src\BB\vsNNNN\lib where BB is 32 or 64, and NNNN is 2008
or 2010.
32-bit, VS 2008
cd c:\src
xcopy /y c:\src\mpir\lib\Win32\Release\*.h c:\src\32\vs2008\include\
xcopy /y c:\src\mpir\lib\Win32\Release\*.lib c:\src\32\vs2008\lib\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.h c:\src\32\vs2008\include\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.lib c:\src\32\vs2008\lib\
xcopy /y c:\src\mpc\lib\Win32\Release\*.h c:\src\32\vs2008\include\
xcopy /y c:\src\mpc\lib\Win32\Release\*.lib c:\src\32\vs2008\lib\
64-bit, VS 2008
cd c:\src
xcopy /y c:\src\mpir\lib\x64\Release\*.h c:\src\64\vs2008\include\
xcopy /y c:\src\mpir\lib\x64\Release\*.lib c:\src\64\vs2008\lib\
xcopy /y c:\src\mpfr\lib\x64\Release\*.h c:\src\64\vs2008\include\
xcopy /y c:\src\mpfr\lib\x64\Release\*.lib c:\src\64\vs2008\lib\
xcopy /y c:\src\mpc\lib\x64\Release\*.h c:\src\64\vs2008\include\
xcopy /y c:\src\mpc\lib\x64\Release\*.lib c:\src\64\vs2008\lib\
32-bit, VS 2010
cd c:\src
xcopy /y c:\src\mpir\lib\Win32\Release\*.h c:\src\32\vs2010\include\
xcopy /y c:\src\mpir\lib\Win32\Release\*.lib c:\src\32\vs2010\lib\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.h c:\src\32\vs2010\include\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.lib c:\src\32\vs2010\lib\
xcopy /y c:\src\mpc\lib\Win32\Release\*.h c:\src\32\vs2010\include\
xcopy /y c:\src\mpc\lib\Win32\Release\*.lib c:\src\32\vs2010\lib\
64-bit, VS 2010
cd c:\src
xcopy /y c:\src\mpir\lib\x64\Release\*.h c:\src\64\vs2010\include\
xcopy /y c:\src\mpir\lib\x64\Release\*.lib c:\src\64\vs2010\lib\
xcopy /y c:\src\mpfr\lib\x64\Release\*.h c:\src\64\vs2010\include\
xcopy /y c:\src\mpfr\lib\x64\Release\*.lib c:\src\64\vs2010\lib\
xcopy /y c:\src\mpc\lib\x64\Release\*.h c:\src\64\vs2010\include\
xcopy /y c:\src\mpc\lib\x64\Release\*.lib c:\src\64\vs2010\lib\
32-bit, VS 2015
cd c:\src
xcopy /y c:\src\mpir\lib\Win32\Release\*.h c:\src\32\vs2015\include\
xcopy /y c:\src\mpir\lib\Win32\Release\*.lib c:\src\32\vs2015\lib\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.h c:\src\32\vs2015\include\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.lib c:\src\32\vs2015\lib\
xcopy /y c:\src\mpc\lib\Win32\Release\*.h c:\src\32\vs2015\include\
xcopy /y c:\src\mpc\lib\Win32\Release\*.lib c:\src\32\vs2015\lib\
64-bit, VS 2015
cd c:\src
xcopy /y c:\src\mpir\lib\x64\Release\*.h c:\src\64\vs2015\include\
xcopy /y c:\src\mpir\lib\x64\Release\*.lib c:\src\64\vs2015\lib\
xcopy /y c:\src\mpfr\lib\x64\Release\*.h c:\src\64\vs2015\include\
xcopy /y c:\src\mpfr\lib\x64\Release\*.lib c:\src\64\vs2015\lib\
xcopy /y c:\src\mpc\lib\x64\Release\*.h c:\src\64\vs2015\include\
xcopy /y c:\src\mpc\lib\x64\Release\*.lib c:\src\64\vs2015\lib\
Compile gmpy2
=============
c:\32\Python26\python.exe setup.py build_ext --force --mpir --static=c:\src\32\vs2008 bdist_wininst
c:\32\Python27\python.exe setup.py build_ext --force --mpir --static=c:\src\32\vs2008 bdist_wininst
c:\32\Python33\python.exe setup.py build_ext --force --mpir --static=c:\src\32\vs2010 bdist_wininst
c:\32\Python34\python.exe setup.py build_ext --force --mpir --static=c:\src\32\vs2010 bdist_wininst
c:\32\Python35\python.exe setup.py build_ext --force --mpir --static=c:\src\32\vs2015 bdist_wininst
c:\32\Python36\python.exe setup.py build_ext --force --mpir --static=c:\src\32\vs2015 bdist_wininst
c:\32\Python37\python.exe setup.py build_ext --force --mpir --static=c:\src\32\vs2015 bdist_wininst
c:\64\Python26\python.exe setup.py build_ext --force --mpir --static=c:\src\64\vs2008 bdist_wininst
c:\64\Python27\python.exe setup.py build_ext --force --mpir --static=c:\src\64\vs2008 bdist_wininst
c:\64\Python33\python.exe setup.py build_ext --force --mpir --static=c:\src\64\vs2010 bdist_wininst
c:\64\Python34\python.exe setup.py build_ext --force --mpir --static=c:\src\64\vs2010 bdist_wininst
c:\64\Python35\python.exe setup.py build_ext --force --mpir --static=c:\src\64\vs2015 bdist_wininst
c:\64\Python36\python.exe setup.py build_ext --force --mpir --static=c:\src\64\vs2015 bdist_wininst
c:\64\Python37\python.exe setup.py build_ext --force --mpir --static=c:\src\64\vs2015 bdist_wininst