public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: <enrico.scholz@sigma-chemnitz.de>,
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] rust-common: add LDFLAGS to 'build-rust-cc' wrapper
Date: Tue, 21 Jan 2025 14:19:12 +0100	[thread overview]
Message-ID: <D77S4VUB95NS.1KP2EY47KNUJA@bootlin.com> (raw)
In-Reply-To: <20250120164504.680234-1-enrico.scholz@sigma-chemnitz.de>

On Mon Jan 20, 2025 at 5:45 PM CET, Enrico Scholz via lists.openembedded.org wrote:
> From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
>
> Although rust differs between compiling (--> 'rust-cc' wrapper) and
> linking (--> 'rust-ccld' wrapper), some core crates are using only the
> 'rust-cc' wrapper to check for available compiler options [1] and
> libraries [2].
>
> Not having LDFLAGS can break the build in subtle ways.  E.g. 'cargo-native'
> can fail to build with
>
> |   = note: .../hosttools/ld: .../liblibz_sys-....rlib(deflate.o):
> |     relocation R_X86_64_32S against hidden symbol `_length_code' can not be used when making a PIE object
>
> because it does not find '-lz' (added by "DEPENDS = zlib") and builds
> a static libz.a with missing PIC flags.
>
> Add LDFLAGS to the 'build-rust-cc' wrapper as it is done already for
> the target one.
>
> [1] https://github.com/rust-lang/cc-rs/pull/1322
>
> [2] https://github.com/rust-lang/libz-sys/blob/12a32798c6bd18986cb5cd603359b03c96f0eb4c/build.rs#L228-L234
>
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---

Hi Enrico,

Thanks for your patch.

I believe it is breaking some of the builds on the autobuilder, with the
following error:

error: failed to run custom build command for `hello v0.1.0 (/srv/pokybuild/yocto-worker/qemuarmv5/build/build/tmp/work/qemuarmv5-poky-linux-gnueabi/core-image-sato/1.0/testimage-sdk/hello)`
Caused by:
  could not execute process `/srv/pokybuild/yocto-worker/qemuarmv5/build/build/tmp/work/qemuarmv5-poky-linux-gnueabi/core-image-sato/1.0/testimage-sdk/hello/target/debug/build/hello-1d90539edb14488a/build-script-build` (never executed)

Caused by:
  No such file or directory (os error 2)


https://autobuilder.yoctoproject.org/valkyrie/#/builders/80/builds/775/steps/13/logs/stdio

Can you have a look at this failure please ?

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



  reply	other threads:[~2025-01-21 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20 16:45 [PATCH] rust-common: add LDFLAGS to 'build-rust-cc' wrapper Enrico Scholz
2025-01-21 13:19 ` Mathieu Dubois-Briand [this message]
2025-01-21 15:58   ` [OE-core] " Mathieu Dubois-Briand
2025-01-23  7:30     ` Mathieu Dubois-Briand

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=D77S4VUB95NS.1KP2EY47KNUJA@bootlin.com \
    --to=mathieu.dubois-briand@bootlin.com \
    --cc=enrico.scholz@sigma-chemnitz.de \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox