From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Romain Naour <romain.naour@smile.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 2/3] package/rust: use host libraries from HOST_DIR
Date: Sat, 2 Mar 2024 23:07:33 +0100 [thread overview]
Message-ID: <ZeOjJb_G9QpWwvsg@landeda> (raw)
In-Reply-To: <20240229224122.1085300-2-romain.naour@smile.fr>
Romain, All,
On 2024-02-29 23:41 +0100, Romain Naour spake thusly:
> host-rust package depends on several host packages to provide tools and
> libraries but it doesn't take into account HOST_DIR while building rustc
> compiler. Indeed, rustc needs zlib and fail to link if zlib is not
> installed on the host.
>
> error: could not compile `rustc_driver` (lib) due to previous error
>
> If zlib is installed on the host, we can notice it with ldd tool (while
> it should be linked with the one provided by Buildroot host-zlib).
>
> ldd [...]TestRust/host/bin/rustc
> libz.so.1 => /lib64/libz.so.1
>
> Provide HOST_LDFLAGS using llvm.ldflags in config.toml.
> (HOST_LDFLAGS provide -L$(HOST_DIR)/lib -Wl,-rpath,$(HOST_DIR)/lib)
>
> With that fixed, rustc_driver link with libz from HOST_DIR but the
> host-rust build still fail later due to another issue.
>
> error: could not compile `rustdoc-tool` (bin "rustdoc_tool_binary") due to previous error
>
> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/6256881545
> http://autobuild.buildroot.org/results/a6b/a6b28783f29e6b729824bf42679a62f72ad5bee0
>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> v2: no change
> ---
> package/rust/rust.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/rust/rust.mk b/package/rust/rust.mk
> index 16a397407f..4903060368 100644
> --- a/package/rust/rust.mk
> +++ b/package/rust/rust.mk
> @@ -65,6 +65,7 @@ define HOST_RUST_CONFIGURE_CMDS
> echo 'cc = "$(TARGET_CROSS)gcc"'; \
> echo '[llvm]'; \
> echo 'ninja = false'; \
> + echo 'ldflags = "$(HOST_LDFLAGS)"'; \
> ) > $(@D)/config.toml
> endef
>
> --
> 2.43.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-03-02 22:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 22:41 [Buildroot] [PATCH v2 1/3] package/rust/rust.mk: add missing host-zlib dependency Romain Naour
2024-02-29 22:41 ` [Buildroot] [PATCH v2 2/3] package/rust: use host libraries from HOST_DIR Romain Naour
2024-03-02 22:07 ` Yann E. MORIN [this message]
2024-02-29 22:41 ` [Buildroot] [PATCH v2 3/3] package/rust: provide RUSTFLAGS for cargo Romain Naour
2024-03-02 21:45 ` Yann E. MORIN
2024-03-02 21:54 ` Romain Naour
2024-03-02 22:06 ` Yann E. MORIN
2024-03-02 22:07 ` [Buildroot] [PATCH v2 1/3] package/rust/rust.mk: add missing host-zlib dependency Yann E. MORIN
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=ZeOjJb_G9QpWwvsg@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=romain.naour@smile.fr \
/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