Bug 234903 - devel/libphutil: php72-libphutil-20181231 depends on file: /usr/local/lib/php/20170718/xml.so - not found
Summary: devel/libphutil: php72-libphutil-20181231 depends on file: /usr/local/lib/php...
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Walter Schwarzenfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-12 16:56 UTC by Roman Bogorodskiy
Modified: 2019-08-28 12:18 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (grembo)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Bogorodskiy freebsd_committer freebsd_triage 2019-01-12 16:56:26 UTC
I have php72-libphutil-20181231 failing in my poudriere builds for quite some time with this error:

===>   php72-libphutil-20181231 depends on file: /usr/local/lib/php/20170718/xml.so - not found
===>   Installing existing package /packages/All/php72-xml-7.2.13.txz
[current-local-job-06] Installing php72-xml-7.2.13...
[current-local-job-06] Extracting php72-xml-7.2.13: ........ done
===>   php72-libphutil-20181231 depends on file: /usr/local/lib/php/20170718/xml.so - not found
*** Error code 1

I don't build it directly, it's coming via devel/arcanist dependencies:

[01:00:47] [06] [00:00:00] Building devel/libphutil@php72 | php72-libphutil-20181231           
[01:02:03] [06] [00:01:16] Finished devel/libphutil@php72 | php72-libphutil-20181231: Failed: run-depends
[01:02:03] [06] [00:01:16] Skipping devel/arcanist | arcanist-php72-20181231_1: Dependent port devel/libphutil | php72-libphutil-20181231 failed

Jail's make.conf looks like this:

OPTIONS_SET=    DEBUG
OPTIONS_UNSET=  NLS DOCS EXAMPLES TEST MANPAGES

Build log: https://people.freebsd.org/~novel/misc/php72-libphutil-20181231.log
Comment 1 Michael Gmelin freebsd_committer freebsd_triage 2019-01-16 17:30:53 UTC
Using your settings:

  #### /usr/local/etc/poudriere.d/current-make.conf ####
  OPTIONS_SET=	DEBUG
  OPTIONS_UNSET=	NLS DOCS EXAMPLES TEST MANPAGES
  ... 

I was able to reproduce the issue.

The underlying problem is that debug builds end up in a different directory ("-debug" is appended to PHP_EXT_DIR in Mk/Uses/php.mk). So php72-xml ends up in /usr/local/lib/php/20170718-debug/xml.so, while the build of devel/libphutil looks for it in /usr/local/lib/php/20170718/xml.so.

Other ports that rely on PHP extensions (like devel/phpsh or devel/rth) show the same behavior/breakage (poudriere testport devel/phpsh).

Now, the interesting part is that this only happens when building using poudriere. Local builds or building within a poudriere interactive shell (like the one you get when running "poudriere testport -i devel/libphutil") work just fine.

I didn't have the time to figure out why exactly this is happening (RAW_DEPENDS is set like that in bsd.port.mk). As a workaround I tried setting "WITH_DEBUG" in make.conf, which got the job done, so if you alter /usr/local/etc/poudriere.d/current-make.conf so it contains:

  WITH_DEBUG=1

your debug builds should work out okay.