Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistencies in ZLIB-1.2.11 builds using mingw-w64 and MSVC on Windows #258

Closed
sav-ix opened this issue May 8, 2017 · 6 comments
Closed

Comments

@sav-ix
Copy link

sav-ix commented May 8, 2017

Hello, everyone,

Got few issues with ZLIB builds on Windows.

  1. For builds using mingw-w64 with asm code usage got error:
sh-4.4$ make -f win32/Makefile.gcc LOC=-DASMV OBJA=match.o
[snip]
deflate.c:91:11: note: #pragma message: Assembler code may have bugs -- use at your own risk
 #  pragma message("Assembler code may have bugs -- use at your own risk")
           ^~~~~~~
[snip]
make: *** No rule to make target 'match.o', needed by 'libz.a'.  Stop.

And testsuite run finishes with errors:

sh-4.4$ make test testdll -f win32/Makefile.gcc
[snip]
ar rcs libz.a adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
gcc  -o example.exe example.o libz.a
libz.a(deflate.o):deflate.c:(.text+0x745): undefined reference to `longest_match'
libz.a(deflate.o):deflate.c:(.text+0x1444): undefined reference to `longest_match'
libz.a(deflate.o):deflate.c:(.text+0x1ce1): undefined reference to `match_init'
libz.a(deflate.o):deflate.c:(.text+0x3fee): undefined reference to `match_init'
libz.a(deflate.o):deflate.c:(.text+0x43da): undefined reference to `match_init'
collect2.exe: error: ld returned 1 exit status
make: *** [win32/Makefile.gcc:101: example.exe] Error 1

Not reproduced for mingw-w64 builds without LOC=-DASMV OBJA=match.o keys and for MSVC builds with LOC="-DASMV -DASMINF -I."... keys.

  1. Missing install and uninstall rules in file win32/Makefile.msc, which available in win32/Makefile.gcc.

  2. Usage instructions in files win32/Makefile.gcc and win32/Makefile.msc are significantly different, though relate to the same platform.

Environment:

  • Windows 10 x64,
  • VS 2015 Update 3,
  • Windows SDK 10.0.14393.33,
  • mingw-w64 6.3.0,
  • MSYS2 20161025,
  • ZLIB-1.2.11.

Alexander

@rhuijben
Copy link

See also issue #41. I would recommend just disabling the unsupported assembly code and using the well tested C code.

@sav-ix
Copy link
Author

sav-ix commented May 11, 2017

That's understandable. But asm code usage for builds using mingw-w64 described in appropriate Makefile. It meant that it should be built without errors.

@madler
Copy link
Owner

madler commented Oct 13, 2017

The assembler code will be removed.

@madler madler closed this as completed Oct 13, 2017
@sav-ix
Copy link
Author

sav-ix commented Oct 13, 2017

I see, thank you.
What about issues (2) and (3)? Should they be reported as separate tickets, or they're none significant and won't be fixed?

@madler
Copy link
Owner

madler commented Oct 13, 2017

Please resubmit the other issues. Thanks.

@sav-ix
Copy link
Author

sav-ix commented Oct 13, 2017

Done, see: #306 and #307 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants