Bug 196053 - databases/postgresql93-server fails to build when DTrace enabled
Summary: databases/postgresql93-server fails to build when DTrace enabled
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: pgsql
Depends on:
Reported: 2014-12-17 07:39 UTC by Luca Ferrari
Modified: 2018-01-16 11:13 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Luca Ferrari 2014-12-17 07:39:50 UTC
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
Comment 1 Luca Ferrari 2014-12-17 07:48:14 UTC
Same issue trying to compile PostgreSQL 9.4-b4.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2014-12-17 19:21:29 UTC
Fix Summary and assign.
Comment 3 Hiroo Ono 2015-04-13 13:42:45 UTC
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.
Comment 4 Martin S. Weber 2016-07-11 16:16:58 UTC
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
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
gmake[1]: *** [Makefile:147: utils/probes.h] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/databases/postgresql94-server/wo
*** Error code 2

I haven't tested out Hiro Oono's hints yet.
Comment 5 w.schwarzenfeld freebsd_triage 2018-01-16 09:43:26 UTC
Is this still relevant?
Comment 6 Luca Ferrari 2018-01-16 11:12:54 UTC
(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.