All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chanho Park" <chanho61.park@samsung.com>
To: "'Felix Knorr'" <fknorr@neuroloop.de>, <yocto@lists.yoctoproject.org>
Cc: <Randy.MacLeod@windriver.com>
Subject: RE: [yocto] Problems with recipe for our Rust-Software
Date: Thu, 12 May 2022 22:32:36 +0900	[thread overview]
Message-ID: <000001d86604$be6ac400$3b404c00$@samsung.com> (raw)
In-Reply-To: <e1f7dbc8-c091-5891-2d1e-d1fb22ada352@neuroloop.de>

Hi,

I'm also facing same issue behind proxy even though I personally reverted below patch :(

https://git.yoctoproject.org/poky/commit/meta/classes/cargo_common.bbclass?h=kirkstone&id=83651eda51d65bcf479a9a8940232b712583e61f

cargo_common: remove http_proxy
Fix the test_sstate_noop_samesigs oe-selftest that
produces an error like:

   core2-64-poky-linux/libstd-rs/1.54.0-r0.do_configure.sigdata differs:
   basehash changed from <hash-a> to <hash-b>
   Variable http_proxy value changed from '' to 'http://example.com/'

by simply removing the proxy config option. This may be added back
after merge to oe-core if needed and if the diffsigs check passes.

Best Regards,
Chanho Park

> -----Original Message-----
> From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On
> Behalf Of Felix Knorr
> Sent: Thursday, May 12, 2022 10:10 PM
> To: yocto@lists.yoctoproject.org
> Subject: [yocto] Problems with recipe for our Rust-Software
> 
> 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.
> 
> 
> 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
> <https://protect2.fireeye.com/v1/url?k=68eaf684-3771ce79-68eb7dcb-
> 000babff317b-44b4b436f9e0edc0&q=1&e=3342104f-017d-4ac5-9d70-
> f1208c419a68&u=https%3A%2F%2Fgithub.com%2Frust-lang%2Fcrates.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.




      parent reply	other threads:[~2022-05-12 13:32 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
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 [this message]

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='000001d86604$be6ac400$3b404c00$@samsung.com' \
    --to=chanho61.park@samsung.com \
    --cc=Randy.MacLeod@windriver.com \
    --cc=fknorr@neuroloop.de \
    --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.