From: Felix Knorr <FKnorr@neuroloop.de>
To: Alex Kiernan <alex.kiernan@gmail.com>
Cc: "yocto@lists.yoctoproject.org" <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] Problems with recipe for our Rust-Software
Date: Fri, 13 May 2022 07:56:51 +0000 [thread overview]
Message-ID: <d613b978-e8fa-ffcc-77de-87f1415bfdb9@neuroloop.de> (raw)
In-Reply-To: <CAO5Uq5TnUuDo1uC40qjOkGrVWfjDG98XbxchQ86wpVAXCch_eg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 7284 bytes --]
Hey,
I'm now using the latest cargo-bitbake (thanks for the tip), but I'm still having problems. One of the dependencies needs pkg-config to build, and the error implies that it couldn't be found. To verify this, I added the following do_compile function:
do_compile() {
bbnote "pkg-config: $(which pkg-config)"
}
and checked the log.do_compile file after running which just says
DEBUG: Executing shell function do_compile
NOTE: pkg-config:
DEBUG: Shell function do_compile finished
so it's definitely not there. I added DEPENDS += " dbus (>= 1.6) pkgconf" to the recipe, but that didn't help.
On 12.05.22 15:28, Alex Kiernan wrote:
On Thu, May 12, 2022 at 2:09 PM Felix Knorr <fknorr@neuroloop.de><mailto:fknorr@neuroloop.de> wrote:
Hey,
I'm struggling with a recipe to build our rust project.
I cannot use cargo-bitbake because we use the 2021 edition. Also the project is quite complex. We have one repository with 4 different crates, some of them are linking c code. I'm trying to create a recipe by hand.
The HEAD of cargo-bitbake works fine for 2021 for us.
When I run bitbake for the recipe, it will error out with the following error message:
ERROR: serve-1.0.0-r0 do_compile: ExecutionError('/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/run.do_compile.400923', 101, None, None)
ERROR: Logfile of failure stored in: /home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/temp/log.do_compile.400923
Log data follows:
| DEBUG: Executing shell function do_compile
| Updating crates.io index
| warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Name or service not known; class=Net (12)
| error: failed to get `anyhow` as a dependency of package `nlprog v0.1.0 (/home/felix/git/poky/build/tmp/work/core2-64-poky-linux/serve/1.0.0-r0/tmp/baroloop/programmer-rust/nlprog)`
|
| Caused by:
| failed to fetch `https://github.com/rust-lang/crates.io-index`
|
| Caused by:
| network failure seems to have happened
| if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
| https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
|
| Caused by:
| failed to resolve address for github.com: Name or service not known; class=Net (12)
| WARNING: exit code 101 from a shell command.
ERROR: Task (/home/felix/git/baroloop/programmer-tablet/layers/meta-main/recipes-core/programmer/serve_1.0.0.bb:do_compile) failed with exit code '1'
However, if I run the devshell for the recipe and run cargo, it will at least be able to do the fetching. (It will currently fail in the linker step, but I assume thats because I haven't executed oe_cargo_fix_env)
if I don't remove the http.multiplexing=false from the cargo config, it will just hang forever in the devshell (but not error out).
If I set export CARGO_NET_GIT_FETCH_WITH_CLI=true the error is slightly different, but the git call that is then displayed also works in the devshell. Also using a crate://-fetcher doesn't work, which is why I added the CARGO_DISABLE_BITBAKE_VENDORING = "1" I've been fighting this for hours and can't come up with anything. I hope you can help me.
PS: I'm using kirkstone, and I'm not having any url sections in my .gitconfig
This is the recipe:
cargo
SUMMARY = "Copy prebuild programmer serve into the image"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
SRC_URI="\
file://${bl_path}/programmer-ui/dist \
file://${config_path}/files/session \
file:///tmp/baroloop \
"
# crate://crates.io/tokio/1 \
# crate://crates.io/war/0.3 \
# crate://crates.io/byte/1 \
# crate://crates.io/log/0.4.8 \
# crate://crates.io/serde_json/1.0.75 \
# crate://crates.io/serde/1.0.133 \
# crate://crates.io/docopt/1.1.0 \
# crate://crates.io/colored/1.9.3 \
# crate://crates.io/chrono/0.4.11 \
# crate://crates.io/battery/0.7.7 \
# crate://crates.io/uuid/0.8.2 \
# crate://crates.io/thiserror/1.0 \
# crate://crates.io/anyhow/1 \
# crate://crates.io/clap/3.0 \
# crate://crates.io/futures/0.3 \
# crate://crates.io/wry/0.6.1
S = "${WORKDIR}"
RDEPENDS:${PN} = "\
eudev \
dbus \
"
DEPENDS = "\
eudev \
dbus \
"
# INSANE_SKIP:${PN} += "file-rdeps"
FILES:${PN} = "\
/home/neuro/serve \
/home/neuro/dist/** \
${sysconfdir}/mini_x/session \
"
CARGO_DISABLE_BITBAKE_VENDORING = "1"
do_compile() {
oe_cargo_fix_env
sed -i '/multiplexing = false/d' $CARGO_HOME/config
sed -i '/\[http\]/d' $CARGO_HOME/config
sed -i '/cainfo/d' $CARGO_HOME/config
export RUSTFLAGS="${RUSTFLAGS}"
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
export CARGO_NET_GIT_FETCH_WITH_CLI=true
cd ${S}/tmp/baroloop/programmer-rust/
cargo build --release --bin serve
}
do_install() {
# this isn_t reached anyway
# ...
}
--
Mit freundlichen Grüßen neuroloop GmbH
i.A. Felix Knorr
Senior Software Developer
--------------------------------------
neuroloop GmbH
Engesserstr. 4, 79108 Freiburg, Germany
Amtsgericht Freiburg HRB 713935
Geschäftsführer: Dr. Michael Lauk, Dr. Dennis Plachta
The information contained in this communication is confidential, may be attorney-client privileged, may constitute inside information, and is intended only for the use of the addressee. It is the property of the company of the sender of this e-mail. Unauthorized use, disclosure, or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication and all copies thereof, including all attachments.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#57072): https://lists.yoctoproject.org/g/yocto/message/57072
Mute This Topic: https://lists.yoctoproject.org/mt/91057468/3618097
Group Owner: yocto+owner@lists.yoctoproject.org<mailto:yocto+owner@lists.yoctoproject.org>
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [alex.kiernan@gmail.com<mailto:alex.kiernan@gmail.com>]
-=-=-=-=-=-=-=-=-=-=-=-
--
Mit freundlichen Grüßen neuroloop GmbH
i.A. Felix Knorr
Senior Software Developer
--------------------------------------
neuroloop GmbH
Engesserstr. 4, 79108 Freiburg, Germany
Amtsgericht Freiburg HRB 713935
Geschäftsführer: Dr. Michael Lauk, Dr. Dennis Plachta
The information contained in this communication is confidential, may be attorney-client privileged, may constitute inside information, and is intended only for the use of the addressee. It is the property of the company of the sender of this e-mail. Unauthorized use, disclosure, or copying of this communication or any part thereof is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication and all copies thereof, including all attachments.
[-- Attachment #2: Type: text/html, Size: 9123 bytes --]
next prev parent reply other threads:[~2022-05-13 7:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220512130957epcas2p47a753e9c7aca42eb59e9f2ec9ba97e12@epcas2p4.samsung.com>
2022-05-12 13:09 ` Problems with recipe for our Rust-Software Felix Knorr
2022-05-12 13:15 ` [yocto] " Alexander Kanavin
2022-05-12 13:23 ` Felix Knorr
2022-05-12 13:28 ` Alex Kiernan
2022-05-13 7:56 ` Felix Knorr [this message]
2022-05-13 8:03 ` Quentin Schulz
2022-05-13 9:25 ` Felix Knorr
2022-05-13 9:44 ` Quentin Schulz
2022-05-13 10:33 ` Felix Knorr
2022-05-12 13:32 ` Chanho Park
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=d613b978-e8fa-ffcc-77de-87f1415bfdb9@neuroloop.de \
--to=fknorr@neuroloop.de \
--cc=alex.kiernan@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/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.
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.