DTrace build failure on FreeBSD 14
I got a report from a FreeBSD CURRENT user that GHC 8.10.4 fails to build with DTrace enabled. Here's the log:
"/usr/sbin/dtrace" -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Iincludes/dist-install/build -Irts -Irts/dist/build -C -h -o rts/dist/build/RtsProbes.h -s rts/RtsProbes.d
dtrace: failed to compile script rts/RtsProbes.d: "/usr/lib/dtrace/psinfo.d", line 1: failed to copy type of 'pr_gid': Conflicting type is already defined
gmake[2]: *** [rts/ghc.mk:618: rts/dist/build/RtsProbes.h] Error 1
I worked it around by passing --enable-dtrace=0
on recent FreeBSD versions.
FreeBSD Bugzilla link for reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256424 Full build log: https://bz-attachments.freebsd.org/attachment.cgi?id=225566