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

Build and test flexo on ARM devices #14

Closed
nroi opened this issue May 10, 2020 · 4 comments
Closed

Build and test flexo on ARM devices #14

nroi opened this issue May 10, 2020 · 4 comments
Labels
ARM ARM cpu architecture

Comments

@nroi
Copy link
Owner

nroi commented May 10, 2020

Rust supports ARM, so we should be able to support ARM devices like the Raspberry Pi. We probably need to modify the PKGBUILD on AUR so that it can be built on ArchLinux ARM.

Notice that the scope of this particular issue is only to be able to run flexo on ARM devices: The client who downloads packages still needs to have a x86_64 architecture.

@harrykantas
Copy link

Hey @nroi.
Very happy with flexo so far, I have it running on an archlinux VM and on top of my main server at home and it's been working great.
I have recently setup a Raspberry Pi 4B with ArchLinuxARM in my network, and thought I could run flexo there, to offload my main server. Unfortunately, compilation fails with the following error:

   Compiling flexo v1.0.3 (/home/harry/.cache/yay/flexo-git/src/flexo/flexo)
error[E0308]: mismatched types
   --> src/main.rs:459:55
    |
459 |             let size: isize = libc::sendfile(sfd, fd, &mut offset, MAX_SENDFILE_COUNT);
    |                                                       ^^^^^^^^^^^ expected `i32`, found `i64`
    |
    = note:    expected raw pointer `*mut i32`
            found mutable reference `&mut i64`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: could not compile `flexo`.

To learn more, run the command again with --verbose.
==> ERROR: A failure occurred in build().
    Aborting...
error making: %!s(func() string=0x783080)

Happy to create a separate issue, or provide more info if necessary.

@nroi
Copy link
Owner Author

nroi commented Jun 21, 2020

Hi @harrykantas
Thanks for reporting this issue. I was able to reproduce the problem on a cubieboard (armv7l) with ArchLinux ARM installed. With the most recent version, this issue seems to be fixed: I was able to compile and run flexo on my cubieboard.

Could you try to build flexo on your Raspberry Pi again and report back if it works?

@harrykantas
Copy link

Hey @nroi, thanks for taking the time to look into this so quickly, much appreciated!

I can confirm that with the latest version the build on the rpi completes and runs successfully:

[harry@archpi ~]$ journalctl -u flexo
-- Logs begin at Sun 2020-06-07 20:43:30 UTC, end at Sun 2020-06-21 18:00:37 UTC. --
Jun 21 17:46:10 archpi systemd[1]: Started central pacman cache.
Jun 21 17:46:13 archpi flexo[12716]: [2020-06-21T17:46:13Z INFO  flexo] Primary mirror: https://archlinux.mailtunnel.eu/
Jun 21 17:46:13 archpi flexo[12716]: [2020-06-21T17:46:13Z INFO  flexo::mirror_flexo] Retrieved 0 files with a total size of 0.00 B from local file system.
Jun 21 17:51:49 archpi flexo[12716]: [2020-06-21T17:51:49Z INFO  flexo] Request served: "testing/os/x86_64/testing.db"
Jun 21 17:51:50 archpi flexo[12716]: [2020-06-21T17:51:50Z INFO  flexo] Request served: "core/os/x86_64/core.db"
Jun 21 17:51:50 archpi flexo[12716]: [2020-06-21T17:51:50Z INFO  flexo] Request served: "extra/os/x86_64/extra.db"
Jun 21 17:51:50 archpi flexo[12716]: [2020-06-21T17:51:50Z INFO  flexo] Request served: "community-testing/os/x86_64/community-testing.db"
Jun 21 17:51:50 archpi flexo[12716]: [2020-06-21T17:51:50Z INFO  flexo] Request served: "community/os/x86_64/community.db"

[harry@archpi ~]$ pacman -Qs flexo-git 
local/flexo-git 1.0.4.r0.gda1a3c1-1
    A central pacman cache

@nroi
Copy link
Owner Author

nroi commented Jun 21, 2020

Awesome.
I assume that flexo runs on all ARM architectures that are supported by Rust, so I'm closing this for now. In case anyone else has issues building or running flexo an ARM, please open a new issue.

@nroi nroi closed this as completed Jun 21, 2020
@nroi nroi added the ARM ARM cpu architecture label Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM ARM cpu architecture
Projects
None yet
Development

No branches or pull requests

2 participants