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

armv7: Misc. fixes #306

merged 9 commits into from Feb 24, 2021

armv7: Misc. fixes #306

merged 9 commits into from Feb 24, 2021


Copy link

@samueldr samueldr commented Feb 20, 2021


First, a workaround for libdrm, which uses libselinux.

Then, a lot of work with mruby and dependencies.

mruby work

First, force 64 bit integers, and fix mrbgems that did not play well with this change.

Changes have been contributed upstream where relevant.

Then, some additional changes so mruby apps can be built with debug enabled in stage-1. This is extremely useful as otherwise you are flying blind as to where it is actually failing.

This was verified against NixOS/nixpkgs@56bb1b0

It fails with:

/nix/store/m7080pw0ryjk0jhljp55rq1hd2qy8gki-python3-3.8.6/include/python3.8/pyport.h:726:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  726 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."


builder for '/nix/store/cdysjc47jc4z49r25xzwf2sazqd4w4rg-libselinux-3.0-armv7l-unknown-linux-gnueabihf.drv' failed with exit code 2
This might seem weird at first, but is totally needed. We have 48 bit
integers we need to handle, RGBA colours.

AFAICT full-blown Ruby would automatically handle going through another
class for larger integer. But it looks like mruby doesn't

Let's intead use the 64 bit type!
Additionally add a required patch for armv7 and 64 bit mrb_ints
The postInstall hook was never ran... D'oh!
Using `.override` inside the builder leads to `.override` outside being
ignored, as the `mruby` used would be whatever was last given to the
passthru `builder`'s own overrides or callPackages.

This breaks current calls to `mruby.builder` when `gems` was given.
Though since it breaks noisily, it won't silently ignore your gems.
This fixes backtraces in stage-1!
This is required otherwise nuke-refs will destroy the irep.
@samueldr samueldr added 4. type: bug Something isn't working 4. type: cleanup 4. type: enhancement New feature or request labels Feb 21, 2021
@samueldr samueldr mentioned this pull request Feb 23, 2021
1 task
Copy link
Member Author

Would have been nice to have confirmation from other armv7 users, but AFAICT with the mainline-based asus-flo PR, and those two new devices bringup, armv7 now works just as well as aarch64. (When Nixpkgs works.)

@samueldr samueldr merged commit d82733b into NixOS:master Feb 24, 2021
@samueldr samueldr deleted the fix/armv7l branch February 24, 2021 01:59
Copy link

I'm compiling webkitgtk on my phone right now, and it's taking forever. When it's done, I'll try out the change 😄

Copy link
Member Author

No worries, it's been tested on those two new ports, so I'm pretty confident there are no issues. Though it has only been tested using cross-compilation.

Copy link

Have you noticed any issues with executables that require capabilities (sudo, ping, ...)?

cannot get capabilities for /run/wrappers/wrappers.LJH7lVuQu8/sudo: Operation not supported

I wasn't having this problem when I was using nixpkgs from the last successful build on hydra:

Copy link
Member Author

samueldr commented Feb 24, 2021

Not really, but I haven't used stage-2 really. Only booted to the hello system.

But, yeah kind of, since this is something I have seen on aarch64 targets too. I believe many are missing kernel configs for capabilities. I don't know what configs are missing yet.

From a quick search, it might be XATTR (extended attributes) for the given filesystem. And that seems to fit given the low amount of targets with it enabled for EXT*. It might be CONFIG_EXT*_FS_SECURITY too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4. type: bug Something isn't working 4. type: cleanup 4. type: enhancement New feature or request
None yet

Successfully merging this pull request may close these issues.

armv7 status tracking (2021-02)
2 participants