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

Add arm64 support #7

Open
NilsIrl opened this issue Mar 6, 2024 · 6 comments
Open

Add arm64 support #7

NilsIrl opened this issue Mar 6, 2024 · 6 comments

Comments

@NilsIrl
Copy link
Owner

NilsIrl commented Mar 6, 2024

Ideally it standardizes the way we compile the tools we need instead of just shipping binaries...

@tokenwizard
Copy link

Yes, the binaries generated by this tool do not execute on ARM64 devices such as Raspberry Pi. And the dockerc Release Binary also does not execute on ARM64 devices.

I suppose we would need to build from source for ARM64.

@kero990
Copy link

kero990 commented May 24, 2024

I tried to compile the project on arm64, but no matter how I run zig build, such as zig build -Doptimize=ReleaseSafe -Dtarget=aarch64-linux-glibc or zig build -Doptimize=ReleaseSafe -Dtarget=aarch64-linux-musl, or just zig build -Doptimize=ReleaseSafe or zig build, the program stubbornly returns an error: "FileNotFound". I'm not sure what file is missing. I'm not familiar with Zig, but I'm sure I'm compiling in the root directory where the build.zig file exists.

Also, I saw the build.md file, which mentions using ./configure and make, but I can't seem to find ./configure anywhere.

@NilsIrl
Copy link
Owner Author

NilsIrl commented May 24, 2024

error: "FileNotFound"

Have you cloned submodules?

Also, I saw the build.md file, which mentions using ./configure and make, but I can't seem to find ./configure anywhere.

BUILD.md just contains random notes for myself. Those commands (./configure and make) are about how to build some of the dependencies. Not dockerc itself.

Lastly you'll need to replace some of the binaries that are just hardcoded at the moment inside of src/tools.

You can look at the commits in which I did that for umoci and skopeo for how to replace the 3 remaining binaries.

Ideally crun would be replaced by the libcrun library instead of having it as an embedded binary but I'm happy to merge anything that's not strictly worse than the current setup.

@kero990
Copy link

kero990 commented May 27, 2024

Have you cloned submodules?

In fact, I'm not sure if the clone is complete because some sub-repositories have insufficient LFS quotas. Using the clone command directly will result in errors like this:

  git clone --recursive --depth 1 https://github.com/NilsIrl/dockerc
Cloning into 'dockerc'...
Downloading src/tools/crun (2.8 MB)
Error downloading object: src/tools/crun (5d3d6f0): Smudge error: Error downloading src/tools/crun (5d3d6f02214a8782e2db84b5ef149509c496d182e619be15fb7d0f07fae476f9): batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.

Errors logged to '/home/dockerc/.git/lfs/logs/20240527T011437.784274692.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: src/tools/crun: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

@NilsIrl
Copy link
Owner Author

NilsIrl commented May 27, 2024

sub-repositories have insufficient LFS quotas

Could you perhaps fork the repo and try to clone from your own user (https://github.com/kero999/dockerc). You will hopefully be under a different quota than mine.

If not it's fine. The files that are on LFS are specifically the ones that need to be replaced for arm64 so you can work on that directly.

@NilsIrl
Copy link
Owner Author

NilsIrl commented Jun 8, 2024

I just removed the dependency on crun.

The runtime still depends on the squashfuse and fuse-overlayfs but hopefully arm64 support should be quite trivial after that.

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

No branches or pull requests

3 participants