Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 789084 - dev-util/systemtap does not install `dtrace` (was: app-emulation/qemu-5.2.0-r3 dev-util/systemtap-4.0-r1 missing dtrace)
Summary: dev-util/systemtap does not install `dtrace` (was: app-emulation/qemu-5.2.0-r...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2021-05-09 16:42 UTC by (kusoneko)
Modified: 2021-05-12 21:08 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
error (attachment-1,3.04 KB, text/plain)
2021-05-09 16:42 UTC, (kusoneko)
Details
which dtrace (attachment-2,346 bytes, text/plain)
2021-05-09 16:43 UTC, (kusoneko)
Details
e-file dtrace (attachment-3,330 bytes, text/plain)
2021-05-09 16:43 UTC, (kusoneko)
Details
emerge --info output (emergeinfo.txt,22.38 KB, text/plain)
2021-05-11 22:17 UTC, (kusoneko)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description (kusoneko) 2021-05-09 16:42:41 UTC
Created attachment 706710 [details]
error

Hello,

I updated my system today, and some software had to be rebuilt, included in these is app-emulation/qemu, which when using the systemtap USE flag, requires dev-util/systemtap, however, during compilation of QEMU, at the Source configuration stage, it fails with the following error:

[attachment 1 [details]]

And indeed there is no dtrace in my system:

[attachment 2 [details]]

When trying to find out which package provides dtrace so it can be installed:

[attachment 3 [details, diff]]

It's actually installed. Is dtrace missing from the systemtap package?
Comment 1 (kusoneko) 2021-05-09 16:43:11 UTC
Created attachment 706713 [details]
which dtrace
Comment 2 (kusoneko) 2021-05-09 16:43:39 UTC
Created attachment 706716 [details]
e-file dtrace
Comment 3 (kusoneko) 2021-05-09 16:45:38 UTC
The attachments lines in the original comment somehow point to the wrong files, they should point respectively to the error, which dtrace and e-file dtrace attachments I added to this bug report.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-11 21:30:11 UTC
dev-util/systemtap-4.0-r1 here has dtrace on my system:

    $ qfile /usr/bin/dtrace
    dev-util/systemtap: /usr/bin/dtrace
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-11 21:35:02 UTC
Same for ~amd64 chroot:

    $ qfile -v /usr/bin/dtrace
    dev-util/systemtap-4.4: /usr/bin/dtrace

You will need to debug why systemtap does not install binary for you.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-11 21:41:26 UTC
Looking at https://sourceware.org/git/?p=systemtap.git;a=blob;f=Makefile.am;h=9264eb2af7d993b06a05e0eac1c59891c7ce8b68;hb=HEAD#l29

automake needs BUILD_TRANSLATOR to be set:
  29 if BUILD_TRANSLATOR
  30 bin_PROGRAMS += stap
  31 bin_SCRIPTS += dtrace

That is normally enabled by default:

https://sourceware.org/git/?p=systemtap.git;a=blob;f=configure.ac;h=d4fd9e1b02ae78517a3438bff6054525674c3cb8;hb=HEAD#l285

 285 dnl Handle the option to only build runtime
 286 AC_ARG_ENABLE([translator],
 287   AS_HELP_STRING([--disable-translator], [build only runtime utilities]),
 288   [],
 289   [enable_translator="yes"])
 290 AM_CONDITIONAL([BUILD_TRANSLATOR], [test "$enable_translator" = "yes"])

But I also do see https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/systemtap/files/systemtap-4.4-configure.ac-non-posix-test.patch

which has tweaks for non-bash.

Please post your emerge --info.
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-11 21:42:32 UTC
Ofer to swegener@ (dev-util/systemtap maintainer)
Comment 8 (kusoneko) 2021-05-11 22:17:46 UTC
Created attachment 707223 [details]
emerge --info output

My emerge --info output.
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-11 23:18:09 UTC
> sh dash 0.5.11.3-r1

Yeah, non-bash.

Perhaps systemtap with patch abowe will work for you.
Comment 10 (kusoneko) 2021-05-12 00:41:51 UTC
It did work, however I had to remove "HUNK 12" or "HUNK 13", not sure which one it was, from the file, the one below, anyways, as for some reason it fails to patch, presumably because these lines don't exist in the file, and emerge apparently doesn't like that 1 out of 15 HUNKs in a patch file fails. I can confirm however that /usr/bin/dtrace now exists. So problem solved. I tried applying the patch to version 4.4 by adding it to the accept keywords file, since the file claims to be a patch for version 4.4, but the entire patch failed in that case, so that's an odd name the patch file has considering it doesn't actually work on the version it says it's intended for.


@@ -801,11 +801,11 @@ if test "$enable_monitor" != "no"; then
 dnl Check for presence of json-c and ncurses for use in monitor mode
 PKG_CHECK_MODULES([jsonc], [json-c >= 0.11], [have_jsonc=yes], [have_jsonc=no])
 PKG_CHECK_MODULES([ncurses], [ncurses], [have_ncurses=yes], [have_ncurses=no])
-if test "${have_jsonc}" == "yes" -a "${have_ncurses}" == yes; then
+if test "${have_jsonc}" = "yes" -a "${have_ncurses}" = yes; then
   AC_DEFINE([HAVE_MONITOR_LIBS],[1],[Define to 1 if json-c and ncurses libraries are installed])
 fi
 fi
-AM_CONDITIONAL([HAVE_MONITOR_LIBS], [test "${have_jsonc}" == "yes" -a "${have_ncurses}" == "yes" -a "$enable_monitor" != "no"])
+AM_CONDITIONAL([HAVE_MONITOR_LIBS], [test "${have_jsonc}" = "yes" -a "${have_ncurses}" = "yes" -a "$enable_monitor" != "no"])
 
 AC_CACHE_CHECK([for assembler .section "?" flags support], stap_cv_sectionq, [
 old_CFLAGS="$CFLAGS"
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-12 07:01:38 UTC
(In reply to (kusoneko) from comment #10)
> It did work, however I had to remove "HUNK 12" or "HUNK 13", not sure which
> one it was, from the file, the one below, anyways, as for some reason it
> fails to patch, presumably because these lines don't exist in the file, and
> emerge apparently doesn't like that 1 out of 15 HUNKs in a patch file fails.
> I can confirm however that /usr/bin/dtrace now exists. So problem solved. I
> tried applying the patch to version 4.4 by adding it to the accept keywords
> file, since the file claims to be a patch for version 4.4, but the entire
> patch failed in that case, so that's an odd name the patch file has
> considering it doesn't actually work on the version it says it's intended
> for.

If dev-util/systemtap-4.4 did not work for you as is then it should be fixed. Why closing the bug?
Comment 12 Sven Wegener gentoo-dev 2021-05-12 21:08:24 UTC
I can't reproduce any issues on 4.4. The patch is applied cleanly by the ebuild and I don't get any errors with /bin/sh being linked to dash.
I've stabilized 4.4 on amd64/x86 to get the fix to stable and if this issue persists for you, please reopen with a build log of 4.4.