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

6.8.1 fails to fix const error for shared-zlib older than 1.2.5 #9110

Closed
evantorrie opened this issue Oct 15, 2016 · 4 comments
Closed

6.8.1 fails to fix const error for shared-zlib older than 1.2.5 #9110

evantorrie opened this issue Oct 15, 2016 · 4 comments
Labels
zlib Issues and PRs related to the zlib subsystem.

Comments

@evantorrie
Copy link
Contributor

  • Version: 6.8.1
  • Platform: Redhat Linux 6.8, DevToolset 4 toolchain (gcc 5.3)
  • Subsystem: compilation

ZLIB_CONST was added in zlib-1.2.5.2 (see http://zlib.net/ChangeLog.txt)

Redhat Linux 6.8 is still on zlib-1.2.3, and as such does not have the ZLIB_CONST feature.

Even with the change in #9077, compiling nodejs wih --shared-zlib fails on this system, with the same error as 6.8.0

../src/inspector_agent.cc:179:32: error: invalid conversion from ‘const uint8_t* {aka const unsigned char*}’ to ‘Bytef* {aka unsigned char*}’ [-fpermissive]
    strm.next_in = PROTOCOL_JSON + 3;

In versions of zlib prior to 1.2.5.2, strm.next_in will never be const

@mscdex mscdex added the zlib Issues and PRs related to the zlib subsystem. label Oct 15, 2016
@mscdex
Copy link
Contributor

mscdex commented Oct 15, 2016

/cc @bradleythughes ?

@bnoordhuis
Copy link
Member

We could simply drop the ZLIB_CONST changes and const_cast PROTOCOL_JSON. I hate the thought of adding ugly hacks for obsolete software but it's too small of an issue to take a principal stand.

@bradleythughes
Copy link
Member

I was going to suggest the same thing. I'll see if I can get a PR up later this evening.

bradleythughes added a commit to bradleythughes/node that referenced this issue Oct 16, 2016
This define is not available in zlib prior to version 1.2.5.2. See
nodejs#9110 for details. Workaround the
build breakage reported by casting away const in src/inspector_agent.cc
instead.
rvagg pushed a commit that referenced this issue Oct 18, 2016
This define is not available in zlib prior to version 1.2.5.2. See
#9110 for details. Workaround the
build breakage reported by casting away const in src/inspector_agent.cc
instead.

PR-URL: #9122
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
jasnell pushed a commit that referenced this issue Oct 18, 2016
This define is not available in zlib prior to version 1.2.5.2. See
#9110 for details. Workaround the
build breakage reported by casting away const in src/inspector_agent.cc
instead.

PR-URL: #9122
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
@bnoordhuis
Copy link
Member

Closing, fix released in v6.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants