From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cHsSFpStWGKMegAAgWs5BA (envelope-from ) for ; Fri, 15 Apr 2022 01:26:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mB/REpStWGKw7wAAauVa8A (envelope-from ) for ; Fri, 15 Apr 2022 01:26:12 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C626A18C7C for ; Fri, 15 Apr 2022 01:26:11 +0200 (CEST) Received: from localhost ([::1]:57474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nf8qo-0002mN-Am for larch@yhetil.org; Thu, 14 Apr 2022 19:26:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nf8qg-0002m0-A2 for bug-guix@gnu.org; Thu, 14 Apr 2022 19:26:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nf8qg-0004NL-1b for bug-guix@gnu.org; Thu, 14 Apr 2022 19:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nf8qf-0007HL-Uv for bug-guix@gnu.org; Thu, 14 Apr 2022 19:26:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#54728: Valgrind not working out of the box due to stripped ld.so Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 14 Apr 2022 23:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54728 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 54728-submit@debbugs.gnu.org id=B54728.164997872727932 (code B ref 54728); Thu, 14 Apr 2022 23:26:01 +0000 Received: (at 54728) by debbugs.gnu.org; 14 Apr 2022 23:25:27 +0000 Received: from localhost ([127.0.0.1]:57592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nf8q7-0007GR-19 for submit@debbugs.gnu.org; Thu, 14 Apr 2022 19:25:27 -0400 Received: from cyberdimension.org ([80.67.179.20]:60332 helo=gnutoo.cyberdimension.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nf8q5-0007GG-M2 for 54728@debbugs.gnu.org; Thu, 14 Apr 2022 19:25:26 -0400 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id f0a969ad; Thu, 14 Apr 2022 23:21:09 +0000 (UTC) Received: from primarylaptop.localdomain (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 470c9680; Thu, 14 Apr 2022 23:21:09 +0000 (UTC) Date: Fri, 15 Apr 2022 01:26:11 +0200 From: Denis 'GNUtoo' Carikli Message-ID: <20220415012611.6edbf92c@primarylaptop.localdomain> In-Reply-To: <87mtgwetjr.fsf@gnu.org> References: <20220405170132.49b23163@primarylaptop.localdomain> <87mtgwetjr.fsf@gnu.org> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/XMMjosmcAIC6WmFJIINTcOg"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 54728@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1649978771; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=jf4qSZtSyoA5ADpaGOxt4VMgjgKmuFC2MNy+/ucrIQE=; b=EjHaBzWUrhhand5ft6bdQGj68/wicZnSs0wlK1bxlLFmSncEJfBjUHjsvK7VIRJ+v0xKMh XzZ8IRskacBEfqbaLbSdte+bwUdFoGxISRn6LKsvuUGXqDLmt+y14OwUZLMgHBHCwADifJ LSJo4qMlYh7zOvHYDcQVGbRB0VE0gm3v5h9H0wpT+56rngw95xfEy1so8YVsiCxwz6pRFF GWsEhYwTxpBizDYnfmMw6RPO4lCVqijfXMApEJxpEMJSv2as0vqhXYhAPHvztnweFeeZo7 yfWNdY81sJTb5rW1vT8nsfqm53RinI9949Pc2bpFZg7AkK+S5f9iV6f6ZrKemQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649978771; a=rsa-sha256; cv=none; b=Pif8k+8wIGBgH61IGTvH7RmGSpV3qbNGugLxdKNy/XLSueHNuA6eS+IUn5GSW/MS4kSyUw HMat03j5EEJh6/QwgvSU6ZwQ1fIHjz56TiT+bPJ6UAQJVBdmQ5Ewp6lyW0gd9OJgWgefY6 SS5M4N3iGrtf5iG4d4h++sOA+7BpjfxDBj7hXVP0VXioA2CYlij5MZn3lMmFL2TbHtF2UI 9NP1m/eY6vnVJ4R49ZUHGs4/o7jFIUs7PbqFo57xwj49ODQkGhea5plvvpfXGEnR9SWNT4 VfGcSWfKkedLoRHT3Yw9goxULXQSY2ur8jcm57TtEG79UX84UGd/hVTdcOXiBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.94 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C626A18C7C X-Spam-Score: -5.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: BVragNbNMy6l --Sig_/XMMjosmcAIC6WmFJIINTcOg Content-Type: multipart/mixed; boundary="MP_/k=WCScshnOW.NNp/=Hcc31M" --MP_/k=WCScshnOW.NNp/=Hcc31M Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thu, 07 Apr 2022 18:40:08 +0200 Ludovic Court=C3=A8s wrote: > Hi, Hi, > Unfortunately, until that branch is merge (most likely a few months > from now), we=E2=80=99ll have to use the workaround you mentioned. >=20 > Alternatively, maybe we could temporarily patch the =E2=80=98valgrind=E2= =80=99 package > such that it has =E2=80=98--extra-debuginfo-path=3D=E2=80=A6=E2=80=99 by = default. Would you > like to give it a try? That is a good idea. As I need it anyway[1], I've actually worked on doing that through patching Valgrind source code to use better defaults than /usr/lib/debug but there is a couple of things I'm unsure with my patch: - First it works fine in 'guix shell -C' but it still fails in packages. Maybe I didn't patch the right Valgrind? - Then for some reasons guix style messes up the whitespaces with the following command: $ ./pre-inst-env guix style -e \ '(@@ (gnu packages valgrind) valgrind/interactive)'; So I did the style by hand instead, so it might contain mistakes. - And finally I'm not comfortable enough with Valgrind or how it's been used in Guix. As I understand from the comment in the first Valgrind being defined in valgrind.scm, it seems to be depended on by a lot of packages. In addition I've not looked why there is a valgrind/interactive or how it works yet, so someone would need to double check my patch carefuly. I've attached a libsamsung-ipc.scm file as I used that for testing my patch (in addition of just running Valgrind in a Guix shell container and while building this package it fails. I'll send the patch as a response to this mail. References: ----------- [1] At the end of the day I need it to work in both standalone mode and also in package builds as I use a guix.scm to run various compilation and runtime for libsamsung-ipc before pushing patches to the main branch. Denis. --MP_/k=WCScshnOW.NNp/=Hcc31M Content-Type: text/x-scheme Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=libsamsung-ipc.scm ;;; Copyright =C2=A9 2022 Denis Carikli ;;; ;;; This file 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. ;;; ;;; This file 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. ;;; If not, see . ;;; ;;; This file is meant to test valgrind support in Guix. ;;; ;;; The libsamsung-ipc library is not ready to be packaged in general ;;; purpose distributions as right now as it requires either a vendor ;;; kernel or the compbinaison of a recent upstream kernel with on top ;;; work in progress out of tree modem drivers, out of tree ;;; libsamsung-ipc code to support theses drivers and kernel patches ;;; to support the nonfree bootloader of the Galaxy SIII ;;; (GT-I9300). Beside the library, the tools are of very limited use ;;; beside testing or reverse engineering. (use-modules (ice-9 popen) (ice-9 rdelim) (sxml ssax input-parse) ((guix licenses) #:prefix license:) (guix build-system android-ndk) (guix build-system gnu) (guix gexp) (guix git-download) (guix packages) (gnu packages android) (gnu packages autotools) (gnu packages commencement) (gnu packages curl) (gnu packages disk) (gnu packages linux) (gnu packages llvm) (gnu packages pkg-config) (gnu packages python) (gnu packages python-xyz) (gnu packages tls) (gnu packages valgrind)) (define-public libsamsung-ipc (package (name "libsamsung-ipc") ;; we use a work in progress version that has support for --with-valgri= nd-tests (version (git-version "0.0" "HEAD" "4d3062db15783c188d6952f7b9b794b65cd= 93f66")) (source (origin (method git-fetch) (uri (git-reference (url "https://git.replicant.us/replicant-next/hardware_replicant_l= ibsamsung-ipc") (commit "4d3062db15783c188d6952f7b9b794b65cd93f66"))) (sha256 (base32 "1jzv9z5rkgcx394akf2svja586z54vhd46pvdmzm3ilmspnvjcdx")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs `(("autoreconf" ,autoconf) ("aclocal" ,automake) ("libcurl" ,curl) ("ddrescue", ddrescue) ;; ("libc:debug", (@@ (gnu packages commencement) glibc-final) "debu= g") ("libtool" ,libtool) ("pkgconfig" ,pkg-config) ("python" ,python) ("python-sh" ,python-sh) ("valgrind" ,valgrind))) (inputs `(("openssl" ,openssl))) (arguments `(#:phases (modify-phases %standard-phases (add-before 'build 'patch-python (lambda _ (substitute* (find-files "." ".*\\.py$") (("/usr/bin/env python") (which "python3"))) #t)) (add-after 'patch-python 'fix-valgrind (lambda _ (substitute* (find-files "." ".*\\.py$") (("'--leak-check=3Dfull',") "'-v', '--leak-check=3Dfull',")) #t)) ;; (add-after 'patch-python 'fix-valgrind ;; (lambda _ ;; (substitute* (find-files "." ".*\\.py$") ;; (("'--leak-check=3Dfull',") ;; (string-append ;; "'--leak-check=3Dfull', '--extra-debuginfo-p= ath=3D" ;; (assoc-ref %build-inputs "libc:debug") ;; "/lib/debug',"))) ;; #t)) ) #:configure-flags (list "--enable-debug" "--enable-valgrind-tests"))) (synopsis "libsamsung-ipc is a free software implementation of the Sams= ung IPC modem protocol") (description "libsamsung-ipc is a free software implementation of the Samsung IPC m= odem protocol, found in many Samsung smartphones and tablets.") (home-page "https://www.replicant.us") (license license:gpl2+))) (list libsamsung-ipc) --MP_/k=WCScshnOW.NNp/=Hcc31M-- --Sig_/XMMjosmcAIC6WmFJIINTcOg Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmJYrZMACgkQX138wUF3 4mN2CQ/+No31c3weO3B+yyBBA/iShQrAKv+RYIhT/q+echeLljF5mFMInis0pa5s 31l1BP2AWYaf6sQHuw6ZTcqW46Cm8xQZwk+QzWaD9aRr7hDVlWYzmRFvOwBujuoJ AYCd0TEB2DaaKszhxOh4doyMItRS7ozKmyand2rMiDPIOetHE6TyGQ0K0y8gXhAd V4BtrFUGCOR5M7aJ2TpA2nBRRAeao1A9ncfbAXyCQ5L5X9cXIluyC9VgdyBM/eEi WZ945rTJaMAMEmvCSsCRvkm/ssJ3DLqwfRSYK39jQzsZJE7qP0Z8flEQKc5EItFz iB4Jov/bcdGC3/XKOgCyhA8R8W1WrTzuuLMdNOiQ95Pja6LiMlxIwZCxrotIVSmg GDkw+yfc3ivlvitfaEbbD55Pyp8ylqNdLUs7dJ8+CVrTr8Eh18qIzt9pr+Bv32KD fcWQ17ri8FkK7tDw3dORtgFPWQPZOecrOJs7l1wYL6mvl/b6y1XTW1VgaoBQ5O4V 0+rYFjQlRKrLNJfB1qcTt6VoLCnFNyg7+KWcPhbRRrU64/EaVgmTLsvZWLleb2gy qk+3jCiGrKI+UcTE7IFeH8ii+kTNodiSaGVrEajyEBa75+r8dJBrrFsNXOq/EUkP XngySueC6wngXhwB4RmuTinAQciG8pDkQPJD4roR+tW/AG/PrNI= =l1aH -----END PGP SIGNATURE----- --Sig_/XMMjosmcAIC6WmFJIINTcOg--