Skip to content

Conversation

arjendekorte
Copy link
Contributor

The problem is newer binutils will no longer default to --copy-dt-needed-entries but use --no-copy-dt-needed-entries instead. So all libraries needed must be provided.

Workarounds (either one works)

  1. Add "-Wl,--copy-dt-needed-entries" to LDFLAGS to bring back the old behavior of the linker
  2. Add "-lz" to list of libraries to be added

In "ext/mysqlnd/mysqlnd_protocol_frame_codec.c" when the "zlib.h" header is included should also trigger adding '-lz' to the list of libraries.

The problem is newer binutils will no longer default to --copy-dt-needed-entries but use --no-copy-dt-needed-entries instead. So all libraries needed *must* be provided.

Workarounds (either one works)
1) Add "-Wl,--copy-dt-needed-entries" to LDFLAGS to bring back the old behavior of the linker
2) Add "-lz" to list of libraries to be added

In "ext/mysqlnd/mysqlnd_protocol_frame_codec.c" when the "zlib.h" header is included should also trigger adding '-lz' to the list of libraries.
@cmb69 cmb69 added the Bug label Nov 26, 2019
Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there's also some leftover mess in pdo_mysql, where it uses a --with-zlib-dir option, but only with libmysql, not with mysqlnd.

@nikic
Copy link
Member

nikic commented Dec 5, 2019

Merged as ee4295b.

@nikic nikic closed this Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants