This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author swills
Recipients swills
Date 2016-12-26.19:19:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1482779942.39.0.346100216113.issue29077@psf.upfronthosting.co.za>
In-reply-to
Content
When enabling dtrace support via the --with-dtrace configure flag, build fails on FreeBSD with this message:

/usr/sbin/dtrace  -o Include/pydtrace_probes.h -h -s
dtrace: option requires an argument -- s

Looks like line 882 of Makefile.pre.in:

    882         $(DTRACE) $(DFLAGS) -o $@ -h -s $<

changing this to:

    882         $(DTRACE) $(DFLAGS) -o $@ -h -s $(srcdir)/Include/pydtrace.d

avoids that issue. Note that bmake is being used here.

After this however, another issue is encountered during linking:

Python/ceval.o: In function `_PyEval_EvalFrameDefault':
Python/ceval.c:(.text+0xc94): undefined reference to `__dtraceenabled_python___function__entry'
Python/ceval.c:(.text+0xcdd): undefined reference to `__dtrace_python___function__entry'
Python/ceval.c:(.text+0xff0): undefined reference to `__dtraceenabled_python___line'
Python/ceval.c:(.text+0x109f): undefined reference to `__dtrace_python___line'
Python/ceval.c:(.text+0x125e): undefined reference to `__dtraceenabled_python___line'
Python/ceval.c:(.text+0x12e5): undefined reference to `__dtraceenabled_python___line'
Python/ceval.c:(.text+0x1358): undefined reference to `__dtraceenabled_python___line'
Python/ceval.c:(.text+0x13f2): undefined reference to `__dtraceenabled_python___line'
Python/ceval.c:(.text+0x146c): undefined reference to `__dtraceenabled_python___line'
Python/ceval.o:Python/ceval.c:(.text+0x14de): more undefined references to `__dtraceenabled_python___line' follow
Python/ceval.o: In function `_PyEval_EvalFrameDefault':
Python/ceval.c:(.text+0x87f2): undefined reference to `__dtraceenabled_python___function__return'
Python/ceval.c:(.text+0x8833): undefined reference to `__dtrace_python___function__return'
Modules/gcmodule.o: In function `collect':
Modules/gcmodule.c:(.text+0x380): undefined reference to `__dtraceenabled_python___gc__start'
Modules/gcmodule.c:(.text+0x38c): undefined reference to `__dtrace_python___gc__start'
Modules/gcmodule.c:(.text+0xe1b): undefined reference to `__dtraceenabled_python___gc__done'
Modules/gcmodule.c:(.text+0xe2a): undefined reference to `__dtrace_python___gc__done'

which I believe is due to dtrace -G modifying Python/ceval.o and Modules/gcmodule.o. 

Finally, note that all calls to dtrace -G or dtrace -h on FreeBSD 11.0 should have -xnolibs added to enable use without the DTrace kernel modules loaded. Otherwise dtrace processes the /usr/lib/dtrace scripts unnecessarily, and errors out when it tries to talk to the DTrace kernel code, causing build failure in a jail.

(I can provide patches, but suspect you have preferences about how the build system work that I'm not aware of, so wanted to explain before patching in ways that aren't satisfactory.)
History
Date User Action Args
2016-12-26 19:19:02swillssetrecipients: + swills
2016-12-26 19:19:02swillssetmessageid: <1482779942.39.0.346100216113.issue29077@psf.upfronthosting.co.za>
2016-12-26 19:19:02swillslinkissue29077 messages
2016-12-26 19:19:01swillscreate