Fossil SCM

Reworked the MinGW outdated instructions in www/build.wiki. It was still warning about a MinGW bug from 2014, and it didn't cover the cross-compilation details at all. That in turn gives us a basis for explaining why cross-compilation may matter even to those who don't realize they're doing so, as in the Cygwin and WSL cases, which then explains why we recommend against using MinGW Make and the USE_WINDOWS=1 mode.

wyoung 2021-06-22 18:19 trunk
Commit 2c66a5395ab5b834b9d73762d407fbe735cc670a82622646e0ad107782b01f27
1 file changed +22 -11
+22 -11
--- www/build.wiki
+++ www/build.wiki
@@ -131,30 +131,41 @@
131131
<li><p><i>Unix without running "configure"</i> → if you prefer to avoid
132132
running configure, you can also use: <b>make -f Makefile.classic</b>. You may
133133
want to make minor edits to Makefile.classic to configure the build for your
134134
system.
135135
136
-<li><p><i>MinGW 3.x (<u>not</u> 4.x) / MinGW-w64</i> → Use the MinGW makefile:
137
-"<b>make -f win/Makefile.mingw</b>". On a Windows box you will need either
138
-Cygwin or MSYS as build environment. On Cygwin, Linux or Darwin you may want
139
-to make minor edits to win/Makefile.mingw to configure the cross-compile
140
-environment.
136
+<li><p><i>MinGW / MinGW-w64</i> → The best-supported path is to build
137
+via the MinGW specific Makefile under a POSIX build of GNU make:
138
+"<b>make -f win/Makefile.mingw</b>".
139
+
140
+There is limited support for building under MinGW's native Windows port
141
+of GNU Make instead by defining the <tt>USE_WINDOWS=1</tt> variable, but
142
+it's better to build under MSYS, Cygwin, or WSL on Windows since this
143
+mode doesn't take care of cases such as the "openssl" target, which
144
+depends on <tt>sed</tt>. We've gone as far down this path as is
145
+practical short of breaking cross-compilation under Linux, macOS, and so
146
+forth, as we'd have to do to make everything work under
147
+<tt>cmd.exe</tt>.
148
+
149
+Unless you're building under MSYS where commands like "<tt>gcc</tt>"
150
+give MinGW's GCC and not some other version, you will need to make minor
151
+edits to win/Makefile.mingw to configure the cross-compilation
152
+environment. It should suffice to switch to one of the predefined
153
+<tt>PREFIX</tt> values, causing the build to be done using
154
+"<tt>x86_64-w64-mingw32-gcc</tt>" for example, yielding a 64-bit native
155
+Windows binary.
141156
142157
To enable the native [./th1.md#tclEval | Tcl integration feature], use a
143158
command line like the following (all on one line):
144159
145160
<b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b>
146161
147
-Alternatively, <b>./configure</b> may now be used to create a Makefile
148
-suitable for use with MinGW; however, options passed to configure that are
162
+Alternatively, running <b>./configure</b> under MSYS should give a
163
+suitable top-level Makefile. However, options passed to configure that are
149164
not applicable on Windows may cause the configuration or compilation to fail
150165
(e.g. fusefs, internal-sqlite, etc).
151166
152
-<i>HINT</i>: Do <u>not</u> use MinGW-4.x, it may compile but the Fossil binary
153
-will not work correctly, see
154
-[https://fossil-scm.org/home/tktview/18cff45a4e210430e24c | ticket].
155
-
156167
<li><p><i>MSVC</i> → Use the MSVC makefile.
157168
158169
Run all of the following from a "x64 Native Tools Command Prompt".
159170
160171
First
161172
--- www/build.wiki
+++ www/build.wiki
@@ -131,30 +131,41 @@
131 <li><p><i>Unix without running "configure"</i> → if you prefer to avoid
132 running configure, you can also use: <b>make -f Makefile.classic</b>. You may
133 want to make minor edits to Makefile.classic to configure the build for your
134 system.
135
136 <li><p><i>MinGW 3.x (<u>not</u> 4.x) / MinGW-w64</i> → Use the MinGW makefile:
137 "<b>make -f win/Makefile.mingw</b>". On a Windows box you will need either
138 Cygwin or MSYS as build environment. On Cygwin, Linux or Darwin you may want
139 to make minor edits to win/Makefile.mingw to configure the cross-compile
140 environment.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
142 To enable the native [./th1.md#tclEval | Tcl integration feature], use a
143 command line like the following (all on one line):
144
145 <b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b>
146
147 Alternatively, <b>./configure</b> may now be used to create a Makefile
148 suitable for use with MinGW; however, options passed to configure that are
149 not applicable on Windows may cause the configuration or compilation to fail
150 (e.g. fusefs, internal-sqlite, etc).
151
152 <i>HINT</i>: Do <u>not</u> use MinGW-4.x, it may compile but the Fossil binary
153 will not work correctly, see
154 [https://fossil-scm.org/home/tktview/18cff45a4e210430e24c | ticket].
155
156 <li><p><i>MSVC</i> → Use the MSVC makefile.
157
158 Run all of the following from a "x64 Native Tools Command Prompt".
159
160 First
161
--- www/build.wiki
+++ www/build.wiki
@@ -131,30 +131,41 @@
131 <li><p><i>Unix without running "configure"</i> → if you prefer to avoid
132 running configure, you can also use: <b>make -f Makefile.classic</b>. You may
133 want to make minor edits to Makefile.classic to configure the build for your
134 system.
135
136 <li><p><i>MinGW / MinGW-w64</i> → The best-supported path is to build
137 via the MinGW specific Makefile under a POSIX build of GNU make:
138 "<b>make -f win/Makefile.mingw</b>".
139
140 There is limited support for building under MinGW's native Windows port
141 of GNU Make instead by defining the <tt>USE_WINDOWS=1</tt> variable, but
142 it's better to build under MSYS, Cygwin, or WSL on Windows since this
143 mode doesn't take care of cases such as the "openssl" target, which
144 depends on <tt>sed</tt>. We've gone as far down this path as is
145 practical short of breaking cross-compilation under Linux, macOS, and so
146 forth, as we'd have to do to make everything work under
147 <tt>cmd.exe</tt>.
148
149 Unless you're building under MSYS where commands like "<tt>gcc</tt>"
150 give MinGW's GCC and not some other version, you will need to make minor
151 edits to win/Makefile.mingw to configure the cross-compilation
152 environment. It should suffice to switch to one of the predefined
153 <tt>PREFIX</tt> values, causing the build to be done using
154 "<tt>x86_64-w64-mingw32-gcc</tt>" for example, yielding a 64-bit native
155 Windows binary.
156
157 To enable the native [./th1.md#tclEval | Tcl integration feature], use a
158 command line like the following (all on one line):
159
160 <b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b>
161
162 Alternatively, running <b>./configure</b> under MSYS should give a
163 suitable top-level Makefile. However, options passed to configure that are
164 not applicable on Windows may cause the configuration or compilation to fail
165 (e.g. fusefs, internal-sqlite, etc).
166
 
 
 
 
167 <li><p><i>MSVC</i> → Use the MSVC makefile.
168
169 Run all of the following from a "x64 Native Tools Command Prompt".
170
171 First
172

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button