Remix.run Logo
leni536 7 hours ago

Is cross compilation out of the question?

STKFLT 6 hours ago | parent | next [-]

I'd guess that the issue is running the `%install` and `%check` stages of the .spec file. The Python library rpy (to pull a random example from Marcin's PRs) runs rpy's pytest test suite and had to be modified to avoid running vector tests on RISC-V.

Obviously a solvable problem to split build and test but perhaps the time savings aren't worth the complexity.

https://src.fedoraproject.org/rpms/rpy/pull-request/4#reques...

leni536 6 hours ago | parent [-]

Maybe the tests could be run with user-mode qemu instead of the whole thing running under qemu or on RISC-V hardware. Could possibly be more or less seamless with binfmt_misc being set up in the builders.

kashyapc 3 hours ago | parent | prev | next [-]

Near as I know, Fedora prefers native compilation for the builds.

Your question made me look up Arm's history in Fedora and came up on this 2012 LWN thread[1]. There's some discussion against cross-compilation already back then.

[1] https://lwn.net/Articles/487622/

IshKebab 7 hours ago | parent | prev [-]

It's usually an enormous pain to set up. QEMU is probably the best option.

pantalaimon 6 hours ago | parent | next [-]

T2 manages to do it

https://t2linux.com/

STKFLT 6 hours ago | parent | prev | next [-]

Maybe there are issues I'm not aware of but using dockcross has made cross-compilation quite easy in my experience.

https://github.com/dockcross/dockcross

sofixa 7 hours ago | parent | prev [-]

Depends on the language, it's pretty trivial with Go.

Zambyte 6 hours ago | parent | next [-]

Unless you use CGO. I've heard people using Zig (which has great cross compilation for the Zig language as well) to cross compile C with CGO though.

IshKebab 6 hours ago | parent | prev [-]

Yes, but they're compiling binutils.