[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to debug a failed build of rust application under cargo-build-sy
From: |
Tomas Volf |
Subject: |
Re: How to debug a failed build of rust application under cargo-build-system? |
Date: |
Thu, 15 Feb 2024 17:23:40 +0100 |
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.
signature.asc
Description: PGP signature