Skip to contentSkip to conversation

New: host-rust build fails

Buildroot bugzilla at busybox.net 1 participant 6 messages Mar 22, 2020 – May 17, 2020

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=12691

Bug ID: 12691
Summary: host-rust build fails
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: eyalroyee at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---

Unable to build host-rust (version 1.33.0).
I'm trying to build host-rust on my Ubuntu 18.04 with buildroot on branch master (commit 35e845700fb15b4ab30678c073300b508db4eb95)

Steps to reproduce are:
1) select host-rust
2) make host-rust

The error is the following:
failed to parse TOML configuration 'config.toml': expected a table key, found a right bracket at line 15
failed to run:
/home/eyal/buildroot/output/build/host-rust-1.33.0/build/bootstrap/debug/bootstrap build

It looks like the HOST_RUST_CONFIGURE_CMDS didn't generated a proper .toml file.
The 15th line in the generated .toml file is of the following format:

    echo '[target.$(RUSTC_TARGET_NAME)]';

I guess that should be some sort of validation for that variable before evaluating it.

Thanks,
Eyal

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 12691] host-rust build fails

https://bugs.busybox.net/show_bug.cgi?id=12691

--- Comment #1 from alex at corcoles.net ---
Hi,

What arch/libc are you using? Only some combinations of those work (I think only glibc). Check out:

http://buildroot-busybox.2317881.n4.nabble.com/PATCH-hack-to-be-able-to-build-Rust-targetting-MIPS-tp244931p244957.html

Cheers,

?lex

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 12691] host-rust build fails

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12691

--- Comment #3 from alex at corcoles.net ---
Yes, I think the Makefile does not support any uclibc build, even though it works. I needed to build Rust to target uclibc and I hardcoded things and it worked (this on mipsel).

I did something like this:

https://github.com/alexpdp7/retrofw2-rust/blob/master/0010-Hardcode-target-to-mipsel-uclibc-is-built.patch

The thread I linked contains more details. Also in the repo I collected some other interesting patches (updating Rust to a later version, patching the mipsel target to support the device I'm targetting, etc.).

I'm adding myself to the cc:, in case the buildroot devs add support for uclibc...

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 12691] host-rust build fails

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12691

--- Comment #4 from romain.naour at gmail.com ---
Hi Eyal, Alex,

As a short therm solution, I suggested a patch that disable host-rust package when the target architecture is not supported by rust [1].

I'm not sure how upstream rust project is testing/supporting uClibc-ng or musl.

Note: The current rust version available in Buildroot is old, there is a patch series adding a Cargo package infrastructure and an update to rust 1.40 (1.43.1 is already available).

Feel free to send a followup patch to enable host-rust for uclibc target.

[1]
http://patchwork.ozlabs.org/project/buildroot/patch/20200508152739.1625844-1-romain.naour at gmail.com/

Best regards,
Romain

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 12691] host-rust build fails

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12691

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #5 from Thomas Petazzoni <[email protected]> --- Applied the patch proposed by Romain as
https://git.buildroot.org/buildroot/commit/?id=4c051c65eee278e54a95ec0f5790e39f9af901c9

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.