Summary: | lang/php5 Fails to Compile | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Martin Vahi <martin.vahi> |
Component: | Individual Port(s) | Assignee: | Alex Dupre <ale> |
Status: | Closed FIXED | ||
Severity: | Affects Many People | CC: | markj, miwi, smh |
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Martin Vahi
2014-06-05 16:46:58 UTC
You didn't specify environment and OPTIONS selected, I could imagine you are building php with DTRACE enabled inside a 9/10 jail, isn't it? Got the same here today building on 10.0-RELEASE not in a jail:- dtrace: failed to compile script /wrkdirs/usr/ports/lang/php55/work/php-5.5.16/Zend/zend_dtrace.d: "/usr/lib/dtrace/ip.d", line 226: operator -> cannot be applied to a forward declaration: no struct ip definition is available Actually this was being built in a jail as it was poudriere building php. Is there a way to make this work? None that I'm aware of. It seems a known problem of dtrace inside jail, probably this should be brought to the attention of dtrace maintainer. Copying /boot/kernel/* into the poudriere tree and recreating the poudriere @clean snapshot fixed this for me. Good to know it! (In reply to Alex Dupre from comment #1) > You didn't specify environment and OPTIONS selected, I could imagine you are > building php with DTRACE enabled inside a 9/10 jail, isn't it? Yes, it was in a FreeBSD jail, but shouldn't the jail be a lightweight version of an operating system specific virtual machine? If so, then, according to my unpopular opinion, package building failures in a jail is a flaw (bug). If the flaw exists due to a flawed component, in this case, the proposed "dtrace", then a line of thought that a system is flawed as long as at least one of its sub-components is flawed, seems reasonable to me. That's why I think that this flaw report should not be closed until it actually is resolved. I propose that this flaw report stays open for about a year and then I'll test with some newer version of FreeBSD, if the flaw can be detected, its symptoms reproduced. Thank You for Your efforts and thank You for reading my comment. :-) The problem you have is you have is your install is missing a dependency required for compilation of php with dtrace enabled. Installing said dependency into your build environment, as described in my previous comment, is the fix. If you run the build in a full host and not a jail this is problem doesn't occur. It could be useful to know what's exactly the dependency required. I could set a BROKEN tag with the explaination if the file is missing. (In reply to Alex Dupre from comment #9) > It could be useful to know what's exactly the dependency required. I could > set a BROKEN tag with the explanation if the file is missing. If the dtrace option is selected, then the contents of the machines /boot/kernel/ directory are required. Obviously on a raw machine those are always present but when building in a jail they aren't. Simply copying in the contents of /boot/kernel/ from the host machine into the jail will satisfy the build type dependencies for dtrace. Another requirement is that the dtrace modules are loaded on the host machine. To do this run: dtrace -l > /dev/null As Steven pointed out, the kernel needs to be available for DTrace to work. When dtrace -h runs, it processes /usr/lib/dtrace/* and makes use of CTF data from the kernel file, so in a jail, it'll fail if the kernel isn't available. However, dtrace -h and dtrace -G (i.e. the options used when building ports with DTrace probes) don't need to process /usr/lib/dtrace/*, and there's a flag to tell them not to: -xnolibs. So one fix would be to add -xnolibs to dtrace invocations in the php build. Many ports have this already. A commit references this bug: Author: ale Date: Thu Nov 27 09:41:20 UTC 2014 New revision: 373474 URL: https://svnweb.freebsd.org/changeset/ports/373474 Log: Fix build into jails with DTRACE enabled. PR: 190662 Submitted by: Martin Vahi <martin.vahi@softf1.com> Changes: head/lang/php5/Makefile head/lang/php5/files/patch-acinclude.m4 head/lang/php5/pkg-plist head/lang/php55/Makefile head/lang/php55/files/patch-acinclude.m4 head/lang/php55/pkg-plist head/lang/php56/Makefile head/lang/php56/files/patch-acinclude.m4 head/lang/php56/pkg-plist |