# PHP Ports install error Dtrace



## DannyKlenz (Sep 22, 2013)

I*'*m trying to install PHP from /usr/ports/lang/php5 using `make install clean` and get this error:


```
dtrace: failed to compile script /usr/ports/lang/php5/work/php-5.4.19/Zend/zend_dtrace.d: "/usr/lib/dtrace/psinfo.d", line 37: syntax error near "uid_t"
*** [Zend/zend_dtrace_gen.h] Error code 1
1 error
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/lang/php5.
*** [install] Error code 1

Stop in /usr/ports/lang/php5.
```

I then run `make MAKE_JOBS_UNSAFE=yes install clean` and get this:


```
===>  Building for php5-5.4.19
dtrace -h -C -s /usr/ports/lang/php5/work/php-5.4.19/Zend/zend_dtrace.d -o Zend/zend_dtrace_gen.h && sed -ibak 's,PHP_,DTRACE_,g' Zend/zend_dtrace_gen.h
dtrace: failed to compile script /usr/ports/lang/php5/work/php-5.4.19/Zend/zend_dtrace.d: "/usr/lib/dtrace/psinfo.d", line 37: syntax error near "uid_t"
*** [Zend/zend_dtrace_gen.h] Error code 1

Stop in /usr/ports/lang/php5/work/php-5.4.19.
*** [do-build] Error code 1

Stop in /usr/ports/lang/php5.
*** [install] Error code 1

Stop in /usr/ports/lang/php5.
```

My knowledge is limited so im I'm at a disadvantage here. Any help would be much appreciated.


----------



## DannyKlenz (Sep 23, 2013)

Ok figured out that I need to add 
	
	



```
DEBUG="-g"
```
 to the kernel but I have no idea how to do it. From what I understand I use `config makeoptions DEBUG="-g"` but `config` just throws up its syntax when I try.


----------



## wblock@ (Sep 23, 2013)

It's already in the GENERIC kernel.  If you have built a custom kernel, add

```
makeoptions     DEBUG=-g
```
to the kernel configuration file and build and install the kernel.


----------



## DannyKlenz (Sep 23, 2013)

I apologize for the improper formatting, I will use it from here on out.


----------



## DannyKlenz (Sep 23, 2013)

wblock@ said:
			
		

> It's already in the GENERIC kernel.  If you have built a custom kernel, add
> 
> ```
> makeoptions     DEBUG=-g
> ...



I did find the option is there in /sys/amd64/conf/GENERIC

I liked the idea of using the ports because they seem to be more current than the repositories. In this instance it seems to be my only choice.


----------



## wblock@ (Sep 23, 2013)

For that matter, why is the DTrace option enabled?  It is not enabled by default in the port.


----------



## DannyKlenz (Sep 23, 2013)

wblock@ said:
			
		

> For that matter, why is the DTrace option enabled?  It is not enabled by default in the port.



I don't know why DTrace is enabled. I'm using an unaltered GENERIC kernel and did not change the port in any way.


----------



## wblock@ (Sep 23, 2013)

What does `make -C /usr/ports/lang/php5 showconfig` show?


----------



## DannyKlenz (Sep 23, 2013)

Here is the result:


```
===> The following configuration options are available for php5-5.4.19:
     CLI=on: Build CLI version
     CGI=on: Build CGI version
     FPM=on: Build FPM version
     APACHE=off: Build Apache module
     AP2FILTER=off: Use Apache 2.x filter interface (experimental)
     EMBED=on: Build embedded library
     DEBUG=off: Enable debug
     DTRACE=on: Enable DTrace support
     IPV6=on: Enable ipv6 support
     MAILHEAD=on: Enable mail header patch
     LINKTHR=on: Link thread lib (for threaded extensions)
     ZTS=off: Force Zend Thread Safety (ZTS) build
===> Use 'make config' to modify these settings
```

It looks like I enabled it on accident. I ran `make clean` and `make rmconfig` then reinstalled without DTrace and everything completed successfully.

Thank you for your help!


----------

