|
|
Subscribe / Log in / New account

Woodruff: Weird architectures weren't supported to begin with

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 1, 2021 22:14 UTC (Mon) by rweikusat2 (subscriber, #117920)
Parent article: Woodruff: Weird architectures weren't supported to begin with

As someone who recently has had the mispleasure to "bring up rust" on two seriously "weird" architectures (x86_64 running Ubuntu 14 and ARM64 using a somewhat outdated version of Yocto supplied by the hardware vendor), I suggest the following: If you happen to use a project which adds a gratuitious dependency on Rust, consider getting rid of it: The headeache you'll eventually find yourself with when using any other platform than "a recent developer laptop" is very likely not worth it.

NB: This is not a statement on the Rust programming language which has some interesting concept in it and I'd welcome an opportunity to learn and use it for something.


to post comments

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 1, 2021 22:23 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (5 responses)

So, out of curiosity, what problems did you have?

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 2, 2021 17:04 UTC (Tue) by rweikusat2 (subscriber, #117920) [Link] (4 responses)

In hindsight, not much: The LLVM shipped by Ubuntu was too old to compile the rust version I had to use, hence, I had to figure out how to compile a compiler in order to compile a compiler to compile an application (people wearing suits hate sentences like that). It took some time to work this out and to solve it (based on zero advance knowledge).

ARM/ Yocto was abit more complicated: Getting a suitable LLVM built there required adding some libraries, one of the rust modules lacked a library reference for all of rust to be linkable and finally, some disagreement between autoconf and rust what precisely constitues a valid "target triplet" for this architecture which could be solved by making a pretty minimal change to the rust build system code (written in Rust). But becoming familiar enough with all of the parts involved here in order to be able to work out what precisely caused the build failures and learning enough Rust to be able to understand and change code written in Rust was a bit of a steep learning curve.

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 2, 2021 17:50 UTC (Tue) by mathstuf (subscriber, #69389) [Link] (3 responses)

Why did you not download the precompiled binaries (via rustup or whatever) for Ubuntu? Also, the Rust repo has the LLVM it works with in the repository (via a submodule). Given the patches they've had to apply over time, using an external LLVM probably wouldn't work out *that* well anyways.

For the Yocto bit, there is a TOML file which can describe the target rather than patching the compiler, but agreeing with autoconf does sound like something might need to be tweaked there. I think there are those who are doing embedded development with Rust; asking on those channels for guidance would likely be how I would have handled it. But, I haven't needed to do anything like that, so I don't have much experience to offer here.

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 2, 2021 18:13 UTC (Tue) by rweikusat2 (subscriber, #117920) [Link] (1 responses)

Why does answering such a question invariably lead to someone answering questions nobody ever asked?

Ubuntu has a rust package. Please ask the maintainer why he doesn't just tell its users to download something from the internet instead.

Assumptions hard-code in the build system can't be "overridden" via configuration files. That's - BTW - the very meaning of "hard-coded".

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 2, 2021 18:28 UTC (Tue) by mathstuf (subscriber, #69389) [Link]

Well, if you're looking to compile it yourself, the Ubuntu package was apparently not suitable. Was it suitable? Then why were you looking to compile it yourself?

> Assumptions hard-code in the build system can't be "overridden" via configuration files. That's - BTW - the very meaning of "hard-coded".

Like I said, I've not dealt with embedded details, but I have seen that new targets can be described via TOML files (up to LLVM configurability). But yes, if you're fighting internal logic, you're stuck with patching.

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 7, 2021 23:01 UTC (Sun) by nix (subscriber, #2304) [Link]

> Also, the Rust repo has the LLVM it works with in the repository (via a submodule). Given the patches they've had to apply over time, using an external LLVM probably wouldn't work out *that* well anyways.

This has improved greatly of late: since about LLVM 10, a separately-compiled upstream LLVM works well enough. (IIRC, there are hardly any patches left in Rust's not-a-fork of LLVM any more.)

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 1, 2021 22:38 UTC (Mon) by roc (subscriber, #30627) [Link] (3 responses)

What's weird about Ubuntu 14 x86-64?

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 2, 2021 2:46 UTC (Tue) by gus3 (guest, #61103) [Link] (2 responses)

The number of patches Ubuntu applies liberally for basically every supported platform. But that's a habit it learned from Debian. RH does the same thing, but on an enterprise level.

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 2, 2021 12:39 UTC (Tue) by amacater (subscriber, #790) [Link]

Without Debian, three quarters of *everything* on weird architectures outside x86_64 (and maybe aarch64) wouldn't exist. It's worth thinking that Debian building on 10 architectures is actually a positive here

Woodruff: Weird architectures weren't supported to begin with

Posted Mar 8, 2021 13:35 UTC (Mon) by gspr (subscriber, #91542) [Link]

For the vast majority of the software, Debian's patches are nearly trivial.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds