# Why is poudriere building lang/php56?



## aaronbaugher (Jul 21, 2017)

I've just started using poudriere, and it's awesome; I'm blown away by how easy it makes things.  But I'm running into one puzzle I can't figure out.

I created the list of files to give `poudriere bulk -f` with `portmaster --list-origins`, on a system with php 7.1 installed, so there are a couple of php71 ports in the list.  Nothing related to php56 as far as I can tell, and PHP 5.6 wasn't installed on the system I built the list from.  But poudriere insists on building lang/php56, devel/php56-json, and www/php56-session, along with all the other stuff it's building.  `poudriere pkgclean` doesn't offer to remove them, so apparently it thinks they're needed, but I can't figure out why. 

I wouldn't care about 3 unnecessary packages, but I'm also trying to build databases/pecl-memcached, and poudriere refuses because that's BROKEN with PHP 5.6, and apparently it sees that first instead of seeing that PHP 7.1 is also built.

So how can I figure out why it's building those three?  I tried querying with 'pkg rquery %ro' on each of them, but that reports that php56 has reverse dependences on the other two, and that neither of those two has any reverse dependencies at all.  I've also manually searched through the +MANIFEST files of all the packages in the repository, since those list dependencies, and the only ones that mention php56 at all are those three.

I don't have a make.conf, either globally or in poudriere.d, that could be specifying a PHP version.  Any other ideas?  Is there some way to get poudriere to show a dependency tree or something like that, to see why it chooses to build each port that it does?  Thanks.


----------



## SirDice (Jul 21, 2017)

Set the correct DEFAULT_VERSIONS in poudriere's make.conf. The default PHP version is 5.6 so everything that requires PHP will be built for PHP 5.6.


```
DEFAULT_VERSIONS+= php=7.1
```


----------



## aaronbaugher (Jul 21, 2017)

Thanks, that makes sense, and I see that now in Mk/Uses/php.mk.  What threw me was that I couldn't find anything that should be requiring PHP at all, regardless of version.  But what required it was databases/pecl-memcached.  I just wasn't seeing that dependency because I was searching the built packages, and it wasn't able to build that one.


----------

