Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Dec 2021 02:11:13 +0000
From:      bugzilla-noreply@freebsd.org
To:        ruby@FreeBSD.org
Subject:   maintainer-feedback requested: [Bug 260831] lang/ruby26, lang/ruby27, lang/ruby3[01]: patch for making dtrace an optional feature
Message-ID:  <bug-260831-21402-3pQShfsxdn@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-260831-21402@https.bugs.freebsd.org/bugzilla/>
References:  <bug-260831-21402@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-ruby (Nobody)
<ruby@FreeBSD.org> for maintainer-feedback:
Bug 260831: lang/ruby26, lang/ruby27, lang/ruby3[01]: patch for making dtra=
ce
an optional feature
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260831



--- Description ---
The lang/ruby2[67] port builds will automatically enable dtrace support if
dtrace is installed.=20

The lang/ruby3[01] builds - extending of a changeset upstream - will not
provide any dtrace support for these Ruby versions, on FreeBSD.

Referring to the FreeBSD Wiki[2], DTrace support may be available for users=
pace
in FreeBSD, at least if the kernel is built with -fno-omit-frame-pointer in
CFLAGS then installed as unstripped bytecode. Otherwise, running dtrace on =
an
application may require superuser privileges.

The Ruby 2.6 and Ruby 2.7 builds presently will incorporate dtrace support,=
 if
available.

The following patch (attached) makes DTrace a build option for Ruby, in all
versions on FreeBSD

This differs from previous port behaviors:

- For Ruby 2.6 and 2.7, ensures that dtrace probes will not be added if the
dtrace option is disabled, whether or not dtrace is installed

- For Ruby 3.0 and 3.1, this adds functionality that may not be available w=
ith
upstream Ruby builds on FreeBSD, in those recent Ruby releases. This change=
set
includes an autoconf patch ensuring that dtrace will not be disabled on Fre=
eBSD
under autoconf scripting, and will be enabled if requested for the build.=20

- If the dtrace option is enabled and dtrace is not installed, the port bui=
ld
will fail under IGNORE semantics

Corresponding to existing support for dtrace probes with Ruby 2.6 and Ruby =
2.7
on FreeBSD, the new dtrace option will be available for these Ruby language
platforms on FreeBSD amd64 and i386 architectures.

This patch has been tested with a rudimentary check using dtrace and a
dtrace-enabled Ruby 3.1 under a local build of FreeBSD 12.1-RELEASE-p1 amd6=
4.
The test was performed with the following shell command, under sudo:

dtrace -l -m libruby31.so.31 -c 'ruby31 -v'


[1] https://github.com/chrisa/ruby-dtrace=20
[2] https://wiki.freebsd.org/DTrace/KernelSupport



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-260831-21402-3pQShfsxdn>