[Bug 257525] lang/ruby26: add DTRACE option

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 06 Sep 2021 12:36:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257525

--- Comment #7 from Evgeniy Khramtsov <evgeniy@khramtsov.org> ---
(In reply to Steve Wills from comment #5)

> What is the error? Was it posted previously and I'm missing it?

See v1 commit message:

compiling dmyenc.c
linking miniruby
ld: error: undefined symbol: __dtraceenabled_ruby___array__create
>>> referenced by array.c
>>>               array.o:(ary_new)
>>> referenced by array.c
>>>               array.o:(rb_ary_new)
>>> referenced by array.c
>>>               array.o:(rb_assoc_new)
>>> referenced 27 more times

> The linked commit doesn't seem to explain much.
> It seems like it would really be helpful if you could be more specific about the issue(s) you seem to be encountering.
> You seem to be saying that you have set these [...] options in src.conf
> and an additional patch to enable using external LLVM toolchain.

FreeBSD base system includes LLVM based toolchain, and if one follows CURRENT,
then each update from source can take hours due to LLVM build. While there are
different ways to solve this via meta mode or ccache, the most efficient way
to lessen compile times is to not build the base toolchain, and use
devel/llvm12
from ports instead. LLVM from ports can also be fetched using poudriere-devel
pkg seeding via '-b' option, resulting in no compile time for LLVM. This allows
me to build both kernel+world in less than 5 minutes using cheap (QTJ2)
hardware.

I did the same for my poudriere build jail and installed devel/llvm12 as
toolchain. The ports LLVM != base LLVM; the base one can link DTrace symbols
(in www/node, etc) while ports one can't. Maybe the ports LLVM can't link them
due to diff between base LLVM, or the base LLVM includes some headers by
default, or I don't have related toolchain binaries in $PATH symlinked to
/usr/local/llvm12/*.

This is not an issue to me; I don't use DTRACE options in ports and opted to
turn them off instead. The only ports that I use that have non-optional DTRACE
are lang/ruby2*.

> Full build log you get when trying to build ruby with this configuration it might help?

Sorry, but I can't expose my environment, as this is an infoleak that can help
crafting exploits and puts me in risk. I prefer to have unique binaries. I
already posted the required steps to reproduce this.

> True the option to disable DTRACE is harmless, at the same time, we try not to add unnecessary options as each one adds a maintenance work in the long term.

Currently DTrace support is an "automagic" option (which some folks dislike),
but I think that the main rationale to include DTRACE as an option, is ports
tree consistency. My use case happens to need this.

> sysutils/py-diffoscope

Thanks.

-- 
You are receiving this mail because:
You are the assignee for the bug.