Hey, thanks for your help, it's working now. But could you explain, why adding pkgconf to DEPENDS didn't work?
On 13.05.22 10:03, Quentin Schulz wrote: > Hi Felix, > > On 5/13/22 09:56, Felix Knorr wrote: >> 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. >> > > Because it's supposed to be pkgconfig-native in DEPENDS, which can be > done by just adding: > inherit pkgconfig > to your recipe. > > Cheers, > Quentin > >> On 12.05.22 15:28, Alex Kiernan wrote: >> >> On Thu, May 12, 2022 at 2:09 PM Felix Knorr >> <fkn...@neuroloop.de><mailto:fkn...@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://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_rust-2Dlang_crates.io-2Dindex&d=DwIGaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=KVxrF11PIYLER0S0KZ5nJTg8Ut1pYlTpWVAglebyRABm3CAb_QrF6YGl4ooo6kcf&s=vjlTVOHFeWmwaLHUilCKAh_c4dOX92W-oBIEor_tiR8&e= >> >> ` >> | >> | Caused by: >> | network failure seems to have happened >> | if a proxy or similar is necessary `net.git-fetch-with-cli` may >> help here >> | >> https://urldefense.proofpoint.com/v2/url?u=https-3A__doc.rust-2Dlang.org_cargo_reference_config.html-23netgit-2Dfetch-2Dwith-2Dcli&d=DwIGaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=KVxrF11PIYLER0S0KZ5nJTg8Ut1pYlTpWVAglebyRABm3CAb_QrF6YGl4ooo6kcf&s=aaYEIIOtHpjY7BkTDEi5V9-gt8kNkmRnhhAIUBrpOPI&e= >> | >> | 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. >> >> >> >> >> >> >> >> >> >> >> >> -- >> 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. >> >> >> >> >> -- 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 (#57090): https://lists.yoctoproject.org/g/yocto/message/57090 Mute This Topic: https://lists.yoctoproject.org/mt/91057468/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-