Tested on FreeBSD-10.2-release. When compiling PostgreSQL 9.3.5 from ports enabling dtrace the compilation fails: gmake -C utils probes.h gmake[3]: Entering directory '/mnt/ada1a/ports/databases/postgresql93-server/work/postgresql-9.3.5/src/backend/utils' dtrace -C -h -s probes.d -o probes.h.tmp dtrace: failed to compile script probes.d: "/usr/lib/dtrace/ip.d", line 2: type redeclared: struct devinfo Makefile:38: recipe for target 'probes.h' failed gmake[3]: *** [probes.h] Error 1 gmake[3]: Leaving directory '/mnt/ada1a/ports/databases/postgresql93-server/work/postgresql-9.3.5/src/backend/utils' Makefile:157: recipe for target 'utils/probes.h' failed gmake[2]: *** [utils/probes.h] Error 2 gmake[2]: Leaving directory '/mnt/ada1a/ports/databases/postgresql93-server/work/postgresql-9.3.5/src/backend' *** Error code 2 Tested on i386. Cross link to pgsql-general mailing list: http://www.spinics.net/lists/pgsql/msg156241.html
Same issue trying to compile PostgreSQL 9.4-b4.
Fix Summary and assign.
There is some discussion here: http://postgresql.nabble.com/9-3-5-failing-to-compile-with-dtrace-on-FreeBSD-10-1-td5830887.html The dtrace command reads the information of kernel modules, so the kernel modules have to be loaded and kernel module files under /boot/kernel/ must exist. To make it compile, I did: 1) kldload dtraceall 2) copied /boot/kernel/* under ${jailpath}/boot/kernel/ The latter is needed because I am using poudriere, which builds packages under a jail. It seems difficult to deal with inside the ports framework, but should be documented somewhere, I think.
for postgresql94-server (in poudriere) it fails with a different message: gmake -C utils probes.h gmake[2]: Entering directory '/wrkdirs/usr/ports/databases/postgresql94-server/w ork/postgresql-9.4.8/src/backend/utils' dtrace -C -h -s probes.d -o probes.h.tmp dtrace: failed to compile script probes.d: "/usr/lib/dtrace/psinfo.d", line 37: syntax error near "uid_t" gmake[2]: *** [Makefile:38: probes.h] Error 1 gmake[2]: Leaving directory '/wrkdirs/usr/ports/databases/postgresql94-server/wo rk/postgresql-9.4.8/src/backend/utils' gmake[1]: *** [Makefile:147: utils/probes.h] Error 2 gmake[1]: Leaving directory '/wrkdirs/usr/ports/databases/postgresql94-server/wo rk/postgresql-9.4.8/src/backend' *** Error code 2 I haven't tested out Hiro Oono's hints yet.
Is this still relevant?
(In reply to w.schwarzenfeld from comment #5) I guess no, both because now PostgreSQL in on 10.1, as well as it has been reported almost 2 years and half ago. Therefore, I'm closing.