Bug #77876 [Opn->Csd]: PHP linked with system version of libpng

From: Date: Sat, 04 May 2019 13:03:10 +0000
Subject: Bug #77876 [Opn->Csd]: PHP linked with system version of libpng
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220702@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77876&edit=1

 ID:                 77876
 Updated by:         petk@php.net
 Reported by:        mrskman at gmail dot com
 Summary:            PHP linked with system version of libpng
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            *Compile Issues
 Operating System:   Linux (Ubuntu 12.04)
 PHP Version:        7.3.4
-Assigned To:        
+Assigned To:        petk
 Block user comment: N
 Private report:     N

 New Comment:

This is then resolved for the PHP 7.3.

For the PHP 7.4, they have migrated to pkg-config so to override the libpng there:

PNG_CFLAGS=-I/path/to/libpng/include/ \
PNG_LIBS=/path/to/libpng/lib \
./configure --enable-mbstring

In case these should be done somehow differently solved, please send a pull request to check it out
(keep in mind that there are now several extensions already using this, so things need to be
consistent with other extensions). Environment variables might seem a bit weird but you get used to
them also. The migration hasn't been done by me though :). Thank you.


Previous Comments:
------------------------------------------------------------------------
[2019-04-14 23:28:59] spam2 at rhsoft dot net

> So, what needs to be fixed here? It all works ok. Yes?

PHP <= 7.3 versions using custom compiled libpng libraries that are installed on custom locations
can be done using: --with-png-dir=/path/to/libpng/usr/local

"PHP 7.4 is using pkg-config so something like this won't work anymore. There the
environment variables will need to be used in front of ./configure command..."

------------------------------------------------------------------------
[2019-04-14 23:06:09] petk@php.net

So, what needs to be fixed here? It all works ok. Yes? On prehistoric Linux versions such as Ubuntu
12.04 that aren't supported upstream either anymore, PHP later versions most certainly
won't be possible to compile without major patches and adjustments anyway...

------------------------------------------------------------------------
[2019-04-14 18:56:21] spam2 at rhsoft dot net

this remains a bug

what is the point of need env vars in case one supplied a pretty clear argument to configure itself
- just set that var implicit instead blindly use pkgcongig when told not to do

------------------------------------------------------------------------
[2019-04-14 18:51:04] petk@php.net

Hello, PHP <= 7.3 versions using custom compiled libpng libraries that are installed on custom
locations can be done using:

    ./configure --with-gd --with-png-dir=/path/to/libpng/usr/local

Note the usr/local attached at the end. The config.m4 file checking for the location
will first check for the custom location provided with the configure option, then go to system
/usr/include directory and so on.

http://git.php.net/?p=php-src.git;a=blob;f=ext/gd/config.m4;h=498d870785e86ff4a49d87082e3fed2a4c4d32f9;hb=refs/heads/PHP-7.3#l129


PHP 7.4 is using pkg-config so something like this won't work anymore. There the environment
variables will need to be used in front of ./configure command...

------------------------------------------------------------------------
[2019-04-12 23:00:22] mrskman at gmail dot com

I can reproduce this issue also with 7.2.17 and 7.3.4 versions

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=77876


--
Edit this bug report at https://bugs.php.net/bug.php?id=77876&edit=1


Thread (10 messages)

« previous php.bugs (#220702) next »