Bug 206215 - databases/mysql57-{server,client}: Use zlib from the system (not bundled)
Summary: databases/mysql57-{server,client}: Use zlib from the system (not bundled)
Status: Closed DUPLICATE of bug 198812
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Mahdi Mokhtari
URL:
Keywords: patch
Depends on:
Blocks: 206998
  Show dependency treegraph
 
Reported: 2016-01-13 22:05 UTC by klaus
Modified: 2016-02-15 04:38 UTC (History)
1 user (show)

See Also:


Attachments
Add Option to System or bundled zlib (953 bytes, patch)
2016-01-13 22:05 UTC, klaus
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description klaus 2016-01-13 22:05:21 UTC
Created attachment 165529 [details]
Add Option to System or bundled zlib

Similar to PR 198812 i have an issue in PHP, also listed as possible bug in php, 
see https://bugs.php.net/bug.php?id=70276

Mysql 5.7 uses a bundled zlib version (1.2.3) by default.

If Apache is used with dbd-mysql driver (e. g. in www/mod_myvhost), the php script shows an error message like this when accessing PNG files:

PHP Warning:  imagecreatefrompng(): gd-png:  fatal libpng error: bad parameters to zlib in ...

This however does not occur when the CLI version of PHP 5.6 is used

To fix this i modified databases/mysql57-server/Makefile and added an optional CMAKE_FLAG to make mysql57-client link to the system zlib version.

Maybe this should be added to other mysql versions too ?

*****

My System config in short: 
FreeBSD 10.2-RELEASE-p7 (amd64)
PHP 5.6.17, Mysql57.10 client and server, Apache 2.4.18, apr mit dbd-mysql
Comment 1 Mahdi Mokhtari freebsd_committer freebsd_triage 2016-02-10 21:01:51 UTC
Thanks for your point :D
It will be solved with upgrading to 5.7.11
Comment 2 klaus 2016-02-10 23:47:49 UTC
I forgot to mention that after upgrading a test machine to mysql 5.7 i had an error in rebuilding devel/apr1 (with mysql) as apr-utils configure script 
checks for the libmysqlclient_r.* file and did not build the dbd-mysql driver.

I fixed this issue with manually created symlinks.

I saw that PR 206805 is already dealing with that workaround ... :-)
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2016-02-11 03:26:10 UTC
@Madhi

* It's preferable to keep fixes and updates separate, can this change go in separately?

* Using system libraries should be the default
Comment 4 Mahdi Mokhtari freebsd_committer freebsd_triage 2016-02-11 15:47:59 UTC
(In reply to Kubilay Kocak from comment #3)
@Kubilay,yeah we can do that :D
At first (before i see this issue) i generated that patch and then i see this issue, so i just told the reporter, the problem has been solved.

BTW, if you think it's better to obsolete that patch and regenerate two ones (one upgrades mysql and uses system-libs except for zlib, and one patch for using system-zlib for this issue), i'm okay to do that.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2016-02-15 04:38:22 UTC
This is a duplicate of bug 198812, as it reports the same logical issue. Mahdi has provided patches to both mysql56-* and mysql57-* ports in bug 198812

*** This bug has been marked as a duplicate of bug 198812 ***