Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd 32bit ARM armel & armhf GNU/Linux support #3196
Conversation
The following cross compile packages needs to be installed on the build server: gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf JDK 8 ARM systems will try to load: lib*armgnueabi.so -> 32bit ARM GNU softfp EABI lib*armgnueabihf.so -> 32bit ARM GNU hard float EABI JDK 6/7 ARM systems will try to load: lib*arm.so -> 32bit ARM unknown ABI. We will use the gnueabihf compiler for JDK systems with unknown ABI. Signed-off-by: Xerxes Rånby <xerxes@gudinna.com>
|
How does the library loader know to load these? Also, we'll need to change On Tue, Jun 9, 2015 at 3:45 PM, Xerxes Rånby notifications@github.com
|
|
The library loader was patched about a year ago to support this: Raspberry Pi users have verified that the loader work: |
JDK 8 ARM systems will try to load: lib*armgnueabi.so -> 32bit ARM GNU softfp EABI lib*armgnueabihf.so -> 32bit ARM GNU hard float EABI lib*armandroideabi.so -> 32bit Android EABI JDK 6/7 ARM systems will try to load: lib*arm.so -> 32bit ARM unknown ABI. Signed-off-by: Xerxes Rånby <xerxes@gudinna.com>
|
Added a commit to update |
|
Yeah, AntBuildScriptGenerator and all *Build.java files that generate
|
|
I will refactor jnigen to support 32bit ARM GNU/Linux systems In the long run it would be best to differentiate all native library’s using os is currently encoded in the libPrefix and libSuffix During this initial bring-up I will add support 32bit ARM GNU/Linux systems by extending linux32 systems from using |
nhydock
commented
Jun 11, 2015
|
How is this different from what #2940 is trying to do? |
|
My initial change here make the libgdx build servers provide pre-compiled libgdx .so integrated into the gdx-platform- -natives-desktop.jar for easy use by gradle project users. This also would fix the #3188 enhancement It is neat, that Robbiedobbie #2940 have patched jnigen! this means that I dont have to do it as well ^_^ Both I and Robbiedobbi #2940 aim to support ARM GNU/Linux systems by picking/inventing a namespace to use for native librarys the core difference is that I aim to handle the differences in abi variants as well. Robbiedobbie #2940 only to support unknown abi 32bit arm and unknown abi 64bit arm. I aim to support the 3 versions of 32bit ARM and 1 version of 64bit ARM using the abi names provided by the jvm if available. This would fix the #3188 enhancement that require differentiate natives using the abi. I think the approach to reuse the abi namespace used by the distribution toolchains will be more robust (handled by the jvm instead of manual labor by the libgdx team), it all depends if the new sun.arch.abi system property introduced in jdk 8 will be enforced by the linux distributions. |
|
Thanks @xranby, I've pulled in @Robbiedobbie jnigen PR. Can you pull in changes and solve conflicts for the loader? |
|
I think you should use your loader, and can then use my buildscript generator. One thing that you should adapt is the SharedLibraryFinder. In your commits, you forgot to add support to it for finding arm libraries. I changed it in my commits, but mine doesn't support the multiple ABIs. I do think it is a big improvement supporting different ABIs. I simply did not include it for time reasons. It was much simpler assuming that the program would only be run on a single arm platform on linux. Finding out how to detect the abi was way too much work for me considering the time constraints I had. (I needed it for some small hobby project that I had to do in the very little spare time I have |
5b4eade
to
dbb3a55
Conflicts: extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/JniGenSharedLibraryLoader.java
|
I resolved the conflict in JniGenSharedLibraryLoader by using the loader that supports different ABI's. I have kept Robbiedobbie's implementation of the SharedLibraryFinder interface for now mainly because there is no code using this interface inside the libgdx main source tree. |
|
Regardless of the way it is implemented - I can't personally validate this PR because of my absence from this project. I feel this is something that should definitely be supported. A friend of mine lent me his Raspberry Pi 2 a few days ago so I could tool around with coding on it and I am now awaiting for my own to come. I think that it is a market certainly reachable for indie developers. The more platforms we can easily support, the better. In this case we just need additional native libraries and a modified loader. |
…-libgdx-1.7.1 libgdx#3196
littletinman
commented
Jan 5, 2016
|
Any updates on this? Would absolutely love Raspi support as it's the perfect platform to bring places for people to try my games/apps. Literally being able to plug it into a tv, attach a keyboard, and show my friends my latest project would be golden! If there is anyway I can help with this, please let me know! I have a Rasp a+, b+, and 2 as well as another arm based netbook. |
natdan
commented
Jan 21, 2016
|
+1 it would really help having it in a main stream LibGDX. |
littletinman
commented
Jan 22, 2016
|
This merge request has been open for 227 days... any reason it's not merging in? ARM support is my TOP LibGDX feature hope for 2016! If there was a step by step tutorial for building our own natives, that would be awesome! But I have not found anything beyond general suggestions to date. |
|
@littletinman the reason this is still open is that it's a bad way to solve this issue. jnigen, the thing that creates bindings and build scripts for cross-platform builds, needs to be changed. All this PR does is add additional ant scripts manually, and only to the gdx core native project. |
|
Also needs to be integrated on the Maven side of things. |
|
jnigen have already been patched for ARM by the #2940 pull request All the libgdx Maven pom's do is to download the pre-compiled |
|
#2940 did NOT patch jnigen properly. It ignores ABI as you want it. Also, I've just looked into what it'd take to fix up JNIGen properly, and it's quite an amount of work. I currently do not have the time to spend on this, nor do i have any test devices (save for QEMU) to test this on. I welcome any proper PR that fixes this issue by:
I'll be happy to have this build and deployed to Central from our build server, even with the additional overhead for the ARM libraries. |
entangledloops
commented
Feb 19, 2016
|
I've written 2 jni build files for armgnueabihf: 1 for libgdx and 1 for libgdx-freetype.
Note: |
|
I'm closing this out now. 3rd parties have the option to build, maintain, and publish their own artifacts that include the natives. I'm happy to make modifications to SharedLibraryLoader as necessary, unless it breaks existing user code. I hope I've explained why this PR is insufficient in my previous comments. I'm happy to merge (tested) PRs that accomodate the requirements outlined in my previous comments. |
xranby commentedJun 9, 2015
The following cross compile packages needs to be installed on the build server:
gcc-arm-linux-gnueabi
g++-arm-linux-gnueabi
gcc-arm-linux-gnueabihf
g++-arm-linux-gnueabihf
JDK 8 ARM systems will try to load:
libgdxarmgnueabi.so -> 32bit ARM GNU softfp EABI
libgdxarmgnueabihf.so -> 32bit ARM GNU hard float EABI
JDK 6/7 ARM systems will try to load:
libgdxarm.so -> 32bit ARM unknown ABI.
We will use the gnueabihf compiler for JDK systems with unknown ABI.
Signed-off-by: Xerxes Rånby xerxes@gudinna.com