Bug 214166 - The php "use" feature does not properly register dependency for mod_php 7
Summary: The php "use" feature does not properly register dependency for mod_php 7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Port Management Team
Depends on:
Reported: 2016-11-03 13:21 UTC by Vick Khera
Modified: 2016-11-03 14:49 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Vick Khera 2016-11-03 13:21:00 UTC
With DEFAULT_VERSIONS having php=7.0 set in make.conf, and a port specifies WANT_PHP_MOD=yes, the port build will look for libphp5.so and be unable to satisfy the dependency after installing the specified port, mod_php70. It should look for libphp7.so instead.

The error comes from line 191 of Mk/Uses/php.mk where it hard-codes libphp5.so as the file to find, yet uses ${MOD_PHP_PORT} to specify the dependency.  This variable is set to www/mod_php${PHP_VER} and PHP_VER is properly set to 70 by the settings in make.conf.

It looks like this (from poudriere log) for building one of my local meta ports to install a specific server configuration. Obviously, this works fine with PHP 5.6 since the library is properly named in the dependencies.

===>   kci-wordpressblog-8 depends on file: /usr/local/libexec/apache24/libphp5.so - not found
===>   Installing existing package /packages/All/mod_php70-7.0.12.txz
[pkg.kcilink.com] Installing mod_php70-7.0.12...
[pkg.kcilink.com] Extracting mod_php70-7.0.12: .... done
[activating module `php7' in /usr/local/etc/apache24/httpd.conf]
Message from mod_php70-7.0.12:

Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source

===>   kci-wordpressblog-8 depends on file: /usr/local/libexec/apache24/libphp5.so - not found
*** Error code 1

make: stopped in /usr/ports/local/kci-wordpressblog
====>> Cleaning up wrkdir
===>  Cleaning for kci-wordpressblog-8
Comment 1 Mathieu Arnold freebsd_committer 2016-11-03 14:49:13 UTC
Ah, yes. Fixed.
Comment 2 commit-hook freebsd_committer 2016-11-03 14:49:44 UTC
A commit references this bug:

Author: mat
Date: Thu Nov  3 14:49:07 UTC 2016
New revision: 425222
URL: https://svnweb.freebsd.org/changeset/ports/425222

  Fix depend on mod_php70.

  PR:		214166
  Reported by:	Vick Khera
  Sponsored by:	Absolight