From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id yLGBIhIRzmXIegEAqHPOHw:P1 (envelope-from ) for ; Thu, 15 Feb 2024 14:26:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id yLGBIhIRzmXIegEAqHPOHw (envelope-from ) for ; Thu, 15 Feb 2024 14:26:42 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=ivrseoub; dkim=pass header.d=wolfsden.cz header.s=mail header.b=ivrseoub; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708003602; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9P64U3uRSp4EQGN5of0FcjdV7LElONd7D5IWN9CFooA=; b=S0SFG4Nf1V/gk7ysczTJdcGvjCDe4BMrMq8aZsur+97i+mnQEOX6Lw4kt8wvs/Hhp2MlIK bBNtX5KMoBudH4nDr70Edh50E1H5qvyn2gSqLOiWD2fdX19WgwnwzhqxVIhuC59kLREVsu B39JLsg2ARBscnNvAa3+5y/O0EHFaJETH/b4+rlLhtIUPjYcUC1UoDZyn725qYCnBcyw46 ixO0nwOx3ssgcGoexvpj43OwiLWSB+Av3cgWcUVbh9v7vFH7AbXr7qAnpHhmoAQqKUHn0v 0Fq9XgCcl/PpVibNkFllPd+bBnidFpzVocSptlNjOGQjqFYNyxtjO+JqPNr/hg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=ivrseoub; dkim=pass header.d=wolfsden.cz header.s=mail header.b=ivrseoub; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708003602; a=rsa-sha256; cv=none; b=WULwgXH2W44FgNCZ2oacEyH8GQ2ahPNB4JqrGLEm9FlwsvUXXBHAUiBQqZe2xhDXO1vMCu NkTo9cJQqER4i84XIrgm1jW3sT91z/uY9Tjvy1UC9YOVhRpMlRsYaOXJbjXQ31UahbjPc3 Tp1USF5xFfQLVZ69gkK0/xiGaw53JFDTHoke6svf5pPfqdrrP68RPxM7sYbbTxR3Wbuo5w aZxxzD7YkVBNla8BTqxSzcfdoBEpPuZCE+v2P3oBUhNakq6RdQOyyXY/ygMGH9UetbWPEz iz8555L0HTKE29F2byaW7nDE9eBJqaujmGWVqH0MYTv/ch/ydw04ML5eRrt+Hg== 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 5E7B777CC1 for ; Thu, 15 Feb 2024 14:26:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rabkg-0002nH-QW; Thu, 15 Feb 2024 08:26:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rabkf-0002n6-OA for help-guix@gnu.org; Thu, 15 Feb 2024 08:26:09 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rabkb-0004Nh-3T for help-guix@gnu.org; Thu, 15 Feb 2024 08:26:09 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id EF53128D225; Thu, 15 Feb 2024 13:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708003561; bh=bSA+AgEiMJcRCW0+QaDnCngjVCWqUv1E2Dmd5/wE/Y4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=ivrseoub9tlm9X4jWXvKbyqDmETxQdk1Ek6VHowN3CVpB5GiFa+Ys5JsYdof4Rj41 oAOixx5djgfqahPd3afqV3yh3+NnHZ6opTGCFcm4eh65KYlis2HlpF34SpfEpCnTEr +sMMWSJo15ajxvsNrVYvQVuPTBQ72boK3kkxScxy0AnNHIMgCLxXNE1aPWMiL7jt5h tzAQZuIJjDHCc/wIzksq/iFRKHpVD1QhlrPXM/KJYPinNRbQwEr2O38yCoLdzbwt03 kUjy57pAqjaQQnZRJDBG1I7BRi6z6FNYgzc9bUUD/m0gIOTujBQ4vNHYrymogfzLRc epHSSrYiZInp6dMf/AYMxp+oraJRD+33xaCU0vAaN90tPmu8twaYGpJ1dF2y+xhpIH Ie/v4kIFW0Ra10yRXhj4OTsZpTPzqXsBWLprWbaJMv7TxhHNuTGAwFyKOVvsQBRxGv prqUQB+KZzGmJgFlcVYzA5zU1aZU9ZAtBUWmM149vT0hVGZNOrxi81GznxHIhzUC1c ovslV9EK1E6brPa2O2KGMVSibpErpUlkn87It/bL+FXxTgeOOsU4YEplmwmGgNnGvx XNjYMVo8kYejxUzyZgj7PQpQSe5jbDAJNr8+JLpoHvlRuwBlqcLS8yHWhi4fXJ7+1e yzvUboT+/HMgPkTFWyR4JqrY= Received: from localhost (unknown [193.32.127.154]) by wolfsden.cz (Postfix) with ESMTPSA id 5250328D595; Thu, 15 Feb 2024 13:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708003561; bh=bSA+AgEiMJcRCW0+QaDnCngjVCWqUv1E2Dmd5/wE/Y4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=ivrseoub9tlm9X4jWXvKbyqDmETxQdk1Ek6VHowN3CVpB5GiFa+Ys5JsYdof4Rj41 oAOixx5djgfqahPd3afqV3yh3+NnHZ6opTGCFcm4eh65KYlis2HlpF34SpfEpCnTEr +sMMWSJo15ajxvsNrVYvQVuPTBQ72boK3kkxScxy0AnNHIMgCLxXNE1aPWMiL7jt5h tzAQZuIJjDHCc/wIzksq/iFRKHpVD1QhlrPXM/KJYPinNRbQwEr2O38yCoLdzbwt03 kUjy57pAqjaQQnZRJDBG1I7BRi6z6FNYgzc9bUUD/m0gIOTujBQ4vNHYrymogfzLRc epHSSrYiZInp6dMf/AYMxp+oraJRD+33xaCU0vAaN90tPmu8twaYGpJ1dF2y+xhpIH Ie/v4kIFW0Ra10yRXhj4OTsZpTPzqXsBWLprWbaJMv7TxhHNuTGAwFyKOVvsQBRxGv prqUQB+KZzGmJgFlcVYzA5zU1aZU9ZAtBUWmM149vT0hVGZNOrxi81GznxHIhzUC1c ovslV9EK1E6brPa2O2KGMVSibpErpUlkn87It/bL+FXxTgeOOsU4YEplmwmGgNnGvx XNjYMVo8kYejxUzyZgj7PQpQSe5jbDAJNr8+JLpoHvlRuwBlqcLS8yHWhi4fXJ7+1e yzvUboT+/HMgPkTFWyR4JqrY= Date: Thu, 15 Feb 2024 14:26:00 +0100 From: Tomas Volf <~@wolfsden.cz> To: woshilapin Cc: help-guix@gnu.org Subject: Re: How to debug a failed build of rust application under cargo-build-system? Message-ID: Mail-Followup-To: woshilapin , help-guix@gnu.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xQjsu/eGHMhOjska" Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.79 X-Spam-Score: -8.79 X-Migadu-Queue-Id: 5E7B777CC1 X-TUID: F/9pY+3bkLVg --xQjsu/eGHMhOjska Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-02-15 13:06:23 +0000, woshilapin wrote: > Hi, > > It is indeed a code error which looks weird. Are you sure the 2 compilati= ons compile the same source code? Well, technically I am not sure. I ran the `guix import crate -r netavark'= and used the output from that. My expectation was that it would walk the dependencies, and produce the same dependency tree cargo would use. Is tha= t a correct expectation? > How do you invoke `cargo install`? cargo install netavark Which seems to install 1.10.3 version. That does match my package: (name "netavark") (version "1.10.3") (source (origin (method url-fetch) (uri (crate-uri "netavark" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1viyj9xqq9hkcsghrfx7wjmky3hkxfr96952f9favd4zg9ih64yw")))) (build-system cargo-build-system) When I check the failing tonic crate, both (guix package and in output for = the cargo install above) are in 0.10.2 version. > Because if you invoke `cargo install --path .`, then I'm pretty sure it's= compiling whatever is on your machine at the current directory. However, a= ny other invocation of `cargo install` might actually pull some source from= `crates.io` (the package registry for `cargo`). For example, `cargo instal= l cargo-nextest` will download. > Same applies for `guix build` (I'm a guix very beginner so I might not be= the best at this), I'm not sure `guix build` build the current directory. = Doesn't it build the `package.scm` which itself describe where to pull the = source code? > > So, trying a way to be sure that `cargo install` and `guix build` actuall= y build the same source code might a first step. I hope this helps. > > Have a nice day. > -- > woshilapin > > Le jeudi 15 f=E9vrier 2024 =E0 13:43, Tomas Volf <~@wolfsden.cz> a =E9cri= t=A0: > > > Greetings, > > > > I am trying to package a rust application and the build fails. I am not= sure > > how to debug that. When I try to compile the application using `cargo i= nstall', it does pass and build just fine. However, when I try to build the= application (imported using the cargo importer) using` guix build', I get = this error: > > > > Compiling tonic v0.10.2 > > error[E0277]: the `?` operator can only be used in an async block that = returns `Result` or `Option` (or another type that implements `FromResidual= `) > > --> /tmp/guix-build-netavark-1.10.3.drv-0/netavark-1.10.3/guix-vendor/r= ust-tonic-0.10.2.tar.gz/src/transport/server/incoming.rs:32:45 > > > > | > > 28 | / async_stream::try_stream! { > > 29 | | tokio::pin!(incoming); > > 30 | | > > 31 | | while let Some(item) =3D incoming.next().await { > > 32 | | yield item.map(ServerIo::new_io)? > > | | ^ cannot use the `?` operator in an async block that returns `()` > > 33 | | } > > 34 | | } > > | |_____- this function should return `Result` or `Option` to accept `?` > > | > > =3D help: the trait `FromResidual>`= is not implemented for `()` > > > > > > For more information about this error, try `rustc --explain E0277`. > > error: could not compile `tonic` (lib) due to previous error > > > > I am not know rust, but this looks like a code error? If that is the ca= se, I do > > not understand why `cargo install' works, since it should be using the = same > > code. > > > > Could someone nudge me in the right direction regarding how to debug th= is issue? > > I am not really sure where to start. > > > > Thank you and have a nice day, > > Tomas Volf > > > > -- > > There are only two hard things in Computer Science: > > cache invalidation, naming things and off-by-one errors. -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --xQjsu/eGHMhOjska Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmXOEOgACgkQL7/ufbZ/ wakWSw/8CffDZ4WXaKpc1tNLklvWl7JWT95axidZbjcsYrYz/27ds6F+g5usOjZB cw/AvzsQ0OEzqLBMT8M96N+UioUpSJ8SBQc/IA9uk7y8oYbQItQiDMUGVvcUbwD6 p2pFvPbhDuGH3SZPEmMMqeHKDll/ZM5ODr3A5I1QnVQ0Q8gUbvI7eQqhOZUiS/Fb VYtJ0hh4uEjKOo2pOc+1gVzO22zLbliifgkUdmUDhFNhH1EJEMwFUA2yuQmNF3i1 nogKIl3W8YIg/l41rZiTATIYqpV3SgYkybS85j95Lx8KLvCYZJiIsCcHlnPBfo1+ wnI4uJEXp3y/0B+wa8LzbLUib8PbYvtsJCLJIf1S8lWLE6GlLH6ffuaspwYnVt6J B/5GevwUJxGwCqWoc4CK28cu8ZW/wQjJTtAlqIP6u4bGivJu4TE/DxTjFQbmpQbB gQgW5rPpJIv0xeEaiHS5R49fIaUHXijm25XfbFA7RKQ5R9HcMm81E1yef/q6gTWJ lIBsoQFy91hCdliG3bGnfJORUFZsJjb6nBFgKtRNrPWtbGGHHgAC760TZGJPSZvQ FzUfpXsIVHDceFwUjK2RMdwQalI82+NydTQvigv9/7dJEaXvW5fvkT4Izljxt2KD hsiRCBG0YAQXOFGVp+9C7lF7vKqKCJZ1tm02/mewr8tv6gaBwio= =H86p -----END PGP SIGNATURE----- --xQjsu/eGHMhOjska--