Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to determine correct PHP_EXT_DIR when ZTS option enabled in lang/php55 #330

Closed
infracaninophile opened this issue Jul 9, 2015 · 2 comments

Comments

@infracaninophile
Copy link
Member

I'm getting a number of failed PHP module or application builds since updating to poudriere-devel-3.1.99.20150608.

I have set ZTS in the options for lang/php55:

lucid-nonsense:...local/etc/poudriere.d:# cat options/lang_php55/options 
# This file is auto-generated by 'make config'.
# Options for php55-5.5.26
_OPTIONS_READ=php55-5.5.26
_FILE_COMPLETE_OPTIONS_LIST=CLI CGI FPM EMBED DEBUG DTRACE IPV6 MAILHEAD LINKTHR ZTS
OPTIONS_FILE_SET+=CLI
OPTIONS_FILE_SET+=CGI
OPTIONS_FILE_SET+=FPM
OPTIONS_FILE_UNSET+=EMBED
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_UNSET+=DTRACE
OPTIONS_FILE_SET+=IPV6
OPTIONS_FILE_UNSET+=MAILHEAD
OPTIONS_FILE_SET+=LINKTHR
OPTIONS_FILE_SET+=ZTS          <<<----****

So, for example, extracted from the log of building php55-xmlrpc:

Sequence of events is:

  • poudriere sets up the make environment:
--PLIST_SUB--
PHP_EXT_DIR=20121212    <<<----*** Should be 20121212-zts in my environment
OSREL=10.2
PREFIX=%D
LOCALBASE=/usr/local
RESETPREFIX=/usr/local
PORTDOCS=""
  • then later it installs php55:
=======================<phase: build-depends  >============================
===>   php55-xmlrpc-5.5.26 depends on file: /usr/local/include/php/main/php.h - not found
===>   Installing existing package /packages/All/php55-5.5.26.txz
[pkgrepo.infracaninophile.co.uk] Installing php55-5.5.26...
[pkgrepo.infracaninophile.co.uk] `-- Installing libxml2-2.9.2_3...
[pkgrepo.infracaninophile.co.uk] `-- Extracting libxml2-2.9.2_3: .......... done
[pkgrepo.infracaninophile.co.uk] `-- Installing pcre-8.37_1...
[pkgrepo.infracaninophile.co.uk] `-- Extracting pcre-8.37_1: .......... done
[pkgrepo.infracaninophile.co.uk] Extracting php55-5.5.26: .......... done
  • then it installs php55-xml:
===>   Returning to build of php55-xmlrpc-5.5.26
===>   php55-xmlrpc-5.5.26 depends on file: /usr/local/bin/phpize - found
===>   php55-xmlrpc-5.5.26 depends on file: /usr/local/lib/php/20121212/xml.so - not found
===>   Installing existing package /packages/All/php55-xml-5.5.26.txz
[pkgrepo.infracaninophile.co.uk] Installing php55-xml-5.5.26...
[pkgrepo.infracaninophile.co.uk] Extracting php55-xml-5.5.26: ....... done
===>   php55-xmlrpc-5.5.26 depends on file: /usr/local/lib/php/20121212/xml.so - not found
*** Error code 1

Kaboom!
which is because php55-xml installs into /usr/local/lib/php/20121212-zts/xml.so

PHP_EXT_DIR should be initialized by this chunk of code in bsd.php.mk:

    48  PHPBASE?=       ${LOCALBASE}
    49  .if exists(${PHPBASE}/etc/php.conf)
    50  .include "${PHPBASE}/etc/php.conf"
    51  PHP_EXT_DIR!=   ${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p'
    52  

Which depends on the presence of ${LOCALBASE}/etc/php.conf and ${LOCALBASE}/bin/php-config both of which are installed by the lang/php55 port, which obviously isn't present at the start of a poudriere build. The make environment needs reinitializing after lang/php55 is installed.

I'd call this a bug in the ports except that it used to work

@bapt
Copy link
Member

bapt commented Jul 9, 2015

@infracaninophile
Copy link
Member Author

Ah, OK. It is a ports bug really then. No point in keeping this issue open then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants