From: Tomas Volf <~@wolfsden.cz>
To: Nils Landt <nils@landt.email>
Cc: help-guix@gnu.org
Subject: Re: How to debug a failed build of rust application under cargo-build-system?
Date: Thu, 15 Feb 2024 17:23:40 +0100 [thread overview]
Message-ID: <Zc46jEsZSxV3fpgh@ws> (raw)
In-Reply-To: <651390050.176762.1708008171345@office.mailbox.org>
[-- Attachment #1: Type: text/plain, Size: 2039 bytes --]
On 2024-02-15 15:42:51 +0100, Nils Landt wrote:
> > Tomas Volf <~@wolfsden.cz> hat am 15.02.2024 14:26 CET geschrieben:
> >
> >
> > 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 compilations 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 that a
> > correct expectation?
>
> Not necessarily correct, no.
> cargo install does not use the lockfile, see https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile
> The cargo-build-system also doesn't use it.
> The crate importer also doesn't use it :)
Oh... Right, so I managed to track down the difference. The importer uses
async-stream in 0.3.2 while cargo in 0.3.5. After updating the packaged version
to 0.3.5, it now compiles, so that is nice.
Wait, it is not. I assumed that rust is big on the semver. Should 0.3.2 and
0.3.5 be the same (except bug fixes)? :-O
>
> > > > Could someone nudge me in the right direction regarding how to debug this issue?
> > > > I am not really sure where to start.
>
> First, I'd try to make sure that guix build rust-tonic works.
>
> This page helped me a lot in getting started: https://guix.gnu.org/manual/en/html_node/Debugging-Build-Failures.html
>
> I tried to reproduce this locally (import and build), building rust-tonic works fine for me.
> Funnily enough, I'm running into a completely different error, related to https://github.com/hyperium/tonic/blob/408f46d5f2e1a25547831eb4b064bdeaf3868979/tonic-build/src/lib.rs#L47-L60
>
Yep, you need to provide PROTOC environment variable or patch the source code
(what I do).
But thanks to you I managed to solve this, so thanks :)
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-02-15 16:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 12:43 How to debug a failed build of rust application under cargo-build-system? Tomas Volf
2024-02-15 13:06 ` woshilapin
2024-02-15 13:26 ` Tomas Volf
2024-02-15 14:42 ` Nils Landt
2024-02-15 16:23 ` Tomas Volf [this message]
2024-02-15 18:07 ` Nils Landt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zc46jEsZSxV3fpgh@ws \
--to=~@wolfsden.cz \
--cc=help-guix@gnu.org \
--cc=nils@landt.email \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.