The updated lang/php5 port with 5.4.3 is actually installing extensions to the 20100525 directory, but the bsd.php.mk is using 20100412. For example, when building www/phpmyadm, it checks for converters/php5-mbstring existing with 20100412 ===> Verifying install for /usr/local/lib/php/20100412/mbstring.so in /usr/ports/converters/php5-mbstring However, the actual extension was installing to: /usr/local/lib/php/20100525/mbstring.so Fix: Took 20100525 from Zend/zend_modules.h ./work/php-5.4.3/Zend/zend_modules.h:#define ZEND_MODULE_API_NO 20100525
Responsible Changed From-To: freebsd-ports-bugs->ale Over to maintainer (via the GNATS Auto Assign Tool)
State Changed From-To: open->feedback PHP_EXT_DIR is taken from PHP_API_VERSION, not ZEND_MODULE_API_NO. Probably you have a screwed up installation, remove all PHP ports, delete /usr/local/include/php and reinstall again.
Yes I think you are correct. I've been unable to recreate this myself after more testing. I wiped everything and rebuilt and it all seems fine. Also, I see that if /usr/local/etc/php.conf exists it is using php-config to find the directory, so my patch doesn't help anyway. You can close this. Thanks, Bryan Drewery
State Changed From-To: feedback->closed Closed.
I actually think this is still needed and have found an easy way to reproduce the problem. Normally, if php is already installed (checking for /usr/local/etc/php.conf), it will run `php-config --extension-dir` to find the directory. If it is not installed, it falls back on PHP_EXT_DIR in bsd.php.mk. On every installation I've done with php54 the extension dir is coming out as the Zend API of 20100525 and *not* 20100412. This creates an invalid RUN_DEPENDS for ports if PHP is not installed (yet). You can easily see the problem if you create a new jail, mount ports, then try to install databases/phpmyadmin without having PHP already installed. 9# make -C /usr/ports/databases/phpmyadmin -VPHP_EXT_DIR 20100412 9# make -C /usr/ports/databases/phpmyadmin -VRUN_DEPENDS /usr/local/include/php/main/php.h:/usr/ports/lang/php5 /usr/local/lib/php/20100412/ctype.so:/usr/ports/textproc/php5-ctype /usr/local/lib/php/20100412/session.so:/usr/ports/www/php5-session /usr/local/lib/php/20100412/filter.so:/usr/ports/security/php5-filter /usr/local/lib/php/20100412/mbstring.so:/usr/ports/converters/php5-mbstring /usr/local/lib/php/20100412/json.so:/usr/ports/devel/php5-json /usr/local/lib/php/20100412/bz2.so:/usr/ports/archivers/php5-bz2 /usr/local/lib/php/20100412/gd.so:/usr/ports/graphics/php5-gd /usr/local/lib/php/20100412/openssl.so:/usr/ports/security/php5-openssl /usr/local/lib/php/20100412/pdf.so:/usr/ports/print/pecl-pdflib /usr/local/lib/php/20100412/zlib.so:/usr/ports/archivers/php5-zlib /usr/local/lib/php/20100412/mcrypt.so:/usr/ports/security/php5-mcrypt /usr/local/lib/php/20100412/mbstring.so:/usr/ports/converters/php5-mbstring /usr/local/lib/php/20100412/zip.so:/usr/ports/archivers/php5-zip /usr/local/lib/php/20100412/apc.so:/usr/ports/www/pecl-APC /usr/local/lib/php/20100412/mysqli.so:/usr/ports/databases/php5-mysqli 9# make -C /usr/ports/lang/php5 install <snip> 9# make -C /usr/ports/databases/phpmyadmin -VPHP_EXT_DIR 20100525 9# php-config --extension-dir /usr/local/lib/php/20100525 9# make -C /usr/ports/databases/phpmyadmin -VRUN_DEPENDS /usr/local/include/php/main/php.h:/usr/ports/lang/php5 /usr/local/lib/php/20100525/ctype.so:/usr/ports/textproc/php5-ctype /usr/local/lib/php/20100525/session.so:/usr/ports/www/php5-session /usr/local/lib/php/20100525/filter.so:/usr/ports/security/php5-filter /usr/local/lib/php/20100525/mbstring.so:/usr/ports/converters/php5-mbstring /usr/local/lib/php/20100525/json.so:/usr/ports/devel/php5-json /usr/local/lib/php/20100525/bz2.so:/usr/ports/archivers/php5-bz2 /usr/local/lib/php/20100525/gd.so:/usr/ports/graphics/php5-gd /usr/local/lib/php/20100525/openssl.so:/usr/ports/security/php5-openssl /usr/local/lib/php/20100525/pdf.so:/usr/ports/print/pecl-pdflib /usr/local/lib/php/20100525/zlib.so:/usr/ports/archivers/php5-zlib /usr/local/lib/php/20100525/mcrypt.so:/usr/ports/security/php5-mcrypt /usr/local/lib/php/20100525/mbstring.so:/usr/ports/converters/php5-mbstring /usr/local/lib/php/20100525/zip.so:/usr/ports/archivers/php5-zip /usr/local/lib/php/20100525/apc.so:/usr/ports/www/pecl-APC /usr/local/lib/php/20100525/mysqli.so:/usr/ports/databases/php5-mysqli As you can see, the RUN_DEPENDS have changed just by installing PHP. The impact of this is that by not having PHP already installed, and going straight to something that depends on PHP and extensions, it will keep the PHP_EXT_DIR=20100412 in its environment, and expect the extensions to be there later, when they really are in 20100525. 9# pkg_delete -af 9# make -C /usr/ports/databases/phpmyadmin -VPHP_EXT_DIR 20100412 9# make -C /usr/ports/databases/phpmyadmin install <snip> ===> phpMyAdmin-3.5.1 depends on file: /usr/local/lib/php/20100412/ctype.so - not found ===> Verifying install for /usr/local/lib/php/20100412/ctype.so in /usr/ports/textproc/php5-ctype ^C 9# pkg_info -L php5-ctype-5.4.3|grep lib /usr/local/lib/php/20100525/ctype.so You can see here that the RUN_DEPENDS does not match the actual installed file. Of course, now that PHP is installed, running -VPHP_EXT_DIR, or make install on phpmyadmin, properly uses the 20100525 API. This is causing problems when building packages with ports-mgmt/poudriere with ports-mgmt/pkgng, since files are not being installed where expected. Regards, Bryan Drewery
State Changed From-To: closed->open The originator reports that the problem still exists, and I have experienced it myself while trying to build www/horde-base.
State Changed From-To: open->closed Fixed, thanks.
ale 2012-05-24 21:01:35 UTC FreeBSD ports repository Modified files: Mk bsd.php.mk Log: Fix PHP_EXT_DIR. PR: ports/167984 Submitted by: "Bryan Drewery" <bryan@shatow.net> Revision Changes Path 1.71 +2 -2 ports/Mk/bsd.php.mk _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"