Open pmqs opened 6 months ago
Would the coverage test also be the place to test whether large file support is working properly? Both the MinGW and MinGW-w64 (default build) targets appear to have never worked properly for large files (>4GB). See https://github.com/madler/zlib/pull/934. BTW the mingw32 toolchain of MinGW-w64 is not the same as MinGW (the original, "MinGW.org").
Would the coverage test also be the place to test whether large file support is working properly?
No. infcover is a deep test of just the inflate code, which has nothing to do with large files. Or with files at all for that matter.
infcover needs to be used with a libz that was built using configure's --cover
option. Then you should get output that looks like this:
File 'infback.c'
Lines executed:100.00% of 302
Creating 'infback.c.gcov'
File 'inffast.c'
Lines executed:99.47% of 190
Creating 'inffast.c.gcov'
File 'inflate.c'
Lines executed:95.87% of 823
Creating 'inflate.c.gcov'
File 'inftrees.c'
Lines executed:100.00% of 139
Creating 'inftrees.c.gcov'
infcover needs to be used with a libz that was built using configure's
--cover
option. Then you should get output that looks like this:File 'infback.c' Lines executed:100.00% of 302 Creating 'infback.c.gcov' File 'inffast.c' Lines executed:99.47% of 190 Creating 'inffast.c.gcov' File 'inflate.c' Lines executed:95.87% of 823 Creating 'inflate.c.gcov' File 'inftrees.c' Lines executed:100.00% of 139 Creating 'inftrees.c.gcov'
Just looking at an Ubuntu build on my dev box, I don't see the coverage code in play at all when I run ./configure --warn; make test
.
To get Ubuntu to run the coverage tests I need ./configure --warn --cover; make test cover
.
Not sure why the MINGW code is triggering it at all with my previous attempt , given I didn't ask for coverage.
Let's try adding --cover
anyway... ok, that makes things 50% better. Now all the gcc
builds work fine.
On the flip side, all the clang
builds fail (see https://github.com/pmqs/zlib/actions/runs/7874628236/job/21484681152)
/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: libz.a(inflate.o/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld):inflate.c:(.text+0x647a): undefined reference to `llvm_gcda_start_file'
: minigzip.o:minigzip.c/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld:(: .text+0xlibz.af97(): undefined reference to `inflate.o):inflate.c:(.text+0x64ad): undefined reference to `llvm_gcda_emit_function'
llvm_gcda_start_file'
/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: : libz.a(inflate.o):minigzip.oinflate.c::(minigzip.c:(.text+0xfa9): undefined reference to `llvm_gcda_emit_function'
.text+0x64b8): undefined reference to `/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ldllvm_gcda_emit_arcs: minigzip.o:minigzip.c:'
(.text+0xfba)/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: undefined reference to `llvm_gcda_emit_arcs'
This link https://github.com/msys2/MINGW-packages/issues/2148 suggests that coverage on windows with clang is (or has been) broken.
Next try disabling the cover
tests for clang
. That fails in the standard tests (see https://github.com/pmqs/zlib/actions/runs/7875157382/job/21486417752)
hello world
gzprintf err:
zlib version 1.3.1.1-motley = 0x1311, compile flags = 0xa9
uncompress(): hello, hello!
*** zlib test FAILED ***
make: *** [Makefile:85: teststatic] Error 1
I think the gzprintf err:
line is from example.c
Trying out a MinGW workflow (see https://github.com/pmqs/zlib/actions/runs/7862720591/job/21452504884)
I'm running
configure
, which appears to be ok.It builds fine & the standard tests pass,
but is failing in the coverage test