-
Notifications
You must be signed in to change notification settings - Fork 27
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
Linux-arm support #119
Comments
I got a bit of a start on this, but it needs a bit more finessing to work... https://gist.github.com/smoogipoo/fb2c69d8298967e20e9de69b4c8e99a8 |
Nice! Any estimate on when it would be released? Meanwhile, I looked into compiling SDL for Arm in WSL, and might have something. However, I need to test it out in the PI, which I can do tomorrow. |
I don't have an estimate, sorry. It's pretty low on my priority list but I'll take a look into it again this weekend if no one's got it working themselves. |
So what I was able to compile in WSL yesterday works, and boils down to the following steps:
copying I decided to take a crack at the Dockerfile you where working on, and got it to build, but couldn't get the output to run. FROM ubuntu:20.04
RUN apt-get update -y
# RUN echo "deb [arch=arm64] http://ports.ubuntu.com/ focal main multiverse universe" >> /etc/apt/sources.list
# RUN echo "deb [arch=arm64] http://ports.ubuntu.com/ focal-security main multiverse universe" >> /etc/apt/sources.list
# RUN echo "deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main multiverse universe" >> /etc/apt/sources.list
# RUN echo "deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main multiverse universe" >> /etc/apt/sources.list
# RUN dpkg --add-architecture arm64
# RUN apt-get update -y -qq | true
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
# gcc-multilib \
# g++-multilib \
cmake \
ninja-build \
wayland-scanner++ \
wayland-protocols \
pkg-config:amd64 \
libasound2-dev:amd64 \
libdbus-1-dev:amd64 \
libegl1-mesa-dev:amd64 \
libgl1-mesa-dev:amd64 \
libgles2-mesa-dev:amd64 \
libglu1-mesa-dev:amd64 \
libibus-1.0-dev:amd64 \
libpulse-dev:amd64 \
libsdl2-2.0-0:amd64 \
libsndio-dev:amd64 \
libudev-dev:amd64 \
libwayland-dev:amd64 \
libx11-dev:amd64 \
libxcursor-dev:amd64 \
libxext-dev:amd64 \
libxi-dev:amd64 \
libxinerama-dev:amd64 \
libxkbcommon-dev:amd64 \
libxrandr-dev:amd64 \
libxss-dev:amd64 \
libxt-dev:amd64 \
libxv-dev:amd64 \
libxxf86vm-dev:amd64 \
libdrm-dev:amd64 \
libgbm-dev:amd64 \
libpulse-dev:amd64 \
gcc-aarch64-linux-gnu:amd64 \
g++-aarch64-linux-gnu:amd64 \
git
RUN git clone https://github.com/libsdl-org/SDL
WORKDIR /SDL
RUN CFLAGS=-march=armv8-a \
CXXFLAGS=-march=armv8-a \
cmake \
-B build \
-GNinja \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
-DCMAKE_BUILD_TYPE=Release \
-DSDL_SHARED_ENABLED_BY_DEFAULT=ON \
-DSDL_STATIC_ENABLED_BY_DEFAULT=ON \
# Added these two
-DSDL_PULSEAUDIO=OFF \
-DSDL_WAYLAND=OFF
RUN cmake \
--build build/ \
--config Release |
I took a small look at it again, as i thought it might have been been an architecture issue, and it probably was. Seems like what I compiled in WSL is 32-bit and what I compiled with my dockerfile is 64-bit, which would probably cause it to not work. I believe my software is 32-bit. This is the output from And this is from I'm in no way an expert in compiling and using the different tool chains. 😅 But I hope it makes sense. |
I didn't get to this one over the weekend, but looks promising. Didn't consider that your arch would be 32b 😄 Not sure about disabling pulse + wayland - I'd expect capabilities to be the same as the other archs. |
I think the PI is 64 bit, so either should be fine. I can try 64 bit out tomorrow and come back. |
For future reference, I found this earlier which might come in useful: https://github.com/lovell/sharp-libvips/blob/main/linux-armv7/Dockerfile It uses Debian rather than Ubuntu which is something I thought of doing initially. |
I quickly tried to publish my app for linux-arm64 but it didn't start up at all, as in the Net6.0 app didn't even load. Therefore I never got to see if my 64 bit SDL compilation worked either. Sadly, I won't have access to the PI anymore, as it was a setup for someone else. |
I have some changes (https://github.com/Ryujinx/SDL2-CS/commit/275e67ad1142e3038094511f5bb3e698b853d875 and https://github.com/Ryujinx/SDL2-CS/commit/2402c1a0dbc90787cbd4e7e9547290b6b6ebff23) for Ryujinx's SDL2-CS fork to support linux-arm64, would you be fine with me upstreaming it @peppy? |
Should be fine, yes. |
HI
I'm trying to use this for joystick support on a raspberry pi, but I hit a wall as linux-arm isn't supported. Seems like there are no native files included for that.
Would this be possible to add?
-Aron
The text was updated successfully, but these errors were encountered: