GNU bug report logs - #52043
[PATCH 1/2] gnu: Add instrumentation packages.

Previous Next

Package: guix-patches;

Reported by: Olivier Dion <olivier.dion <at> polymtl.ca>

Date: Mon, 22 Nov 2021 19:15:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52043 in the body.
You can then email your comments to 52043 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Mon, 22 Nov 2021 19:15:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Olivier Dion <olivier.dion <at> polymtl.ca>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 22 Nov 2021 19:15:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Olivier Dion <olivier.dion <at> polymtl.ca>
To: guix-patches <at> gnu.org
Cc: Olivier Dion <olivier.dion <at> polymtl.ca>
Subject: [PATCH 1/2] gnu: Add instrumentation packages.
Date: Mon, 22 Nov 2021 14:13:22 -0500
* gnu/packages/instrumentation.scm: New file
(dyninst): New variable.
---
 gnu/local.mk                     |  1 +
 gnu/packages/instrumentation.scm | 56 ++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 gnu/packages/instrumentation.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 2513530d0d..3f190c4f6a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -307,6 +307,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/inklingreader.scm		\
   %D%/packages/inkscape.scm			\
   %D%/packages/installers.scm			\
+  %D%/packages/instrumentation.scm		\
   %D%/packages/ipfs.scm			\
   %D%/packages/irc.scm  			\
   %D%/packages/irods.scm  			\
diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
new file mode 100644
index 0000000000..cacd74ac0a
--- /dev/null
+++ b/gnu/packages/instrumentation.scm
@@ -0,0 +1,56 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Olivier Dion <olivier.dion <at> polymtl.ca>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages instrumentation)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages tbb)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system cmake)
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define-public dyninst
+  (package
+    (name "dyninst")
+    ;; Newer versions are not promoted on main home page and require libiberty.
+    (version "10.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/dyninst/dyninst/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32 "18bvmvm3l18lpw8fz9yrjkd6fwqvxg0j2xfhvkzx4xr5l73wcxw0"))))
+
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f
+       ;; STERILE_BUILD: Do not download/build third-party dependencies from
+       ;; source.
+       #:configure-flags
+       (list "-DSTERILE_BUILD=ON")))
+    (inputs
+     `(("elfutils" ,elfutils)
+       ("boost" ,boost)
+       ("tbb" ,tbb)
+       ("libomp" ,libomp)))
+    (home-page "https://dyninst.org/")
+    (synopsis "Dynamic instrumentation")
+    (description "Tools for binary instrumentation, analysis, and modification.")
+    (license license:lgpl2.0)))
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Mon, 22 Nov 2021 19:17:02 GMT) Full text and rfc822 format available.

Message #8 received at 52043 <at> debbugs.gnu.org (full text, mbox):

From: Olivier Dion <olivier.dion <at> polymtl.ca>
To: 52043 <at> debbugs.gnu.org
Cc: Olivier Dion <olivier.dion <at> polymtl.ca>
Subject: [PATCH 2/2] gnu: Move instrumentation tools to instrumentation module.
Date: Mon, 22 Nov 2021 14:16:05 -0500
* gnu/packages/linux.scm (lttng-ust, lttng-tools, babeltrace): Move to ...
* gnu/packages/instrumentation.scm: ... here.
---
 gnu/packages/instrumentation.scm | 162 +++++++++++++++++++++++++++++++
 gnu/packages/linux.scm           | 147 ----------------------------
 2 files changed, 162 insertions(+), 147 deletions(-)

diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index cacd74ac0a..b876551673 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -17,15 +17,86 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages instrumentation)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages datastructures)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages man)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages popt)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages tbb)
+  #:use-module (gnu packages xml)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
   #:use-module ((guix licenses) #:prefix license:))
 
+(define-public babeltrace
+  (package
+    (name "babeltrace")
+    (version "2.0.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp"))))
+
+    (build-system gnu-build-system)
+
+    (arguments
+     `(;; FIXME - When Python's bindings are enabled, tests do not pass.
+       #:configure-flags '("--enable-debug-info"
+                           "--enable-man-pages"
+                           "--disable-python-bindings"
+                           "--disable-python-plugins")
+                         #:phases
+                         (modify-phases %standard-phases
+                           ;; These are recommended in the project's README for a development
+                           ;; build configuration.
+                           (add-before 'configure 'set-environment-variables
+                             (lambda _
+                               (setenv "BABELTRACE_DEV_MODE" "1")
+                               (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
+    (inputs
+     `(("glib" ,glib)))
+    ;; NOTE - elfutils is used for the LTTng debug information filter
+    ;; component class.  This can be moved to `native-inputs` if
+    ;; `--enable-debug-info` is replaced by `--disable-debug-info` in
+    ;; `#:configure-flags`.
+    (propagated-inputs
+     `(("elfutils" ,elfutils)))
+    ;; NOTE - python-3 is set here for generating the bindings.  Users need to
+    ;; install python-3 in their profile in order to use these bindings.
+    (native-inputs
+     `(("asciidoc" ,asciidoc)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("pkg-config" ,pkg-config)
+       ("python-3" ,python-3)
+       ("python-sphinx" ,python-sphinx)
+       ("swig", swig)
+       ("xmltoman" ,xmltoman)))
+    (home-page "https://babeltrace.org/")
+    (synopsis "Trace manipulation toolkit")
+    (description "Babeltrace 2 is a framework for viewing, converting,
+transforming, and analyzing traces.  It is also the reference parser
+implementation of the Common Trace Format (CTF), produced by tools such as
+LTTng and barectf.  This package provides a library with a C API, Python 3
+bindings, and the command-line tool @command{babeltrace2}.")
+    (license license:expat)))
+
 (define-public dyninst
   (package
     (name "dyninst")
@@ -54,3 +125,94 @@ (define-public dyninst
     (synopsis "Dynamic instrumentation")
     (description "Tools for binary instrumentation, analysis, and modification.")
     (license license:lgpl2.0)))
+
+(define-public lttng-ust
+  (package
+    (name "lttng-ust")
+    (version "2.13.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://lttng.org/files/lttng-ust/"
+                                  "lttng-ust-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("liburcu" ,liburcu)
+       ("numactl" ,numactl)))
+    (native-inputs
+     `(("python" ,python-3)
+       ("pkg-config", pkg-config)))
+    (home-page "https://lttng.org/")
+    (synopsis "LTTng userspace tracer libraries")
+    (description "The user space tracing library, liblttng-ust, is the LTTng
+user space tracer.  It receives commands from a session daemon, for example to
+enable and disable specific instrumentation points, and writes event records
+to ring buffers shared with a consumer daemon.")
+    (license license:lgpl2.1+)))
+
+(define-public lttng-tools
+  (package
+    (name "lttng-tools")
+    (version "2.13.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://lttng.org/files/lttng-tools/"
+                                  "lttng-tools-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(;; FIXME - Currently there's a segmentation fault by swig when enabling
+       ;; Python's bindings.  Thus, bindings are disable here.  Replace
+       ;; `disable` by `enable` in #:configure-flags when this is fixed.
+       #:configure-flags '("--disable-python-bindings")
+                         ;; FIXME - Tests are disabled for now because one test hangs
+                         ;; indefinetely.  Also, parallel testing is not possible because of how
+                         ;; the lttng-daemon handles sessions.  Thus, keep parallel testing
+                         ;; disabled even after tests are enabled!
+                         #:tests? #f
+                         #:parallel-tests? #f
+                         #:phases
+                         (modify-phases %standard-phases
+                           (add-before 'configure 'set-environment-variables
+                             (lambda _
+                               (setenv "HOME" "/tmp")
+                               (setenv "LTTNG_HOME" "/tmp")))
+                           ;; We don't put (which "man") here because LTTng uses execlp.
+                           (add-after 'unpack 'patch-default-man-path
+                             (lambda _
+                               (substitute* "src/common/defaults.h"
+                                 (("/usr/bin/man") "man")))))))
+    ;; NOTE - Users have to install python-3 in their profile to use the
+    ;; bindings.  We don't put it in the inputs, because the rest of the tools
+    ;; can work without it.
+    (inputs
+     `(("liburcu" ,liburcu)
+       ("popt" ,popt)
+       ("numactl" ,numactl)))
+    (propagated-inputs
+     `(("kmod" ,kmod)
+       ("module-init-tools" ,module-init-tools)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("perl" ,perl)
+       ("libpfm4" ,libpfm4)
+       ("python-3" ,python-3)
+       ("swig" ,swig)
+       ("procps" ,procps)
+       ("which" ,which)
+       ("flex" ,flex)
+       ("bison" ,bison)
+       ("asciidoc" ,asciidoc)
+       ("libxml2" ,libxml2)
+       ("lttng-ust" ,lttng-ust)))
+    (home-page "https://lttng.org/")
+    (synopsis "LTTng userspace tracer libraries")
+    (description "The lttng-tools project provides a session
+daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command
+line for tracing control, a @code{lttng-ctl} library for tracing control and a
+@code{lttng-relayd} for network streaming.")
+    (license (list  license:gpl2 license:lgpl2.1))))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ece3c588e8..8456450e52 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -131,7 +131,6 @@ (define-module (gnu packages linux)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages slang)
-  #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
@@ -8110,152 +8109,6 @@ (define-public ell
 platforms, it is not limited to resource-constrained systems.")
     (license license:lgpl2.1+)))
 
-(define-public lttng-ust
-  (package
-    (name "lttng-ust")
-    (version "2.13.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://lttng.org/files/lttng-ust/"
-                                  "lttng-ust-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l"))))
-    (build-system gnu-build-system)
-    (inputs
-     `(("liburcu" ,liburcu)
-       ("numactl" ,numactl)))
-    (native-inputs
-     `(("python" ,python-3)
-       ("pkg-config", pkg-config)))
-    (home-page "https://lttng.org/")
-    (synopsis "LTTng userspace tracer libraries")
-    (description "The user space tracing library, liblttng-ust, is the LTTng
-user space tracer.  It receives commands from a session daemon, for example to
-enable and disable specific instrumentation points, and writes event records
-to ring buffers shared with a consumer daemon.")
-    (license license:lgpl2.1+)))
-
-(define-public lttng-tools
-  (package
-    (name "lttng-tools")
-    (version "2.13.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://lttng.org/files/lttng-tools/"
-                                  "lttng-tools-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(;; FIXME - Currently there's a segmentation fault by swig when enabling
-       ;; Python's bindings.  Thus, bindings are disable here.  Replace
-       ;; `disable` by `enable` in #:configure-flags when this is fixed.
-       #:configure-flags '("--disable-python-bindings")
-       ;; FIXME - Tests are disabled for now because one test hangs
-       ;; indefinetely.  Also, parallel testing is not possible because of how
-       ;; the lttng-daemon handles sessions.  Thus, keep parallel testing
-       ;; disabled even after tests are enabled!
-       #:tests? #f
-       #:parallel-tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'set-environment-variables
-           (lambda _
-             (setenv "HOME" "/tmp")
-             (setenv "LTTNG_HOME" "/tmp")))
-         ;; We don't put (which "man") here because LTTng uses execlp.
-         (add-after 'unpack 'patch-default-man-path
-           (lambda _
-             (substitute* "src/common/defaults.h"
-               (("/usr/bin/man") "man")))))))
-    ;; NOTE - Users have to install python-3 in their profile to use the
-    ;; bindings.  We don't put it in the inputs, because the rest of the tools
-    ;; can work without it.
-    (inputs
-     `(("liburcu" ,liburcu)
-       ("popt" ,popt)
-       ("numactl" ,numactl)))
-    (propagated-inputs
-     `(("kmod" ,kmod)
-       ("module-init-tools" ,module-init-tools)))
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("perl" ,perl)
-       ("libpfm4" ,libpfm4)
-       ("python-3" ,python-3)
-       ("swig" ,swig)
-       ("procps" ,procps)
-       ("which" ,which)
-       ("flex" ,flex)
-       ("bison" ,bison)
-       ("asciidoc" ,asciidoc)
-       ("libxml2" ,libxml2)
-       ("lttng-ust" ,lttng-ust)))
-    (home-page "https://lttng.org/")
-    (synopsis "LTTng userspace tracer libraries")
-    (description "The lttng-tools project provides a session
-daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command
-line for tracing control, a @code{lttng-ctl} library for tracing control and a
-@code{lttng-relayd} for network streaming.")
-    (license (list  license:gpl2 license:lgpl2.1))))
-
-(define-public babeltrace
-  (package
-    (name "babeltrace")
-    (version "2.0.4")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp"))))
-
-    (build-system gnu-build-system)
-
-    (arguments
-     `(;; FIXME - When Python's bindings are enabled, tests do not pass.
-       #:configure-flags '("--enable-debug-info"
-                           "--enable-man-pages"
-                           "--disable-python-bindings"
-                           "--disable-python-plugins")
-       #:phases
-       (modify-phases %standard-phases
-         ;; These are recommended in the project's README for a development
-         ;; build configuration.
-         (add-before 'configure 'set-environment-variables
-           (lambda _
-             (setenv "BABELTRACE_DEV_MODE" "1")
-             (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
-    (inputs
-     `(("glib" ,glib)))
-    ;; NOTE - elfutils is used for the LTTng debug information filter
-    ;; component class.  This can be moved to `native-inputs` if
-    ;; `--enable-debug-info` is replaced by `--disable-debug-info` in
-    ;; `#:configure-flags`.
-    (propagated-inputs
-     `(("elfutils" ,elfutils)))
-    ;; NOTE - python-3 is set here for generating the bindings.  Users need to
-    ;; install python-3 in their profile in order to use these bindings.
-    (native-inputs
-     `(("asciidoc" ,asciidoc)
-       ("bison" ,bison)
-       ("flex" ,flex)
-       ("pkg-config" ,pkg-config)
-       ("python-3" ,python-3)
-       ("python-sphinx" ,python-sphinx)
-       ("swig", swig)
-       ("xmltoman" ,xmltoman)))
-    (home-page "https://babeltrace.org/")
-    (synopsis "Trace manipulation toolkit")
-    (description "Babeltrace 2 is a framework for viewing, converting,
-transforming, and analyzing traces.  It is also the reference parser
-implementation of the Common Trace Format (CTF), produced by tools such as
-LTTng and barectf.  This package provides a library with a C API, Python 3
-bindings, and the command-line tool @command{babeltrace2}.")
-    (license license:expat)))
-
 (define-public kexec-tools
   (package
     (name "kexec-tools")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Tue, 23 Nov 2021 01:54:02 GMT) Full text and rfc822 format available.

Message #11 received at 52043 <at> debbugs.gnu.org (full text, mbox):

From: Olivier Dion <olivier.dion <at> polymtl.ca>
To: 52043 <at> debbugs.gnu.org
Cc: Olivier Dion <olivier.dion <at> polymtl.ca>
Subject: [PATCH v2 1/2] gnu: Add instrumentation packages.
Date: Mon, 22 Nov 2021 20:53:23 -0500
* gnu/packages/instrumentation.scm: New file
(dyninst): New variable.
---
 gnu/local.mk                     |  1 +
 gnu/packages/instrumentation.scm | 56 ++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 gnu/packages/instrumentation.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 3227fc3835..26dc098417 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -307,6 +307,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/inklingreader.scm		\
   %D%/packages/inkscape.scm			\
   %D%/packages/installers.scm			\
+  %D%/packages/instrumentation.scm		\
   %D%/packages/ipfs.scm			\
   %D%/packages/irc.scm  			\
   %D%/packages/irods.scm  			\
diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
new file mode 100644
index 0000000000..8b55b313dc
--- /dev/null
+++ b/gnu/packages/instrumentation.scm
@@ -0,0 +1,56 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Olivier Dion <olivier.dion <at> polymtl.ca>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages instrumentation)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages tbb)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system cmake)
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define-public dyninst
+  (package
+    (name "dyninst")
+    ;; Newer versions are not promoted on main home page and require libiberty.
+    (version "10.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/dyninst/dyninst/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32 "18bvmvm3l18lpw8fz9yrjkd6fwqvxg0j2xfhvkzx4xr5l73wcxw0"))))
+
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f
+       ;; STERILE_BUILD: Do not download/build third-party dependencies from
+       ;; source.
+       #:configure-flags
+       (list "-DSTERILE_BUILD=ON")))
+    (propagated-inputs
+     `(("elfutils" ,elfutils)
+       ("boost" ,boost)
+       ("tbb" ,tbb)
+       ("libomp" ,libomp)))
+    (home-page "https://dyninst.org/")
+    (synopsis "Dynamic instrumentation")
+    (description "Tools for binary instrumentation, analysis, and modification.")
+    (license license:lgpl2.0)))
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Fri, 10 Dec 2021 14:33:02 GMT) Full text and rfc822 format available.

Message #14 received at 52043 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Olivier Dion <olivier.dion <at> polymtl.ca>
Cc: 52043 <at> debbugs.gnu.org
Subject: Re: bug#52043: [PATCH 1/2] gnu: Add instrumentation packages.
Date: Fri, 10 Dec 2021 15:32:29 +0100
Hi,

Olivier Dion <olivier.dion <at> polymtl.ca> skribis:

> * gnu/packages/instrumentation.scm: New file
> (dyninst): New variable.

[...]

> +    (name "dyninst")
> +    ;; Newer versions are not promoted on main home page and require libiberty.

Note that there’s a ‘libiberty’ package.

> +    (version "10.2.1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/dyninst/dyninst/archive/v"
> +                                  version ".tar.gz"))

As reported by ‘guix lint’, this URL refers to an autogenerated
tarball whose content may change over time.

Could you instead use ‘git-fetch’?

> +    (synopsis "Dynamic instrumentation")
> +    (description "Tools for binary instrumentation, analysis, and modification.")

Please expound a bit and write full sentences:

  https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html

Otherwise LGTM.  Could you send an updated patch?

The second patch LGTM.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Sun, 12 Dec 2021 20:00:01 GMT) Full text and rfc822 format available.

Message #17 received at 52043 <at> debbugs.gnu.org (full text, mbox):

From: Olivier Dion <olivier.dion <at> polymtl.ca>
To: 52043 <at> debbugs.gnu.org
Cc: Olivier Dion <olivier.dion <at> polymtl.ca>
Subject: [PATCH v3 1/2] gnu: Add instrumentation packages.
Date: Sun, 12 Dec 2021 14:59:00 -0500
* gnu/packages/instrumentation.scm: New file
(dyninst): New variable.
---
 gnu/local.mk                     |  1 +
 gnu/packages/instrumentation.scm | 80 ++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)
 create mode 100644 gnu/packages/instrumentation.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index f485e733e0..012de73306 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -307,6 +307,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/inklingreader.scm		\
   %D%/packages/inkscape.scm			\
   %D%/packages/installers.scm			\
+  %D%/packages/instrumentation.scm		\
   %D%/packages/ipfs.scm			\
   %D%/packages/irc.scm  			\
   %D%/packages/irods.scm  			\
diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
new file mode 100644
index 0000000000..e9e821e80d
--- /dev/null
+++ b/gnu/packages/instrumentation.scm
@@ -0,0 +1,80 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Olivier Dion <olivier.dion <at> polymtl.ca>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages instrumentation)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages tbb)
+  #:use-module (guix build-system cmake)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages))
+
+(define-public dyninst
+  (package
+    (name "dyninst")
+    ;; Newer versions are not promoted on main home page.
+    ;; Upgrade to 12.0.1 if anyone require a newer version.
+    (version "10.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/dyninst/dyninst")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "1m04pg824rqx647wvk9xl33ri8i6mm0vmrz9924li25dxbr4zqd5"))))
+
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f
+       ;; STERILE_BUILD: Do not download/build third-party dependencies from
+       ;; source.
+       #:configure-flags
+       (list "-DSTERILE_BUILD=ON")
+       ;; NOTE: dyninst needs to search for shared libraries that are linked
+       ;; against the instrumented binary in order to rebuild the entire
+       ;; program.  For this purpose, one can use LD_LIBRARY_PATH or
+       ;; DYNISNT_REWRITER_PATHS environment variables to add paths for dyinst
+       ;; to search.  However, dyninst also tries to be smart by executing
+       ;; ldconfig, which is not portable.  If ldconfig is not available on
+       ;; the system, dyinst wrongly assumes that the shared libraries can not
+       ;; be found, even though it can.  This bad logic is still there with
+       ;; newer versions of dyinst.  Thus, this substitution makes the bad
+       ;; code path unreachable.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-bad-logic
+           (lambda _
+             (substitute* "dyninstAPI/src/linux.C"
+               (("if\\(\\!fgets\\(buffer, 512, ldconfig\\)\\)")
+                "fgets(buffer, 512, ldconfig); if (false)")))))))
+    (propagated-inputs
+     `(("elfutils" ,elfutils)
+       ("boost" ,boost)
+       ("tbb" ,tbb)
+       ("libomp" ,libomp)))
+    (home-page "https://dyninst.org/")
+    (synopsis "Dynamic instrumentation")
+    (description "Dyninst is a collection of libraries for instrumenting,
+analyzing and editing binaries.  It can attach to an existing program or
+create a new one out of an ELF file for analysis or modification.  It come
+with a handful of C++ libraries.")
+    (license license:lgpl2.0)))
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Sun, 12 Dec 2021 20:00:02 GMT) Full text and rfc822 format available.

Message #20 received at 52043 <at> debbugs.gnu.org (full text, mbox):

From: Olivier Dion <olivier.dion <at> polymtl.ca>
To: 52043 <at> debbugs.gnu.org
Cc: Olivier Dion <olivier.dion <at> polymtl.ca>
Subject: [PATCH v3 2/2] gnu: Move instrumentation tools to instrumentation
 module.
Date: Sun, 12 Dec 2021 14:59:01 -0500
* gnu/packages/linux.scm (lttng-ust, lttng-tools, babeltrace): Move to ...
* gnu/packages/instrumentation.scm: ... here.
---
 gnu/packages/instrumentation.scm | 162 +++++++++++++++++++++++++++++++
 gnu/packages/linux.scm           | 147 ----------------------------
 2 files changed, 162 insertions(+), 147 deletions(-)

diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index e9e821e80d..048f9d4b2a 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -17,16 +17,87 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages instrumentation)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages datastructures)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages man)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages popt)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages tbb)
+  #:use-module (gnu packages xml)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages))
 
+(define-public babeltrace
+  (package
+    (name "babeltrace")
+    (version "2.0.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp"))))
+
+    (build-system gnu-build-system)
+
+    (arguments
+     `(;; FIXME - When Python's bindings are enabled, tests do not pass.
+       #:configure-flags '("--enable-debug-info"
+                           "--enable-man-pages"
+                           "--disable-python-bindings"
+                           "--disable-python-plugins")
+                         #:phases
+                         (modify-phases %standard-phases
+                           ;; These are recommended in the project's README for a development
+                           ;; build configuration.
+                           (add-before 'configure 'set-environment-variables
+                             (lambda _
+                               (setenv "BABELTRACE_DEV_MODE" "1")
+                               (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
+    (inputs
+     `(("glib" ,glib)))
+    ;; NOTE - elfutils is used for the LTTng debug information filter
+    ;; component class.  This can be moved to `native-inputs` if
+    ;; `--enable-debug-info` is replaced by `--disable-debug-info` in
+    ;; `#:configure-flags`.
+    (propagated-inputs
+     `(("elfutils" ,elfutils)))
+    ;; NOTE - python-3 is set here for generating the bindings.  Users need to
+    ;; install python-3 in their profile in order to use these bindings.
+    (native-inputs
+     `(("asciidoc" ,asciidoc)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("pkg-config" ,pkg-config)
+       ("python-3" ,python-3)
+       ("python-sphinx" ,python-sphinx)
+       ("swig", swig)
+       ("xmltoman" ,xmltoman)))
+    (home-page "https://babeltrace.org/")
+    (synopsis "Trace manipulation toolkit")
+    (description "Babeltrace 2 is a framework for viewing, converting,
+transforming, and analyzing traces.  It is also the reference parser
+implementation of the Common Trace Format (CTF), produced by tools such as
+LTTng and barectf.  This package provides a library with a C API, Python 3
+bindings, and the command-line tool @command{babeltrace2}.")
+    (license license:expat)))
+
 (define-public dyninst
   (package
     (name "dyninst")
@@ -78,3 +149,94 @@ (define-public dyninst
 create a new one out of an ELF file for analysis or modification.  It come
 with a handful of C++ libraries.")
     (license license:lgpl2.0)))
+
+(define-public lttng-ust
+  (package
+    (name "lttng-ust")
+    (version "2.13.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://lttng.org/files/lttng-ust/"
+                                  "lttng-ust-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("liburcu" ,liburcu)
+       ("numactl" ,numactl)))
+    (native-inputs
+     `(("python" ,python-3)
+       ("pkg-config", pkg-config)))
+    (home-page "https://lttng.org/")
+    (synopsis "LTTng userspace tracer libraries")
+    (description "The user space tracing library, liblttng-ust, is the LTTng
+user space tracer.  It receives commands from a session daemon, for example to
+enable and disable specific instrumentation points, and writes event records
+to ring buffers shared with a consumer daemon.")
+    (license license:lgpl2.1+)))
+
+(define-public lttng-tools
+  (package
+    (name "lttng-tools")
+    (version "2.13.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://lttng.org/files/lttng-tools/"
+                                  "lttng-tools-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(;; FIXME - Currently there's a segmentation fault by swig when enabling
+       ;; Python's bindings.  Thus, bindings are disable here.  Replace
+       ;; `disable` by `enable` in #:configure-flags when this is fixed.
+       #:configure-flags '("--disable-python-bindings")
+                         ;; FIXME - Tests are disabled for now because one test hangs
+                         ;; indefinetely.  Also, parallel testing is not possible because of how
+                         ;; the lttng-daemon handles sessions.  Thus, keep parallel testing
+                         ;; disabled even after tests are enabled!
+                         #:tests? #f
+                         #:parallel-tests? #f
+                         #:phases
+                         (modify-phases %standard-phases
+                           (add-before 'configure 'set-environment-variables
+                             (lambda _
+                               (setenv "HOME" "/tmp")
+                               (setenv "LTTNG_HOME" "/tmp")))
+                           ;; We don't put (which "man") here because LTTng uses execlp.
+                           (add-after 'unpack 'patch-default-man-path
+                             (lambda _
+                               (substitute* "src/common/defaults.h"
+                                 (("/usr/bin/man") "man")))))))
+    ;; NOTE - Users have to install python-3 in their profile to use the
+    ;; bindings.  We don't put it in the inputs, because the rest of the tools
+    ;; can work without it.
+    (inputs
+     `(("liburcu" ,liburcu)
+       ("popt" ,popt)
+       ("numactl" ,numactl)))
+    (propagated-inputs
+     `(("kmod" ,kmod)
+       ("module-init-tools" ,module-init-tools)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("perl" ,perl)
+       ("libpfm4" ,libpfm4)
+       ("python-3" ,python-3)
+       ("swig" ,swig)
+       ("procps" ,procps)
+       ("which" ,which)
+       ("flex" ,flex)
+       ("bison" ,bison)
+       ("asciidoc" ,asciidoc)
+       ("libxml2" ,libxml2)
+       ("lttng-ust" ,lttng-ust)))
+    (home-page "https://lttng.org/")
+    (synopsis "LTTng userspace tracer libraries")
+    (description "The lttng-tools project provides a session
+daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command
+line for tracing control, a @code{lttng-ctl} library for tracing control and a
+@code{lttng-relayd} for network streaming.")
+    (license (list  license:gpl2 license:lgpl2.1))))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c2aae58bbf..e6745eac1a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -131,7 +131,6 @@ (define-module (gnu packages linux)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages slang)
-  #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
@@ -8105,152 +8104,6 @@ (define-public ell
 platforms, it is not limited to resource-constrained systems.")
     (license license:lgpl2.1+)))
 
-(define-public lttng-ust
-  (package
-    (name "lttng-ust")
-    (version "2.13.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://lttng.org/files/lttng-ust/"
-                                  "lttng-ust-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l"))))
-    (build-system gnu-build-system)
-    (inputs
-     `(("liburcu" ,liburcu)
-       ("numactl" ,numactl)))
-    (native-inputs
-     `(("python" ,python-3)
-       ("pkg-config", pkg-config)))
-    (home-page "https://lttng.org/")
-    (synopsis "LTTng userspace tracer libraries")
-    (description "The user space tracing library, liblttng-ust, is the LTTng
-user space tracer.  It receives commands from a session daemon, for example to
-enable and disable specific instrumentation points, and writes event records
-to ring buffers shared with a consumer daemon.")
-    (license license:lgpl2.1+)))
-
-(define-public lttng-tools
-  (package
-    (name "lttng-tools")
-    (version "2.13.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://lttng.org/files/lttng-tools/"
-                                  "lttng-tools-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(;; FIXME - Currently there's a segmentation fault by swig when enabling
-       ;; Python's bindings.  Thus, bindings are disable here.  Replace
-       ;; `disable` by `enable` in #:configure-flags when this is fixed.
-       #:configure-flags '("--disable-python-bindings")
-       ;; FIXME - Tests are disabled for now because one test hangs
-       ;; indefinetely.  Also, parallel testing is not possible because of how
-       ;; the lttng-daemon handles sessions.  Thus, keep parallel testing
-       ;; disabled even after tests are enabled!
-       #:tests? #f
-       #:parallel-tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'set-environment-variables
-           (lambda _
-             (setenv "HOME" "/tmp")
-             (setenv "LTTNG_HOME" "/tmp")))
-         ;; We don't put (which "man") here because LTTng uses execlp.
-         (add-after 'unpack 'patch-default-man-path
-           (lambda _
-             (substitute* "src/common/defaults.h"
-               (("/usr/bin/man") "man")))))))
-    ;; NOTE - Users have to install python-3 in their profile to use the
-    ;; bindings.  We don't put it in the inputs, because the rest of the tools
-    ;; can work without it.
-    (inputs
-     `(("liburcu" ,liburcu)
-       ("popt" ,popt)
-       ("numactl" ,numactl)))
-    (propagated-inputs
-     `(("kmod" ,kmod)
-       ("module-init-tools" ,module-init-tools)))
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("perl" ,perl)
-       ("libpfm4" ,libpfm4)
-       ("python-3" ,python-3)
-       ("swig" ,swig)
-       ("procps" ,procps)
-       ("which" ,which)
-       ("flex" ,flex)
-       ("bison" ,bison)
-       ("asciidoc" ,asciidoc)
-       ("libxml2" ,libxml2)
-       ("lttng-ust" ,lttng-ust)))
-    (home-page "https://lttng.org/")
-    (synopsis "LTTng userspace tracer libraries")
-    (description "The lttng-tools project provides a session
-daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command
-line for tracing control, a @code{lttng-ctl} library for tracing control and a
-@code{lttng-relayd} for network streaming.")
-    (license (list  license:gpl2 license:lgpl2.1))))
-
-(define-public babeltrace
-  (package
-    (name "babeltrace")
-    (version "2.0.4")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp"))))
-
-    (build-system gnu-build-system)
-
-    (arguments
-     `(;; FIXME - When Python's bindings are enabled, tests do not pass.
-       #:configure-flags '("--enable-debug-info"
-                           "--enable-man-pages"
-                           "--disable-python-bindings"
-                           "--disable-python-plugins")
-       #:phases
-       (modify-phases %standard-phases
-         ;; These are recommended in the project's README for a development
-         ;; build configuration.
-         (add-before 'configure 'set-environment-variables
-           (lambda _
-             (setenv "BABELTRACE_DEV_MODE" "1")
-             (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
-    (inputs
-     `(("glib" ,glib)))
-    ;; NOTE - elfutils is used for the LTTng debug information filter
-    ;; component class.  This can be moved to `native-inputs` if
-    ;; `--enable-debug-info` is replaced by `--disable-debug-info` in
-    ;; `#:configure-flags`.
-    (propagated-inputs
-     `(("elfutils" ,elfutils)))
-    ;; NOTE - python-3 is set here for generating the bindings.  Users need to
-    ;; install python-3 in their profile in order to use these bindings.
-    (native-inputs
-     `(("asciidoc" ,asciidoc)
-       ("bison" ,bison)
-       ("flex" ,flex)
-       ("pkg-config" ,pkg-config)
-       ("python-3" ,python-3)
-       ("python-sphinx" ,python-sphinx)
-       ("swig", swig)
-       ("xmltoman" ,xmltoman)))
-    (home-page "https://babeltrace.org/")
-    (synopsis "Trace manipulation toolkit")
-    (description "Babeltrace 2 is a framework for viewing, converting,
-transforming, and analyzing traces.  It is also the reference parser
-implementation of the Common Trace Format (CTF), produced by tools such as
-LTTng and barectf.  This package provides a library with a C API, Python 3
-bindings, and the command-line tool @command{babeltrace2}.")
-    (license license:expat)))
-
 (define-public kexec-tools
   (package
     (name "kexec-tools")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Thu, 16 Dec 2021 18:41:01 GMT) Full text and rfc822 format available.

Message #23 received at 52043 <at> debbugs.gnu.org (full text, mbox):

From: Olivier Dion <olivier.dion <at> polymtl.ca>
To: 52043 <at> debbugs.gnu.org
Cc: Olivier Dion <olivier.dion <at> polymtl.ca>
Subject: [PATCH v4 1/2] gnu: Add instrumentation packages.
Date: Thu, 16 Dec 2021 13:40:16 -0500
* gnu/packages/instrumentation.scm: New file
(dyninst): New variable.
---
 gnu/local.mk                     |  1 +
 gnu/packages/instrumentation.scm | 79 ++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)
 create mode 100644 gnu/packages/instrumentation.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 51c4f41331..76bfedbb9c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -309,6 +309,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/inklingreader.scm		\
   %D%/packages/inkscape.scm			\
   %D%/packages/installers.scm			\
+  %D%/packages/instrumentation.scm		\
   %D%/packages/ipfs.scm			\
   %D%/packages/irc.scm  			\
   %D%/packages/irods.scm  			\
diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
new file mode 100644
index 0000000000..d8de52facd
--- /dev/null
+++ b/gnu/packages/instrumentation.scm
@@ -0,0 +1,79 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Olivier Dion <olivier.dion <at> polymtl.ca>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages instrumentation)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages tbb)
+  #:use-module (guix build-system cmake)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages))
+
+(define-public dyninst
+  (package
+    (name "dyninst")
+    ;; Newer versions are not promoted on main home page.
+    ;; Upgrade to 12.0.1 if anyone require a newer version.
+    (version "10.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/dyninst/dyninst")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "1m04pg824rqx647wvk9xl33ri8i6mm0vmrz9924li25dxbr4zqd5"))))
+
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f
+       ;; STERILE_BUILD: Do not download/build third-party dependencies from
+       ;; source.
+       #:configure-flags
+       (list "-DSTERILE_BUILD=ON")
+       ;; NOTE: dyninst needs to search for shared libraries that are linked
+       ;; against the instrumented binary in order to rebuild the entire
+       ;; program.  For this purpose, one can use LD_LIBRARY_PATH or
+       ;; DYNISNT_REWRITER_PATHS environment variables to add paths for dyinst
+       ;; to search.  However, dyninst also tries to be smart by executing
+       ;; ldconfig, which is not portable.  If ldconfig is not available on
+       ;; the system, dyinst wrongly assumes that the shared libraries can not
+       ;; be found, even though it can.  This bad logic is still there with
+       ;; newer versions of dyinst.  Thus, this substitution makes the bad
+       ;; code path unreachable.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-bad-logic
+           (lambda _
+             (substitute* "dyninstAPI/src/linux.C"
+               (("if\\(\\!fgets\\(buffer, 512, ldconfig\\)\\)")
+                "fgets(buffer, 512, ldconfig); if (false)")))))))
+    (propagated-inputs
+     `(("elfutils" ,elfutils)
+       ("boost" ,boost)
+       ("tbb" ,tbb-2020)))
+    (home-page "https://dyninst.org/")
+    (synopsis "Dynamic instrumentation")
+    (description "Dyninst is a collection of libraries for instrumenting,
+analyzing and editing binaries.  It can attach to an existing program or
+create a new one out of an ELF file for analysis or modification.  It come
+with a handful of C++ libraries.")
+    (license license:lgpl2.0)))
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Thu, 16 Dec 2021 18:41:02 GMT) Full text and rfc822 format available.

Message #26 received at 52043 <at> debbugs.gnu.org (full text, mbox):

From: Olivier Dion <olivier.dion <at> polymtl.ca>
To: 52043 <at> debbugs.gnu.org
Cc: Olivier Dion <olivier.dion <at> polymtl.ca>
Subject: [PATCH v4 0/2] Create instrumentation package
Date: Thu, 16 Dec 2021 13:40:15 -0500
Had to make last minute changes since recent merges.

* Changes since v3:
  
  - Remove libomp (failed compilation for missing symbol in libgomp)
  - Change tbb for tbb-2020 (former version is unrecognized by cmake)

Olivier Dion (2):
  gnu: Add instrumentation packages.
  gnu: Move instrumentation tools to instrumentation module.

 gnu/local.mk                     |   1 +
 gnu/packages/instrumentation.scm | 241 +++++++++++++++++++++++++++++++
 gnu/packages/linux.scm           | 142 ------------------
 3 files changed, 242 insertions(+), 142 deletions(-)
 create mode 100644 gnu/packages/instrumentation.scm

-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Thu, 16 Dec 2021 18:41:02 GMT) Full text and rfc822 format available.

Message #29 received at 52043 <at> debbugs.gnu.org (full text, mbox):

From: Olivier Dion <olivier.dion <at> polymtl.ca>
To: 52043 <at> debbugs.gnu.org
Cc: Olivier Dion <olivier.dion <at> polymtl.ca>
Subject: [PATCH v4 2/2] gnu: Move instrumentation tools to instrumentation
 module.
Date: Thu, 16 Dec 2021 13:40:17 -0500
* gnu/packages/linux.scm (lttng-ust, lttng-tools, babeltrace): Move to ...
* gnu/packages/instrumentation.scm: ... here.
---
 gnu/packages/instrumentation.scm | 162 +++++++++++++++++++++++++++++++
 gnu/packages/linux.scm           | 142 ---------------------------
 2 files changed, 162 insertions(+), 142 deletions(-)

diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index d8de52facd..00595438b1 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -17,16 +17,87 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages instrumentation)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages datastructures)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages man)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages popt)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages tbb)
+  #:use-module (gnu packages xml)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages))
 
+(define-public babeltrace
+  (package
+    (name "babeltrace")
+    (version "2.0.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp"))))
+
+    (build-system gnu-build-system)
+
+    (arguments
+     `(;; FIXME - When Python's bindings are enabled, tests do not pass.
+       #:configure-flags '("--enable-debug-info"
+                           "--enable-man-pages"
+                           "--disable-python-bindings"
+                           "--disable-python-plugins")
+                         #:phases
+                         (modify-phases %standard-phases
+                           ;; These are recommended in the project's README for a development
+                           ;; build configuration.
+                           (add-before 'configure 'set-environment-variables
+                             (lambda _
+                               (setenv "BABELTRACE_DEV_MODE" "1")
+                               (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
+    (inputs
+     `(("glib" ,glib)))
+    ;; NOTE - elfutils is used for the LTTng debug information filter
+    ;; component class.  This can be moved to `native-inputs` if
+    ;; `--enable-debug-info` is replaced by `--disable-debug-info` in
+    ;; `#:configure-flags`.
+    (propagated-inputs
+     `(("elfutils" ,elfutils)))
+    ;; NOTE - python-3 is set here for generating the bindings.  Users need to
+    ;; install python-3 in their profile in order to use these bindings.
+    (native-inputs
+     `(("asciidoc" ,asciidoc)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("pkg-config" ,pkg-config)
+       ("python-3" ,python-3)
+       ("python-sphinx" ,python-sphinx)
+       ("swig", swig)
+       ("xmltoman" ,xmltoman)))
+    (home-page "https://babeltrace.org/")
+    (synopsis "Trace manipulation toolkit")
+    (description "Babeltrace 2 is a framework for viewing, converting,
+transforming, and analyzing traces.  It is also the reference parser
+implementation of the Common Trace Format (CTF), produced by tools such as
+LTTng and barectf.  This package provides a library with a C API, Python 3
+bindings, and the command-line tool @command{babeltrace2}.")
+    (license license:expat)))
+
 (define-public dyninst
   (package
     (name "dyninst")
@@ -77,3 +148,94 @@ (define-public dyninst
 create a new one out of an ELF file for analysis or modification.  It come
 with a handful of C++ libraries.")
     (license license:lgpl2.0)))
+
+(define-public lttng-ust
+  (package
+    (name "lttng-ust")
+    (version "2.13.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://lttng.org/files/lttng-ust/"
+                                  "lttng-ust-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("liburcu" ,liburcu)
+       ("numactl" ,numactl)))
+    (native-inputs
+     `(("python" ,python-3)
+       ("pkg-config", pkg-config)))
+    (home-page "https://lttng.org/")
+    (synopsis "LTTng userspace tracer libraries")
+    (description "The user space tracing library, liblttng-ust, is the LTTng
+user space tracer.  It receives commands from a session daemon, for example to
+enable and disable specific instrumentation points, and writes event records
+to ring buffers shared with a consumer daemon.")
+    (license license:lgpl2.1+)))
+
+(define-public lttng-tools
+  (package
+    (name "lttng-tools")
+    (version "2.13.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://lttng.org/files/lttng-tools/"
+                                  "lttng-tools-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(;; FIXME - Currently there's a segmentation fault by swig when enabling
+       ;; Python's bindings.  Thus, bindings are disable here.  Replace
+       ;; `disable` by `enable` in #:configure-flags when this is fixed.
+       #:configure-flags '("--disable-python-bindings")
+                         ;; FIXME - Tests are disabled for now because one test hangs
+                         ;; indefinetely.  Also, parallel testing is not possible because of how
+                         ;; the lttng-daemon handles sessions.  Thus, keep parallel testing
+                         ;; disabled even after tests are enabled!
+                         #:tests? #f
+                         #:parallel-tests? #f
+                         #:phases
+                         (modify-phases %standard-phases
+                           (add-before 'configure 'set-environment-variables
+                             (lambda _
+                               (setenv "HOME" "/tmp")
+                               (setenv "LTTNG_HOME" "/tmp")))
+                           ;; We don't put (which "man") here because LTTng uses execlp.
+                           (add-after 'unpack 'patch-default-man-path
+                             (lambda _
+                               (substitute* "src/common/defaults.h"
+                                 (("/usr/bin/man") "man")))))))
+    ;; NOTE - Users have to install python-3 in their profile to use the
+    ;; bindings.  We don't put it in the inputs, because the rest of the tools
+    ;; can work without it.
+    (inputs
+     `(("liburcu" ,liburcu)
+       ("popt" ,popt)
+       ("numactl" ,numactl)))
+    (propagated-inputs
+     `(("kmod" ,kmod)
+       ("module-init-tools" ,module-init-tools)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("perl" ,perl)
+       ("libpfm4" ,libpfm4)
+       ("python-3" ,python-3)
+       ("swig" ,swig)
+       ("procps" ,procps)
+       ("which" ,which)
+       ("flex" ,flex)
+       ("bison" ,bison)
+       ("asciidoc" ,asciidoc)
+       ("libxml2" ,libxml2)
+       ("lttng-ust" ,lttng-ust)))
+    (home-page "https://lttng.org/")
+    (synopsis "LTTng userspace tracer libraries")
+    (description "The lttng-tools project provides a session
+daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command
+line for tracing control, a @code{lttng-ctl} library for tracing control and a
+@code{lttng-relayd} for network streaming.")
+    (license (list  license:gpl2 license:lgpl2.1))))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a1c9408e89..85086a119d 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -138,7 +138,6 @@ (define-module (gnu packages linux)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages slang)
-  #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
@@ -8185,147 +8184,6 @@ (define-public ell
 platforms, it is not limited to resource-constrained systems.")
     (license license:lgpl2.1+)))
 
-(define-public lttng-ust
-  (package
-    (name "lttng-ust")
-    (version "2.13.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://lttng.org/files/lttng-ust/"
-                                  "lttng-ust-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l"))))
-    (build-system gnu-build-system)
-    (inputs
-     (list liburcu numactl))
-    (native-inputs
-     (list python-3 pkg-config))
-    (home-page "https://lttng.org/")
-    (synopsis "LTTng userspace tracer libraries")
-    (description "The user space tracing library, liblttng-ust, is the LTTng
-user space tracer.  It receives commands from a session daemon, for example to
-enable and disable specific instrumentation points, and writes event records
-to ring buffers shared with a consumer daemon.")
-    (license license:lgpl2.1+)))
-
-(define-public lttng-tools
-  (package
-    (name "lttng-tools")
-    (version "2.13.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://lttng.org/files/lttng-tools/"
-                                  "lttng-tools-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(;; FIXME - Currently there's a segmentation fault by swig when enabling
-       ;; Python's bindings.  Thus, bindings are disable here.  Replace
-       ;; `disable` by `enable` in #:configure-flags when this is fixed.
-       #:configure-flags '("--disable-python-bindings")
-       ;; FIXME - Tests are disabled for now because one test hangs
-       ;; indefinetely.  Also, parallel testing is not possible because of how
-       ;; the lttng-daemon handles sessions.  Thus, keep parallel testing
-       ;; disabled even after tests are enabled!
-       #:tests? #f
-       #:parallel-tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'set-environment-variables
-           (lambda _
-             (setenv "HOME" "/tmp")
-             (setenv "LTTNG_HOME" "/tmp")))
-         ;; We don't put (which "man") here because LTTng uses execlp.
-         (add-after 'unpack 'patch-default-man-path
-           (lambda _
-             (substitute* "src/common/defaults.h"
-               (("/usr/bin/man") "man")))))))
-    ;; NOTE - Users have to install python-3 in their profile to use the
-    ;; bindings.  We don't put it in the inputs, because the rest of the tools
-    ;; can work without it.
-    (inputs
-     (list liburcu popt numactl))
-    (propagated-inputs
-     (list kmod module-init-tools))
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("perl" ,perl)
-       ("libpfm4" ,libpfm4)
-       ("python-3" ,python-3)
-       ("swig" ,swig)
-       ("procps" ,procps)
-       ("which" ,which)
-       ("flex" ,flex)
-       ("bison" ,bison)
-       ("asciidoc" ,asciidoc)
-       ("libxml2" ,libxml2)
-       ("lttng-ust" ,lttng-ust)))
-    (home-page "https://lttng.org/")
-    (synopsis "LTTng userspace tracer libraries")
-    (description "The lttng-tools project provides a session
-daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command
-line for tracing control, a @code{lttng-ctl} library for tracing control and a
-@code{lttng-relayd} for network streaming.")
-    (license (list  license:gpl2 license:lgpl2.1))))
-
-(define-public babeltrace
-  (package
-    (name "babeltrace")
-    (version "2.0.4")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp"))))
-
-    (build-system gnu-build-system)
-
-    (arguments
-     `(;; FIXME - When Python's bindings are enabled, tests do not pass.
-       #:configure-flags '("--enable-debug-info"
-                           "--enable-man-pages"
-                           "--disable-python-bindings"
-                           "--disable-python-plugins")
-       #:phases
-       (modify-phases %standard-phases
-         ;; These are recommended in the project's README for a development
-         ;; build configuration.
-         (add-before 'configure 'set-environment-variables
-           (lambda _
-             (setenv "BABELTRACE_DEV_MODE" "1")
-             (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
-    (inputs
-     (list glib))
-    ;; NOTE - elfutils is used for the LTTng debug information filter
-    ;; component class.  This can be moved to `native-inputs` if
-    ;; `--enable-debug-info` is replaced by `--disable-debug-info` in
-    ;; `#:configure-flags`.
-    (propagated-inputs
-     (list elfutils))
-    ;; NOTE - python-3 is set here for generating the bindings.  Users need to
-    ;; install python-3 in their profile in order to use these bindings.
-    (native-inputs
-     `(("asciidoc" ,asciidoc)
-       ("bison" ,bison)
-       ("flex" ,flex)
-       ("pkg-config" ,pkg-config)
-       ("python-3" ,python-3)
-       ("python-sphinx" ,python-sphinx)
-       ("swig", swig)
-       ("xmltoman" ,xmltoman)))
-    (home-page "https://babeltrace.org/")
-    (synopsis "Trace manipulation toolkit")
-    (description "Babeltrace 2 is a framework for viewing, converting,
-transforming, and analyzing traces.  It is also the reference parser
-implementation of the Common Trace Format (CTF), produced by tools such as
-LTTng and barectf.  This package provides a library with a C API, Python 3
-bindings, and the command-line tool @command{babeltrace2}.")
-    (license license:expat)))
-
 (define-public kexec-tools
   (package
     (name "kexec-tools")
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#52043; Package guix-patches. (Sat, 18 Dec 2021 18:48:02 GMT) Full text and rfc822 format available.

Message #32 received at 52043 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Olivier Dion <olivier.dion <at> polymtl.ca>
Cc: 52043 <at> debbugs.gnu.org
Subject: Re: bug#52043: [PATCH 1/2] gnu: Add instrumentation packages.
Date: Sat, 18 Dec 2021 19:47:14 +0100
Hello,

Olivier Dion <olivier.dion <at> polymtl.ca> skribis:

> * gnu/packages/instrumentation.scm: New file
> (dyninst): New variable.

Applied with simplified inputs and…

> +    (home-page "https://dyninst.org/")
> +    (synopsis "Dynamic instrumentation")
> +    (description "Dyninst is a collection of libraries for instrumenting,
> +analyzing and editing binaries.  It can attach to an existing program or
> +create a new one out of an ELF file for analysis or modification.  It come
> +with a handful of C++ libraries.")
> +    (license license:lgpl2.0)))

… license changed to ‘license:lgpl2.1+’, which is what source file
headers say.

Thanks,
Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sat, 18 Dec 2021 18:48:02 GMT) Full text and rfc822 format available.

Notification sent to Olivier Dion <olivier.dion <at> polymtl.ca>:
bug acknowledged by developer. (Sat, 18 Dec 2021 18:48:03 GMT) Full text and rfc822 format available.

Message #37 received at 52043-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Olivier Dion <olivier.dion <at> polymtl.ca>
Cc: 52043-done <at> debbugs.gnu.org
Subject: Re: bug#52043: [PATCH 1/2] gnu: Add instrumentation packages.
Date: Sat, 18 Dec 2021 19:47:39 +0100
Olivier Dion <olivier.dion <at> polymtl.ca> skribis:

> * gnu/packages/linux.scm (lttng-ust, lttng-tools, babeltrace): Move to ...
> * gnu/packages/instrumentation.scm: ... here.

Applied as well (updated to preserve simplified inputs).

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Jan 2022 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.