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

cywgin64 build broken under Windows 7 #238

Open
doko42 opened this issue Mar 13, 2017 · 8 comments · May be fixed by #248
Open

cywgin64 build broken under Windows 7 #238

doko42 opened this issue Mar 13, 2017 · 8 comments · May be fixed by #248

Comments

@doko42
Copy link

doko42 commented Mar 13, 2017

Reported at https://gcc.gnu.org/PR79771: After the import of zlib-1.2.11 in GCC trunk, the zlib in-tree build for cygwin64 is broken under Windows 7 (can't check this myself).

A possible patch / work around can be found at
https://github.com/Alexpux/MSYS2-packages/blob/master/zlib/1.2.11-cygwin-no-widechar.patch

@yselkowitz
Copy link

That patch is insufficient, please use the following instead:

https://github.com/cygwinports/zlib/blob/master/1.2.11-gzopen_w.patch

@madler
Copy link
Owner

madler commented Mar 13, 2017

Doesn't taking it out of zlib.def make it unavailable in the Windows DLL? That function is there only for Windows.

@yselkowitz
Copy link

@madler sorry, you are correct about that part; I guess we'll just have to continue carrying that patch. But zlib.h should also be patched to not declare the function.

@AraHaan
Copy link
Contributor

AraHaan commented Apr 6, 2017

maybe what could happen is the makefile can check if __CYGWIN__ is defined and if so then define some macro for the building that makes it think that you are building for linux. Maybe name it LINUX_LIKE_ENVIRON? and then when __CYGWIN__ is defined then the makefile processes an cygwin specific zlib.def file?

I am not so good with makefiles though so, I cannot propose an patch to it myself. But that is an idea so you guys do not have to carry your own patch. I am still Waiting for Linus Torwalds to update his linux kernel to use the latest zlib as well (with some modifications to work for the linux kernel needs) maybe updating it's zlib from an monkey patched v1.2.3 could help fix some issues like unexplained data corruption in things.

@yselkowitz
Copy link

You seem to be confusing C preprocessor macros with environment variables.

A plausible option would be to add a second .def file for Cygwin without gzopen_w, and then define a (e.g.) DEFFILE=win32/zlib.def variable defined in and used throughout Makefile.gcc, which I could then override on the make command-line (as I already do with SHAREDLIB).

@AraHaan AraHaan linked a pull request Apr 6, 2017 that will close this issue
@AraHaan
Copy link
Contributor

AraHaan commented Apr 6, 2017

I rolled out a different patch in particular. let me know if it fixes stuff.

@yselkowitz
Copy link

That would cause gzopen_w to not be exported in a MinGW build either.

jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 pushed a commit to jeking3/zlib that referenced this issue Nov 23, 2017
pull requests through Travis CI and Appveyor.

Fix cygwin build issues.

Recommend everyone use cmake to generate build
environments, and consider checked-in projects
or makefiles to be deprecated.  The generated
build will always be correct, and proven by CI.

This fixes madler#162
This fixes madler#238
This fixes madler#307
jeking3 added a commit to jeking3/zlib that referenced this issue Nov 24, 2017
pull requests through Travis CI and Appveyor
using cmake to generate and build the project.
The following targets are built:

Travis:
  - gcc (Debug, RelWithDebInfo, and Release)
  - valgrind (Debug)
  - ubsan (Debug)

Appveyor:
  - Visual Studio 2010 (Release)
  - Visual Studio 2015 (Debug, RelWithDebInfo, and Release)
  - Cygwin (Release)
  - Cygwin64 (Release)
  - MinGW (Release)
  - MinGW-w64 (Release)
  - MSYS2 (Release)

This fixes madler#238
jeking3 added a commit to jeking3/zlib that referenced this issue Nov 24, 2017
pull requests through Travis CI and Appveyor
using cmake to generate and build the project.
The following targets are built:

Travis:
  - gcc (Debug, RelWithDebInfo, and Release)
  - valgrind (Debug)
  - ubsan (Debug)

Appveyor:
  - Visual Studio 2010 (Release)
  - Visual Studio 2015 (Debug, RelWithDebInfo, and Release)
  - Cygwin (Release)
  - Cygwin64 (Release)
  - MinGW (Release)
  - MinGW-w64 (Release)
  - MSYS2 (Release)

This closes madler#169
This fixes madler#238
jeking3 added a commit to jeking3/zlib that referenced this issue Nov 24, 2017
pull requests through Travis CI and Appveyor
using cmake to generate and build the project.
The following targets are built:

Travis:
  - gcc (Debug, RelWithDebInfo, and Release)
  - valgrind (Debug)
  - ubsan (Debug)

Appveyor:
  - Visual Studio 2010 (Release)
  - Visual Studio 2015 (Debug, RelWithDebInfo, and Release)
  - Cygwin (Release)
  - Cygwin64 (Release)
  - MinGW (Release)
  - MinGW-w64 (Release)
  - MSYS2 (Release)

This closes madler#169
This fixes madler#238
@MaEtUgR
Copy link

MaEtUgR commented Jun 28, 2018

I have an easy fix pending against the develop branch.
Use it by executing the following in your repo:

git fetch origin pull/367/head:pr-cygwin-fix
git checkout pr-cygwin-fix
cmake .
make

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