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 build for linux-arm7 #148

Closed
wants to merge 2 commits into from
Closed

Add build for linux-arm7 #148

wants to merge 2 commits into from

Conversation

almarklein
Copy link
Collaborator

@almarklein almarklein commented Dec 16, 2021

Todo:

  • Test the binary on a Raspberry Pi.
  • We should probably change the name of the build and artefact.

I'm not very familiar with all the different architectures that Rust can build, but from what I understood, armv7 is a good target if one wants to support e.g. Raspberry Pi (versions 2/3/4) . This architecture is 32bit, so a better name would be arm32 or maybe armv7. Thoughts? Also, would this binary run on aarch64 machines (which is armv8, IIUC)?

The CD build on my fork: https://github.com/almarklein/wgpu-native/actions/runs/1589649623

Some links that helped me find the right tweaks:

@almarklein
Copy link
Collaborator Author

Good news and bad news :)

The generated library seems to load fine on a RPi4. Unfortunately it fails with:

thread '<unnamed>' panicked at 'index out of bounds: the len is 1 but the index is 1
[...] wgpu-core/src/hub.rs:118:45`

The referenced wgpu-core code (at the commit matching the used binary):
https://github.com/gfx-rs/wgpu/blob/c3d906856f11821ab75f7318089704c20922359d/wgpu-core/src/hub.rs#L114-L129

For reference, I first updated the Vulkan drivers with sudo apt install mesa-vulkan-drivers to 1.1.97.

@almarklein
Copy link
Collaborator Author

almarklein commented Dec 18, 2021

Might be worth another try with the wgpu-core-bump (i.e. rebasing this branch).

@almarklein
Copy link
Collaborator Author

I rebased, triggered a CD build on my fork, and added the binaries to the v0.11.0.1 release. I'll try again next week.

@almarklein
Copy link
Collaborator Author

I rebased, build the binaries, and added them to the v0.14.2.3 release. I then tested on a raspberry pi 4. Unfortunately:

OSError: cannot load library '/home/pi/dev/py/wgpu-py/wgpu/resources/libwgpu_native-release.so':
/lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found
(required by /home/pi/dev/py/wgpu-py/wgpu/resources/libwgpu_native-release.so).

Also:

pi@pi:~ $ ldd --version
ldd (Debian GLIBC 2.28-10+rpt2+rpi1+deb10u1) 2.28

So it looks like the glibc version that the binaries are build against are too new. Does anyone know how to make the compile build against an earlier version of glibc? Would selecting an older Ubuntu host machine work?

@almarklein
Copy link
Collaborator Author

Closing, since we have support for 64bit ARM Linux via #326, and the way this PR is stuck seems hard to fix.

@almarklein almarklein closed this Dec 4, 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

2 participants