Skip to content

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

Description

@evantorrie
  • 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

Activity

  1. added
    zlibIssues and PRs related to the zlib module and its compression dependencies.
    on Oct 15, 2016
  2. mscdex commented on Oct 15, 2016

    @mscdex
    Contributor
  3. bnoordhuis commented on Oct 16, 2016

    @bnoordhuis
    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.

  4. bradleythughes commented on Oct 16, 2016

    @bradleythughes
    Member

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

  5. added a commit that references this issue on Oct 18, 2016
  6. added a commit that references this issue on Oct 18, 2016
  7. bnoordhuis commented on Oct 21, 2016

    @bnoordhuis
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    zlibIssues and PRs related to the zlib module and its compression dependencies.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions