From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WBypCimzz2UDYAAA62LTzQ:P1 (envelope-from ) for ; Fri, 16 Feb 2024 20:10:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id WBypCimzz2UDYAAA62LTzQ (envelope-from ) for ; Fri, 16 Feb 2024 20:10:33 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=tuziwo.info header.s=protonmail header.b=g+6LUAHK; 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=tuziwo.info ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708110633; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=jZXVrLYW2dum1B+OfCzUtBDXdvsQcu+UxU/98iTEcJ0=; b=jXhxYzs8QP/BxeSwV3xDT9bsYAj0Oz7eLdDCMKEgAUQipLMIwNYT3+d50zYjBbv5h850gl swLVvcp0jqb/jpetlbqANe26aRcUEPzqwhJq1C2Q7T5D3fq7gTtBrI+oFwv7zf8ss1rES+ u0sldgbTLmHkZmb+mOfZrYTcp5glq+Rtvnydy61yinu+tqBsCnrIuJCM5irYsetozpOPHO SKHVADiNLCpZc0b6F6sidMs7yOyarUeQ2FgUJCuin1j0cQDn9OkxsqBJO+3plChH883XUQ i1QsrAnDJ5OLj+KwRHZi4QgTSZBMG501BP2sH3PTF2fZjsjd/fhYd8HvUMdNbw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=tuziwo.info header.s=protonmail header.b=g+6LUAHK; 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=tuziwo.info ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708110633; a=rsa-sha256; cv=none; b=WC/2vZmaaYSQ7FGBSq1qj52sv8w3KHg/PKPzCSApuSh+3gJij3DFdyS9smjNqwCckEhZvF t5AaHlbURT9tRmFYkCJn+ugTZSwm4GyrYDv+Y0vfpT06U6xwOuaM0ovqe3ASVAq7vIOmJd REggQT5BgwLZ7oLObGMYQT+dKlw29D1Eas3rZmrJN+/FvrDbdZTOkOmD4Najx01TCklj6H aisBCvoVZi0//H+8bKhwVOP2M6wdFBL5p+FM3uGY4nYZtkglpmAqjxDje00Wkf60UogAr0 FDexCPd+7rexQRCok5FjwSIx0oNuxB6n0+1HFKLC5gUhwwqMVyMoPqr8bdkEOg== 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 0ECA1238BE for ; Fri, 16 Feb 2024 20:10:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rb3FV-0007WN-Hq; Fri, 16 Feb 2024 13:47:49 -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 ) id 1rabRx-0001eT-4T for help-guix@gnu.org; Thu, 15 Feb 2024 08:06:49 -0500 Received: from mail-4317.proton.ch ([185.70.43.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rabRt-00084N-De for help-guix@gnu.org; Thu, 15 Feb 2024 08:06:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuziwo.info; s=protonmail; t=1708002400; x=1708261600; bh=jZXVrLYW2dum1B+OfCzUtBDXdvsQcu+UxU/98iTEcJ0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=g+6LUAHKWypBmp7SjKc0qf/001JpTZEi09JOSFkHQEB4xWfqm+Mrf1s5K1crNAJ1B 04wu2Y5NkKE5zVh+tpd0pwm3sVFwRQy5x9LBVwQ+WUI7ojfkcMMeC0Dn5S9BBmHbSi ZKz+Djshk7ufJ0w19fB7yTCdAh6kAav7HlOrB24KjRtYJUv5sS6nFonr/GpWJXqJZ0 JGs9xqumX/NClM4BYWBDXK2GeDfT0xhdPPJWHi7bzRfd8aQyZRXmKymuoyDOThV+t/ iQMWzIMhGuJkoWJHcB81pY+P3gaNPirG3YWhvY7H/T4yijnmq9DzUcx3rcMdgLTqtm hWVwALkiUWfpQ== Date: Thu, 15 Feb 2024 13:06:23 +0000 To: Tomas Volf <~@wolfsden.cz> From: woshilapin Cc: help-guix@gnu.org Subject: Re: How to debug a failed build of rust application under cargo-build-system? Message-ID: In-Reply-To: References: Feedback-ID: 30348956:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.17; envelope-from=woshilapin@tuziwo.info; helo=mail-4317.proton.ch 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Mailman-Approved-At: Fri, 16 Feb 2024 13:47:45 -0500 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -5.68 X-Spam-Score: -5.68 X-Migadu-Queue-Id: 0ECA1238BE X-TUID: pf1pcLTKuqw0 Hi, It is indeed a code error which looks weird. Are you sure the 2 compilation= s compile the same source code? How do you invoke `cargo install`? 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, any other i= nvocation of `cargo install` might actually pull some source from `crates.i= o` (the package registry for `cargo`). For example, `cargo install cargo-ne= xtest` will download. Same applies for `guix build` (I'm a guix very beginner so I might not be t= he best at this), I'm not sure `guix build` build the current directory. Do= esn't it build the `package.scm` which itself describe where to pull the so= urce code? So, trying a way to be sure that `cargo install` and `guix build` actually = build the same source code might a first step. I hope this helps. Have a nice day. -- woshilapin Le jeudi 15 f=C3=A9vrier 2024 =C3=A0 13:43, Tomas Volf <~@wolfsden.cz> a = =C3=A9crit=C2=A0: > Greetings, >=20 > I am trying to package a rust application and the build fails. I am not s= ure > how to debug that. When I try to compile the application using `cargo ins= tall', it does pass and build just fine. However, when I try to build the a= pplication (imported using the cargo importer) using` guix build', I get th= is error: >=20 > Compiling tonic v0.10.2 > error[E0277]: the `?` operator can only be used in an async block that re= turns `Result` or `Option` (or another type that implements `FromResidual`) > --> /tmp/guix-build-netavark-1.10.3.drv-0/netavark-1.10.3/guix-vendor/rus= t-tonic-0.10.2.tar.gz/src/transport/server/incoming.rs:32:45 >=20 > | > 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>` i= s not implemented for `()` >=20 >=20 > For more information about this error, try `rustc --explain E0277`. > error: could not compile `tonic` (lib) due to previous error >=20 > I am not know rust, but this looks like a code error? If that is the case= , I do > not understand why `cargo install' works, since it should be using the sa= me > code. >=20 > Could someone nudge me in the right direction regarding how to debug this= issue? > I am not really sure where to start. >=20 > Thank you and have a nice day, > Tomas Volf >=20 > -- > There are only two hard things in Computer Science: > cache invalidation, naming things and off-by-one errors.