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

configure includes wrong zconf.h in out-of-tree builds #499

Closed
dankegel opened this issue May 22, 2020 · 5 comments
Closed

configure includes wrong zconf.h in out-of-tree builds #499

dankegel opened this issue May 22, 2020 · 5 comments

Comments

@dankegel
Copy link
Contributor

Out-of-tree compilation fails if you do out-of-tree cmake build and make build sequentially.

Evidently configure's out-of-tree build sometimes pulls in a stale zconf.h
(either the system's, or the default one checked into the top of the source tree)
rather than the one it generated.

dankegel added a commit to dankegel/zlib that referenced this issue May 22, 2020
@nmoinvaz
Copy link
Contributor

nmoinvaz commented May 22, 2020

CI #492 should have out of source build configuration to ensure that future CMake changes still work with out of source builds.

@dankegel
Copy link
Contributor Author

dankegel commented May 22, 2020

Oh, quite. I discovered this bug while writing a CI test to verify that out-of-tree make and cmake build/install produce identical results. See CI for dankegel#5.

dankegel added a commit to dankegel/zlib that referenced this issue May 24, 2020
dankegel added a commit to dankegel/zlib that referenced this issue May 24, 2020
…and madler#499

Probably want to be careful about using same
compiler for both builds in general, but for
now, hide it behind the FreeBSD conditional,
since that's where I hit the problem.

Run cmake first and configure/make second, see
issue madler#499 (build breaks due to zconf.h missing)

Add to cirrus CI unixlike builds.
@tbeu
Copy link
Contributor

tbeu commented May 25, 2020

Duplicate of #344.

@dankegel
Copy link
Contributor Author

No, not quite. It's related, but even if there were no CMakeLists.txt at all, this bug would exist and be real.

dankegel added a commit to dankegel/zlib that referenced this issue May 26, 2020
…and madler#499

Run cmake first and configure/make second, see
issue madler#499 (build breaks due to zconf.h missing)

ci: add fedora, debian; use matrix and a template in .cirrus.yml
dankegel added a commit to dankegel/zlib that referenced this issue May 26, 2020
dankegel added a commit to dankegel/zlib that referenced this issue May 26, 2020
ci/pkgcheck.sh: verify make and cmake install same bits, and
that running configure/make doesn't try to reference wrong zconf.h.
dankegel added a commit to dankegel/zlib that referenced this issue May 26, 2020
ci/pkgcheck.sh: verify make and cmake install same bits, and
that running configure/make doesn't try to reference wrong zconf.h.
@madler
Copy link
Owner

madler commented Jan 20, 2024

Should be addressed by 9404df5 .

@madler madler closed this as completed Jan 20, 2024
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

4 participants