On 4/12/2017 1:10 PM, Thomas wrote:
I might try MinGW as soon as I figured out how to buld Fossil with MinGW/Cygwin. ;-)

On Windows 10 Pro 64-bit here, I still build fossil as a 32-bit exe with MinGW because there seems to be no need for 64-bit. I use the MinGW lightweight environment provided by MSYS. I've also salted in a bunch of otherwise handy classic *nix utilities built for Windows Console by the GnuWin32 project. (Sadly that project is not well maintained, but their downloads still exist. YMMV.)

From the MSYS bash prompt in an open fossil clone of fossil, I find that the standard recipe of "./configure ; make" works well to build it, as long as the right options are provided to configure.

A very clean and lightweight build can be had from ./configure --with-miniz --with-openssl=none

That will substitute miniz instead of zlib, which has the advantage for building that miniz is a single C file compiled and linked along with fossil. A full source kit to zlib is included in .../compat/zlib but it needs to be built separately before fossil can be configured and built with it.

The big downside with using miniz in your build is that there is an issue that prevents linking both OpenSSL and miniz. I have not chased the issue down, the workaround is simply to build and use real zlib instead. If you have invested in the effort to have the correct OpenSSL available, the marginal cost of getting zlib to build is negligible.

For a complete fossil with all the bells and whistles that work on windows I invoke configure as:

./configure --with-zlib=tree --with-openssl=C:/Programs/MinGW/msys/1.0/local/ssl --json --with-tcl --with-tcl-stubs --with-tcl-private-stubs --with-th1-docs --with-th1-hooks

Of course, you need to point configure at the correct location for SSL.

I normally build outside of the source tree, so the configure invocation is usually something like ../../fossil/configure

Built this way, my builds also pass the fossil test suite available by saying make test.

There are other ways to build on Windows, including using MinGW at a CMD prompt, or using Visual Studio's compiler instead. The "official" documentation is here:

  https://www.fossil-scm.org/index.html/doc/trunk/www/build.wiki


I've been looking at the wildcard globbing from command line issue, and the bottom line is that out of the box MinGW and MSVC both defer to the Microsoft C Runtime Library to get argv[] initialized. There is a mechanism available at link time to tell it not to glob before main() is entered, but its complicated. No one is happy. Lots of shouting on mailing lists. More yak shaving and bike shedding. Also, sadly, no changes. It doesn't help that MS has been changing what they do in edge cases from release to release, making it even harder to figure out what to do to build code that does what you assume you wanted.

--
Ross Berteig                               r...@cheshireeng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/
+1 626 303 1602

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to