GNU bug report logs - #48525
[PATCH core-updates] gnu: rust: Add profiling support.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Milkey Mouse <milkeymouse@HIDDEN>; Keywords: patch; dated Wed, 19 May 2021 18:39:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 48525 <at> debbugs.gnu.org:


Received: (at 48525) by debbugs.gnu.org; 25 May 2021 20:35:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 25 16:35:30 2021
Received: from localhost ([127.0.0.1]:47106 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lldly-00089V-J0
	for submit <at> debbugs.gnu.org; Tue, 25 May 2021 16:35:30 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56676)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <marius@HIDDEN>) id 1lldlw-00089J-Bw
 for 48525 <at> debbugs.gnu.org; Tue, 25 May 2021 16:35:29 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34918)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <marius@HIDDEN>)
 id 1lldlq-0002jq-OC; Tue, 25 May 2021 16:35:22 -0400
Received: from host-37-191-231-185.lynet.no ([37.191.231.185]:40858
 helo=localhost)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <marius@HIDDEN>)
 id 1lldlq-0003F5-5d; Tue, 25 May 2021 16:35:22 -0400
From: Marius Bakke <marius@HIDDEN>
To: Milkey Mouse <milkeymouse@HIDDEN>, 48525 <at> debbugs.gnu.org
Subject: Re: [bug#48525] [PATCH core-updates] gnu: rust: Add profiling support.
In-Reply-To: <CBLXF76ODQ34.3FK3HIMXDW3C1@jupiter>
References: <20210519183749.32709-1-milkeymouse@HIDDEN>
 <87bl91bkgf.fsf@HIDDEN> <CBLXF76ODQ34.3FK3HIMXDW3C1@jupiter>
Date: Tue, 25 May 2021 22:35:19 +0200
Message-ID: <87lf82pn5k.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48525
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

"Milkey Mouse" <milkeymouse@HIDDEN> skriver:

> On Sun May 23, 2021 at 7:20 AM PDT, Marius Bakke wrote:
>> Instead of backporting this patch to 1.49, I think it would be better to
>> switch the default Rust to the latest version before enabling profiling
>> support.
>
> OK, I will submit a v2 of the patch. Should I do so as a reply, or
> close this thread by emailing the @debbugs.gnu.org address? I'm still a
> little new to email- and patch-based workflows.

Simply replying to this issue is great.

>> Unfortunately 1.50 currently fails to build on core-updates, so we'll
>> need a volunteer to fix that. Would you like to give it a try? :-)
>
> rust-1.50? It builds fine for me. I am on commit 42162c84dc (with this
> patch on top):
>
>     $ ./pre-inst-env guix build rust@HIDDEN
>     /gnu/store/klr7jrzxl3mzprd88f857kw5mam15h78-rust-1.50.0-cargo
>     /gnu/store/3x656k3s66kjb87aphly9p5v401af863-rust-1.50.0-doc
>     /gnu/store/nkkfvyl52mmvx12ccwvs54c44yns4yk5-rust-1.50.0
>     /gnu/store/kq4i7q55gxfl47124vfkiqzp5bi7737r-rust-1.50.0-rustfmt
>
> I suppose I should note I don't use substitutes--but that shouldn't
> make a difference, should it?

Oh you're right, it does work!  Sorry for the confusion.  It must have
been a transient failure on my end last I tried it.  Substitutes should
not make a difference -- the end result should (ideally) be
bit-identical in either case.

I suppose we can promote Rust 1.52 to the default unless there are
big(?) compatibility problems.  IIRC the upcoming librsvg requires it.

Thanks!
Marius

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCYK1fhw8cbWFyaXVzQGdu
dS5vcmcACgkQ6HGLpZEUEHdjNQEA6156q6ZEZ8agx48Im288Yl4v5GbGPl110jts
rXv9sbIA/0OSUXhgFQp+I8c99R3KAC357Lh/o2W24YVA3Jl5xRUO
=I4ZO
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#48525; Package guix-patches. Full text available.

Message received at 48525 <at> debbugs.gnu.org:


Received: (at 48525) by debbugs.gnu.org; 25 May 2021 01:14:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 24 21:14:11 2021
Received: from localhost ([127.0.0.1]:44212 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1llLe7-0004LU-5T
	for submit <at> debbugs.gnu.org; Mon, 24 May 2021 21:14:11 -0400
Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21346)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <milkeymouse@HIDDEN>) id 1llLe4-0004LK-65
 for 48525 <at> debbugs.gnu.org; Mon, 24 May 2021 21:14:10 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1621905237; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=HuffbNCERYyrRmIm2Le6iK7spijhDUzs0H4/lyRCNrP97f7vzmIdxKF2nI7+dHjw38t92BuHcw2wtosGOF2x6e1dO2Nw6U7Df8XsCFbC3W9TDSn2gTjAxdMYs1UH+1cUAM9n21+xV/GRy7f4v3E5sf9I92LTLXiVMkuGJ2pmFFQ=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1621905237;
 h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
 bh=XcUd9p8c2j2+AIz61kv2sa/xAlK89Ey/Z+7ReTIUYbE=; 
 b=KFgaVYQeRK1m7FK8ZZPk6KYkjgePzzTTsPb6no/W1dT1wU9ojFngSkQAdw+KCsjhtjwX+ZWMActwD5+Rda5YXJcHmU9utVh5rJYupRUtjmFr7JNcMlJqPInKmE2uvP1aK3vPYwCcPB2ZF3qi7HN3IfInBen0q07FXQAsFUweIN4=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=meme.institute;
 spf=pass  smtp.mailfrom=milkeymouse@HIDDEN;
 dmarc=pass header.from=<milkeymouse@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1621905237; 
 s=memelord; d=meme.institute; i=milkeymouse@HIDDEN;
 h=Mime-Version:Content-Transfer-Encoding:Content-Type:Date:Message-Id:Cc:Subject:From:To:References:In-Reply-To;
 bh=XcUd9p8c2j2+AIz61kv2sa/xAlK89Ey/Z+7ReTIUYbE=;
 b=ev1zkgzk0Pqzh39n4wkrBDJ9XSU9ovNV/lmi76vU1EfHzWkSaUKcaWaVbgdtiOXb
 faOQaT86i8yOPCsUDg1i2UmRZdO5Z5HrYfisxweN2eMngcQamrQiIiqMZrxJGhNIBhp
 Z2fRebTgJ8qqYuy1unZVlVyKbO+ZEiSDgEnhKC0M=
Received: from localhost (50.47.115.222 [50.47.115.222]) by mx.zohomail.com
 with SMTPS id 1621905236112429.5460599655721;
 Mon, 24 May 2021 18:13:56 -0700 (PDT)
Mime-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
Date: Mon, 24 May 2021 18:13:55 -0700
Message-Id: <CBLXF76ODQ34.3FK3HIMXDW3C1@jupiter>
Subject: Re: [bug#48525] [PATCH core-updates] gnu: rust: Add profiling support.
From: "Milkey Mouse" <milkeymouse@HIDDEN>
To: "Marius Bakke" <marius@HIDDEN>, <48525 <at> debbugs.gnu.org>
References: <20210519183749.32709-1-milkeymouse@HIDDEN>
 <87bl91bkgf.fsf@HIDDEN>
In-Reply-To: <87bl91bkgf.fsf@HIDDEN>
X-ZohoMailClient: External
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48525
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun May 23, 2021 at 7:20 AM PDT, Marius Bakke wrote:
> Instead of backporting this patch to 1.49, I think it would be better to
> switch the default Rust to the latest version before enabling profiling
> support.

OK, I will submit a v2 of the patch. Should I do so as a reply, or
close this thread by emailing the @debbugs.gnu.org address? I'm still a
little new to email- and patch-based workflows.

>
> Unfortunately 1.50 currently fails to build on core-updates, so we'll
> need a volunteer to fix that. Would you like to give it a try? :-)

rust-1.50? It builds fine for me. I am on commit 42162c84dc (with this
patch on top):

    $ ./pre-inst-env guix build rust@HIDDEN
    /gnu/store/klr7jrzxl3mzprd88f857kw5mam15h78-rust-1.50.0-cargo
    /gnu/store/3x656k3s66kjb87aphly9p5v401af863-rust-1.50.0-doc
    /gnu/store/nkkfvyl52mmvx12ccwvs54c44yns4yk5-rust-1.50.0
    /gnu/store/kq4i7q55gxfl47124vfkiqzp5bi7737r-rust-1.50.0-rustfmt

I suppose I should note I don't use substitutes--but that shouldn't
make a difference, should it?




Information forwarded to guix-patches@HIDDEN:
bug#48525; Package guix-patches. Full text available.

Message received at 48525 <at> debbugs.gnu.org:


Received: (at 48525) by debbugs.gnu.org; 23 May 2021 14:20:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 23 10:20:44 2021
Received: from localhost ([127.0.0.1]:41495 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lkoyC-0008BE-39
	for submit <at> debbugs.gnu.org; Sun, 23 May 2021 10:20:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57162)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <marius@HIDDEN>) id 1lkoy9-0008B0-N8
 for 48525 <at> debbugs.gnu.org; Sun, 23 May 2021 10:20:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60738)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <marius@HIDDEN>)
 id 1lkoy4-0006Dl-DE; Sun, 23 May 2021 10:20:36 -0400
Received: from host-37-191-231-185.lynet.no ([37.191.231.185]:60916
 helo=localhost)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <marius@HIDDEN>)
 id 1lkoy3-0000gB-M2; Sun, 23 May 2021 10:20:36 -0400
From: Marius Bakke <marius@HIDDEN>
To: Milkey Mouse <milkeymouse@HIDDEN>, 48525 <at> debbugs.gnu.org
Subject: Re: [bug#48525] [PATCH core-updates] gnu: rust: Add profiling support.
In-Reply-To: <20210519183749.32709-1-milkeymouse@HIDDEN>
References: <20210519183749.32709-1-milkeymouse@HIDDEN>
Date: Sun, 23 May 2021 16:20:32 +0200
Message-ID: <87bl91bkgf.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48525
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Milkey Mouse <milkeymouse@HIDDEN> skriver:

> * gnu/packages/rust.scm (rust-1.49)[source]: Add patch.
> [phases]{unpack-profiler-rt, enable-profiling}: New phases.
> [native-inputs]{compiler-rt-source}: New input.
> (rust-1.50)[source]: Remove "rust-1.49-llvm-cov-no-debug.patch".
> * gnu/packages/patches/rust-1.49-llvm-cov-no-debug.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add patch.

[...]

> diff --git a/gnu/packages/patches/rust-1.49-llvm-cov-no-debug.patch b/gnu/packages/patches/rust-1.49-llvm-cov-no-debug.patch
> new file mode 100644
> index 0000000000..b72402a9a7
> --- /dev/null
> +++ b/gnu/packages/patches/rust-1.49-llvm-cov-no-debug.patch
> @@ -0,0 +1,27 @@
> +cherry-picked from commit fe56d267cae, in master as of 1.50

Instead of backporting this patch to 1.49, I think it would be better to
switch the default Rust to the latest version before enabling profiling
support.

Unfortunately 1.50 currently fails to build on core-updates, so we'll
need a volunteer to fix that.  Would you like to give it a try?  :-)

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCYKpksA8cbWFyaXVzQGdu
dS5vcmcACgkQ6HGLpZEUEHfjDwD/RLbauQKzOwJx0bqD+ReypmnhPs+H0RbOAzSB
+ksx+mAA+wcOpqv+eA7sQCJdPowz2CXz8RGzdmErIDLhUcyMcGwJ
=JA9b
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#48525; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 May 2021 18:38:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 19 14:38:06 2021
Received: from localhost ([127.0.0.1]:60718 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ljR54-0003aP-0c
	for submit <at> debbugs.gnu.org; Wed, 19 May 2021 14:38:06 -0400
Received: from lists.gnu.org ([209.51.188.17]:57596)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <milkeymouse@HIDDEN>) id 1ljR51-0003aE-A3
 for submit <at> debbugs.gnu.org; Wed, 19 May 2021 14:38:03 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54584)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <milkeymouse@HIDDEN>)
 id 1ljR51-0002PC-0p
 for guix-patches@HIDDEN; Wed, 19 May 2021 14:38:03 -0400
Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21493)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <milkeymouse@HIDDEN>)
 id 1ljR4w-000129-TY
 for guix-patches@HIDDEN; Wed, 19 May 2021 14:38:02 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1621449472; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=OP5kXsSWsUJ8bCqCKHoMjtnnNPYGsCvURM5OGZTY1x+/z518CjNVoEGiOrqSTYJYY3ctKiocQgGrxJttG+PVWokq5Afk99fGRmx+Ghc0CK4v88AS2dCAE9KkNwBQMF/zjjL19mVz5skRRAusQcX45mx1jvkfEBoEI2BeAnwvTL4=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1621449472;
 h=Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; 
 bh=1A0/eX9JKqiQ77zXbRIlI5D+H2/hhXqYBBCg4pbhahk=; 
 b=G5enFaWa4JwVLZDaNCRtMZlxwntINsIi0orO6K9IQp31zioJkOBJ72cLbLjtYg3VBAwMFsCv3T8mBKwU99XFNcf/b+EMdByIc7E40HN6TUWVJqypiSge95VYAzDWVnMoURZAckDZv9rEU7pSkNqR1VmDSgNXmglel1cbaNWLnKA=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=meme.institute;
 spf=pass  smtp.mailfrom=milkeymouse@HIDDEN;
 dmarc=pass header.from=<milkeymouse@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1621449472; 
 s=memelord; d=meme.institute; i=milkeymouse@HIDDEN;
 h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding;
 bh=1A0/eX9JKqiQ77zXbRIlI5D+H2/hhXqYBBCg4pbhahk=;
 b=uGKG1FLaRX6nx8a/2KJPsUUxuXVfS9up+nQ/t8DUDOtj3Tr87nvfzmMoWqRN5BjH
 QAe38f/m9TmyI16vPdhMDY4zPpQkvPOBtqdNffDndzHdQ6spMpB6aSKcIaNerLGS9+u
 kfiEgi2S4xm+L7o58NV2wKLkac6COVobW/NhwEjI=
Received: from jupiter.local (50.47.115.222 [50.47.115.222]) by mx.zohomail.com
 with SMTPS id 1621449469852554.6908215547811;
 Wed, 19 May 2021 11:37:49 -0700 (PDT)
From: Milkey Mouse <milkeymouse@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH core-updates] gnu: rust: Add profiling support.
Date: Wed, 19 May 2021 11:37:49 -0700
Message-Id: <20210519183749.32709-1-milkeymouse@HIDDEN>
X-Mailer: git-send-email 2.31.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-ZohoMailClient: External
Received-SPF: pass client-ip=136.143.188.54;
 envelope-from=milkeymouse@HIDDEN; helo=sender4-of-o54.zoho.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

* gnu/packages/rust.scm (rust-1.49)[source]: Add patch.
[phases]{unpack-profiler-rt, enable-profiling}: New phases.
[native-inputs]{compiler-rt-source}: New input.
(rust-1.50)[source]: Remove "rust-1.49-llvm-cov-no-debug.patch".
* gnu/packages/patches/rust-1.49-llvm-cov-no-debug.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add patch.
---
 gnu/local.mk                                  |  1 +
 .../patches/rust-1.49-llvm-cov-no-debug.patch | 27 +++++++++++++++
 gnu/packages/rust.scm                         | 33 +++++++++++++++++--
 3 files changed, 58 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/patches/rust-1.49-llvm-cov-no-debug.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index add01cf6d2..9dbf568d0c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1631,6 +1631,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/rnp-disable-ruby-rnp-tests.patch		\
   %D%/packages/patches/rnp-unbundle-googletest.patch		\
   %D%/packages/patches/ruby-sanitize-system-libxml.patch	\
+  %D%/packages/patches/rust-1.49-llvm-cov-no-debug.patch	\
   %D%/packages/patches/rust-coresimd-doctest.patch		\
   %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch	\
   %D%/packages/patches/rust-nettle-disable-vendor.patch		 \
diff --git a/gnu/packages/patches/rust-1.49-llvm-cov-no-debug.patch b/gnu/packages/patches/rust-1.49-llvm-cov-no-debug.patch
new file mode 100644
index 0000000000..b72402a9a7
--- /dev/null
+++ b/gnu/packages/patches/rust-1.49-llvm-cov-no-debug.patch
@@ -0,0 +1,27 @@
+cherry-picked from commit fe56d267cae, in master as of 1.50
+diff --git a/src/test/run-make-fulldeps/coverage-reports-base/Makefile b/src/test/run-make-fulldeps/coverage-reports-base/Makefile
+index b175768e199..1e2aa056e40 100644
+--- a/src/test/run-make-fulldeps/coverage-reports-base/Makefile
++++ b/src/test/run-make-fulldeps/coverage-reports-base/Makefile
+@@ -13,15 +13,13 @@
+ BASEDIR=../coverage-reports-base
+ SOURCEDIR=../coverage
+ 
+-ifeq ($(UNAME),Darwin)
+-# FIXME(richkadel): It appears that --debug is not available on MacOS even when not running
+-# under CI.
+-NO_LLVM_ASSERTIONS=1
+-endif
+-
+ # The `llvm-cov show` flag `--debug`, used to generate the `counters` output files, is only enabled
+-# if LLVM assertions are enabled. Some CI builds disable debug assertions.
+-ifndef NO_LLVM_ASSERTIONS
++# if LLVM assertions are enabled. Requires Rust config `llvm/optimize` and not
++# `llvm/release_debuginfo`. Note that some CI builds disable debug assertions (by setting
++# `NO_LLVM_ASSERTIONS=1`), so it is not OK to fail the test, but `bless`ed test results cannot be
++# generated without debug assertions.
++LLVM_COV_DEBUG := $(shell "$(LLVM_BIN_DIR)"/llvm-cov show --debug 2>&1 | grep -q "Unknown command line argument '--debug'"; echo $$?)
++ifeq ($(LLVM_COV_DEBUG), 1)
+ DEBUG_FLAG=--debug
+ endif
+ 
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 636420e25d..72355fa789 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -730,6 +730,10 @@ safety and thread safety guarantees.")
                     "0yf7kll517398dgqsr7m3gldzj0iwsp3ggzxrayckpqzvylfy2mm")))
     (package
       (inherit base-rust)
+      (source
+       (origin
+         (inherit (package-source base-rust))
+         (patches (search-patches "rust-1.49-llvm-cov-no-debug.patch"))))
       (outputs (cons "doc" (package-outputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
@@ -817,11 +821,24 @@ safety and thread safety guarantees.")
                                 ((file) file))
                    (("fn ctrl_c_kills_everyone")
                     "#[ignore]\nfn ctrl_c_kills_everyone"))))
+             (add-after 'unpack 'unpack-profiler-rt
+               ;; Copy compiler-rt sources to where libprofiler_builtins
+               ;; looks for its vendored copy.
+               (lambda* (#:key inputs #:allow-other-keys)
+                 (mkdir-p "src/llvm-project/compiler-rt")
+                 (invoke "tar" "-xf" (assoc-ref inputs "compiler-rt-source")
+                   "-C" "src/llvm-project/compiler-rt" "--strip-components=1")
+                   #t))
              (add-after 'configure 'enable-docs
                (lambda _
                  (substitute* "config.toml"
                    (("docs = false")
                     "docs = true"))))
+             (add-after 'enable-codegen-tests 'enable-profiling
+               (lambda _
+                 (substitute* "config.toml"
+                   (("^profiler =.*$") "")
+                   (("[[]build[]]") "\n[build]\nprofiler = true\n"))))
              (add-after 'configure 'add-gdb-to-config
                (lambda* (#:key inputs #:allow-other-keys)
                  (let ((gdb (assoc-ref inputs "gdb")))
@@ -829,17 +846,27 @@ safety and thread safety guarantees.")
                      (("^python =.*" all)
                       (string-append all
                                      "gdb = \"" gdb "/bin/gdb\"\n"))))))))))
-      ;; Add test inputs.
       (native-inputs (cons*
+                      ;; Add test inputs.
                       ;; The tests fail when using GDB 10 (see:
                       ;; https://github.com/rust-lang/rust/issues/79009).
                       `("gdb" ,gdb-9.2)
                       `("procps" ,procps)
+                      ;; Add compiler-rt-source for libprofiler_builtins,
+                      ;; which typically vendors compiler-rt. Needed for PGO.
+                      `("compiler-rt-source" ,(package-source clang-runtime-11))
                       (package-native-inputs base-rust))))))
 
 (define-public rust-1.50
-  (rust-bootstrapped-package rust-1.49 "1.50.0"
-    "0pjs7j62maiyvkmhp9zrxl528g2n0fphp4rq6ap7aqdv0a6qz5wm"))
+  (let ((base-rust (rust-bootstrapped-package
+                    rust-1.49 "1.50.0"
+                    "0pjs7j62maiyvkmhp9zrxl528g2n0fphp4rq6ap7aqdv0a6qz5wm")))
+    (package
+      (inherit base-rust)
+      (source
+       (origin
+         (inherit (package-source base-rust))
+         (patches '()))))))
 
 (define-public rust-1.51
   (rust-bootstrapped-package rust-1.50 "1.51.0"
-- 
2.31.1





Acknowledgement sent to Milkey Mouse <milkeymouse@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#48525; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 25 May 2021 20:45:02 UTC

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