[Devel-en] rust-cargo build
Mikhail Novosyolov
m.novosyolov at rosalinux.ru
Sun May 29 15:57:27 MSK 2022
Maybe we can use macros from Fedora to not reinvent a wheel
https://pagure.io/fedora-rust/rust2rpm/tree/main
https://src.fedoraproject.org/rpms/rust-srpm-macros/blob/rawhide/f/rust-srpm-macros.spec
They are complex, though
(please don't loose devel-en@ from the "To" / "CC" filed )
29.05.2022 12:40, abf only пишет:
> Ok I got it , I guess, beside build the source tarball wit -g flag, it has to be build all targets with debug simbols,
> so instead of:
>
> RUSTFLAGS=-g cargo build ,
>
> should be
>
> RUSTFLAGS=-g cargo build --all-targets
>
> also --offline flag is a must ,since on abf the wrokers don't have online build enabled,
> ( sometimes --frozen flag is usefull if the build use a local index of the crates, to avoid
> search for new online crates located outside crates-io-index tree, like gitlab )
> and just add in your .cargo/config.toml:
>
> [source."https:/gitlab.com/xyz.git"]
>
> git = "https://gitlab.com/xyz.git"
>
> replace-with = "vendored-sources"
>
>
> Thanks again, take care.
>
>
>
>
> *Symbianflo*
> = MRB ain't no shit. Keep safe use Linux.=
>
> W: = https://abf.io/platforms/rosalinuxro_personal =
>
> On mag 29 2022, at 10:09 am, abf only <abfonly at gmail.com> wrote:
>
> Already done that.. calling -g , flag to compiler won't call the debug symbols...
> g approach seems not working.. sadly
>
>
> Esecuzione(%build) in corso: /bin/sh -e /var/tmp/rpm-tmp.YExN6U
> + umask 022
> + cd /home/symbianflo/rpmbuild/BUILD
> + cd joshuto-0.9.3
> + '[' 1 -eq 1 ']'
> + '[' 1 -eq 1 ']'
> ++ pwd
> + export CARGO_HOME=/home/symbianflo/rpmbuild/BUILD/joshuto-0.9.3/.cargo
> + CARGO_HOME=/home/symbianflo/rpmbuild/BUILD/joshuto-0.9.3/.cargo
> + RUSTFLAGS=-g
> + cargo build --release --offline --frozen
> ###############################################
>
> Elaborazione file: joshuto-debugsource-0.9.3-1.x86_64
> errore: Empty %files file /home/symbianflo/rpmbuild/BUILD/joshuto-0.9.3/debugsourcefiles.list
> Elaborazione file: joshuto-debuginfo-0.9.3-1.x86_64
> Provides: debuginfo(build-id) = c186b59ac92054e9e44615e473326b5f3041f4a9 joshuto-debuginfo = 0.9.3-1 joshuto-debuginfo(x86-64) = 0.9.3-1
> Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
> Recommends: joshuto-debugsource(x86-64) = 0.9.3-1
> Controllo per file non pacchettizzati in corso: /usr/lib/rpm/check-files /home/symbianflo/rpmbuild/BUILDROOT/joshuto-0.9.3-1.x86_64
>
>
> Errori di compilazione RPM:
> Empty %files file /home/symbianflo/rpmbuild/BUILD/joshuto-0.9.3/debugsourcefiles.list
>
>
> I would wait for advice before push rust apps in contrib, with no debugging.
>
> THANKS.
>
>
> *Symbianflo*
> = MRB ain't no shit. Keep safe use Linux.=
>
> W: = https://abf.io/platforms/rosalinuxro_personal =
>
> On mag 28 2022, at 10:09 pm, Mikhail Novosyolov <m.novosyolov at rosalinux.ru> wrote:
>
>
> Try RUSTFLAGS=-g cargo build
>
> 28.05.2022 23:01, abf only пишет:
>
>
> Yes , of course, none of cargo build /install won't create debug/debuginfo, at least not for me.
> Also , since rust is coming up strong ( see kernel.org), some rust/cargo macros would be needed,
> IMHO.
> Thx for reply
>
> *Symbianflo*
> = MRB ain't no shit. Keep safe use Linux.=
>
> W: = https://abf.io/platforms/rosalinuxro_personal =
>
> On mag 28 2022, at 9:56 pm, Mikhail Novosyolov <m.novosyolov at rosalinux.ru> <mailto:m.novosyolov at rosalinux.ru> wrote:
>
> 28.05.2022 15:27, abf only пишет:
> > Hi
> > Do we have somebody wich can help with rust, ( cargo build),
> > I really don't know how to enable debugging in cargo.
> > Please advice.
> > Thanks.
> Hi! Do you mean debuginfo subpackages?
> _______________________________________________
> Devel-en mailing list
> Devel-en at lists.rosalinux.ru
> http://lists.rosalinux.ru/mailman/listinfo/devel-en
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rosalinux.ru/pipermail/devel-en/attachments/20220529/4589dc92/attachment-0001.html>
More information about the Devel-en
mailing list