[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Issue when building "i18n-embed-fl" which uses find-crate



Le mercredi 22 février 2023 20:31:30 CET, vous avez écrit :
> On 2023/2/23 03:05, Fab Stz wrote:
> > Hello,
> > 
> > I'm trying to package the "i18n-embed-fl" crate.
> > 
> > For this I run
> > ./build.sh i18n-embed-fl librust-*deb
> > 
> > I already built all the dependencies including find-crate.
> > 
> > However it fails with this error:
> >   --> /<<PKGBUILDDIR>>/debian/cargo_registry/i18n-embed-impl-0.8.0/src/
lib.rs:
> > 86:20
> > 
> > 86 |     let manifest = find_crate::Manifest::new().expect("Error reading
> > Cargo.toml");
> > 
> >    |                    ^^^^^^^^^^ use of undeclared crate or module
> > 
> > `find_crate`
> > 
> > 
> > 
> > If I go to build/i18n-embed-fl and run cargo build, it doesn't fail.
> 
> `cargo build` won't fail because it pulls all the dependencies from
> crates.io, while our build toolchain doesn't.
> 
> You may want to check build/i18n-embed-fl/Cargo.toml (with patches applied
> if there is any) and result of `ls build/librust-*deb` to see if find-crate
> is really there. Also, it's more helpful to have the full build log
> available, you can upload it to https://paste.debian.net. Consider asking
> in #debian-rust too.


Thanks for your reply!

Unfortunately, le build log exceed the limit of https://paste.debian.net
However, the "find-crate" crate is installed in the sbuild chroot.

But I noticed that while the name of the crate is "find-crate" (on https://
crates.io) it has to be invokd with find_crate. Could this be a reason?

"find-crate" crate seems built too because in the log there is:
   Compiling find-crate v0.6.3
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=find_crate 
CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>>/debian/cargo_registry/find-crate-0.6.3 
CARGO_PKG_AUTHORS='Taiki Endo <te316e89@gmail.com>' 
CARGO_PKG_DESCRIPTION='Find the crate name from the current Cargo.toml.
' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='Apache-2.0 OR MIT' 
CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=find-crate 
CARGO_PKG_REPOSITORY='https://github.com/taiki-e/find-crate' 
CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.6.3 CARGO_PKG_VERSION_MAJOR=0 
CARGO_PKG_VERSION_MINOR=6 CARGO_PKG_VERSION_PATCH=3 CARGO_PKG_VERSION_PRE='' 
LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' rustc --crate-
name find_crate --edition=2018 /<<PKGBUILDDIR>>/debian/cargo_registry/find-
crate-0.6.3/src/lib.rs --error-format=json --json=diagnostic-rendered-
ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link 
-C embed-bitcode=no -C debuginfo=2 -C metadata=deaff8bf111759d5 -C extra-
filename=-deaff8bf111759d5 --out-dir /<<PKGBUILDDIR>>/target/debug/deps -L 
dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern toml=/<<PKGBUILDDIR>>/
target/debug/deps/libtoml-e7e9761b570abfa9.rmeta --cap-lints warn`
warning: `toml` (lib) generated 1 warning







Reply to: