On 3/11/2016 4:27 PM, Ross Berteig wrote:
On 3/11/2016 3:40 PM, Joe Mistachkin wrote:
Ross Berteig wrote:
....
This raises another question, is there a reason to prefer miniz over
zlib or vice-versa?
Please prefer zlib, it's far more well tested.
OK.

I've been building on Windows with miniz due to installation friction
with zlib (probably some trivial issue, but using miniz has been the
path of least resistance).


I thought I made the zlib compilation stuff work seamlessly on Windows
(using both MinGW and MSVC). I'm eager to hear how its broken so that I
can fix it.

If I use win/Makefile.mingw, then the zlib from compat/zlib is built and
links just fine with no friction other than remembering to build in-tree
from MSYS bash. (Out of tree may work now, I didn't re-check.)

But lately I've been preferring to use your improvements to ./configure
which now works great on Windows, at least from the MSYS port of bash.
It is much better at specifying features.

However, it fails to find zlib.h and wants --with-zlib=tree to use the
in-tree version. I'm not sure how new that option is, I noticed
--with-miniz first, it worked, and I've not looked back. I'll switch
recipes to zlib for now.

I just noticed today that after cleaning up all extra files (except the new fossil wiki test case I was planning to test a little before formally fossil adding) in my repo, the out-of-tree build no longer works when taking zlib from the tree. It fails the build with a link error because nothing actually built the in-tree zlib.a:

$ ../fossil4/configure --with-zlib=tree --with-openssl=none
$ make
....
cc.exe: error: C:/Users/Ross/Documents/tmp/fossil4/compat/zlib/libz.a: No such file or directory
make: *** [fossil.exe] Error 1
$ fossil --chdir ../fossil4 extra
default.tag
test/wiki.test
$

I just checked an in-tree build and got the same link error:

$ ../fossil4/configure --with-zlib=tree --with-openssl=none
$ make
....
cc.exe: error: C:/Users/Ross/Documents/tmp/fossil4/compat/zlib/libz.a: No such file or directory
make: *** [fossil.exe] Error 1

I contrast that with using make -f win/Makefile.mingw which as I noted earlier did assume the in-tree zlib and importantly, build it.

I now suspect that was the friction I saw with continuing to use zlib, that caused me to prefer miniz. When I switched to using ./configure --with-zlib=tree, it zlib wasn't built for me. Except that sometimes if I had done a make -f win/Makefile.mingw recently and not noticed, a built zlib.a was just sitting there and ./configure --with-zlib=tree worked, as it did when I sent that last email.

Shouldn't ./configure fail to the in-tree versions of things that are
provided in tree?

Or is the consensus that the user needs to make that decision and affirm
it with --with-zlib=tree?

I think these are both still valid questions. To which I'd add, am I wrong to expect --with-zlib=tree to build zlib.a for me?


--
Ross Berteig                               [email protected]
Cheshire Engineering Corp.           http://www.CheshireEng.com/
+1 626 303 1602
_______________________________________________
fossil-dev mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev

Reply via email to