Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix "no compatible architectures" in riscv32 #2540

Closed
wants to merge 4 commits into from

Conversation

U2FsdGVkX1
Copy link

https://github.com/rpm-software-management/rpm/blob/master/lib/rpmrc.c#L1334
because in defaultMachine, riscv32 will be assigned as "riscv32", however rpmrc identifies rv32 as "riscv"
this will cause build some packages in riscv32 to say "no compatible architectures found for build"

@pmatilai
Copy link
Member

This looks risky as it effectively renames an architecture, plus plain wrong in places (more on those shortly). But, I can see the point: plain "riscv" is not even supposed to exist, it's always translated to riscv<bitness>.

@rwmjones , thoughts?

rpmrc.in Outdated Show resolved Hide resolved
rpmrc.in Outdated Show resolved Hide resolved
@rwmjones
Copy link
Contributor

rwmjones commented Jun 13, 2023

I asked @davidlt to take a look, but just a few things ...

We don't use 32 bit RISC-V in Fedora, and don't plan to, so to some extent we don't care about it. Note that 32 bit RISC-V machines are currently confined to tiny embedded systems that couldn't possibly run Linux, hence rpm. eg. They lack userspace mode, MMU, enough RAM, etc. Maybe they could in future, although it seems unlikely to ever be interesting to us.

Edit: This also applies to libraries, there is no multilib concept relevant to Fedora. Also unlike i686/x86_64 I don't believe it's possible (and if it is possible, it's definitely so uncommon as to be unheard of) to run 32 bit binaries on a 64 bit RISC-V machine.

We don't use the bare riscv architecture either. Our RPMs are riscv64.

@davidlt
Copy link

davidlt commented Jun 13, 2023

To my knowledge none of main distributions support 32-bit RISCV. OpenEmbedde definitely has it. Most likely the same applies to Buildroot too. There are no native riscv32 hardware available that would target Linux to my knowledge. It's mainly tested with QEMU.

IIRC Alibaba/T-HEAD cores are CONFIG_COMPAT capable. At least of Fedora/RISCV side we have no plans to enable CONFIG_COMPAT.

TL;DR There is very little interest in 32-bit RISCV + feature rich operating systems. Even the tiny and cheap boards with (or without) MMU that are Linux capable are 64-bit today.

I don't think that anything uses riscv arch string. I didn't know it even existed. Everyone expects riscv32, riscv64 and there are several derivates in other places (e.g. OpenEmbedded, FreeBSD IIRC).

@pmatilai
Copy link
Member

Thanks @rwmjones and @davidlt for the insight, I had no clue.

@U2FsdGVkX1 - what's the environment you're running into this? If there's an actual use-case (distro or such) for riscv-32 now, it wouldn't hurt to have people aware of it.

@U2FsdGVkX1
Copy link
Author

@pmatilai Hi, I'm currently a plct's internship and working on the Fedora RISCV 32 bit bootstrap
due to this, I need to compile many rpm packages and noarch architectures will not compile in this environment, it says "no compatible architectures found for build"
so I've simply fixed the problem, and maybe there's something else I haven't fixed

@pmatilai
Copy link
Member

Okay, Fedora Riscv-32bit bootstrap. It seems a bit odd considering the comments above, but that's not a blocker of course.

These will need more elaborate commit messages to summarize why this apparent breakage is not (summarize the above discussion). Also you'll need to supply a real name in the git commit, we don't accept patches from pseudonyms.

@Conan-Kudo
Copy link
Member

Yocto will probably wind up using this too, since they support the RPM stack with architectures like this.

@ffesti
Copy link
Contributor

ffesti commented Jul 26, 2023

OK, still someone needs to squash this and provide a proper commit message. I'll close this soonish otherwise.

@pmatilai
Copy link
Member

Closing due to lack of activity.

@pmatilai pmatilai closed this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants