lwjgl3 icon indicating copy to clipboard operation
lwjgl3 copied to clipboard

MIPS64 Support

Open FlyGoat opened this issue 5 years ago • 10 comments

I'm interested in make LWJGL3 work on MIPS64 platform, just for Minecraft :-) But I have no clues on how to bootstrap LWJGL on a new platform, I'm too stupid to make a successful offline build.

Referencing #495, I did some modifications to let build system identify MIPS64 architecture, also tried to trigger Travis CI build for libraries used by LWJGL. There are serval problems:

  • Ubuntu doesn't provide MIPS64 architecture distro (I'm currently forcing it to use Debian Stretch Repo)
  • Ubuntu doesn't have MIPS64 gcc-4.8/4.9 cross toolchains (I'm currently using gcc-5 cross toolchain provided by Ubuntu)

And I just made a list of binaries that I should be working on:

Am I doing that in the right way? Did I miss anything? Please give me some hints, thanks in advance.

FlyGoat avatar Jan 19 '20 15:01 FlyGoat

I have triggered success travis builds (They all failed at upload to s3) for all the libraries possible listed below. Links of my travis repo are either here. I'm dummy to the Java and ANT stuff, please teach me what should I do next, thanks a lot.

FlyGoat avatar Jan 20 '20 07:01 FlyGoat

Hey @FlyGoat,

I have reviewed everything above, great work. Please go ahead and open a PR in all LWJGL-CI repositories. The changes will be merged manually (need to have a single commit on top of upstream, for simpler maintenance), but the PRs will serve as credit to the effort you made.

After the binaries are available for download, you can then test the lwjgl3 changes and we can discuss what else needs to be done there.

Ubuntu doesn't have MIPS64 gcc-4.8/4.9 cross toolchains (I'm currently using gcc-5 cross toolchain provided by Ubuntu)

That's OK. LWJGL has been stuck to GCC 4.8 and I would really like to move to a newer version. I will open a separate issue to discuss the implications another time.

They all failed at upload to s3

That's because the AWS credentials can only be decrypted when building from the LWJGL-CI repositories.

tinycc (Upstream No MIPS Support)

I'm afraid this might be a showstopper in a future LWJGL version. The plan is to use tinycc as a poor man's JIT compiler for JNI bindings.

Spasi avatar Jan 20 '20 16:01 Spasi

Thanks for your kindly instructions. There are some rebase works for me todo and I will send pull requests tomorrow.

For the tinycc issue, is it possible to integrate a strip down version of clang instead of tinycc for architectures it doesn't support? Although it might be larger.

FlyGoat avatar Jan 20 '20 17:01 FlyGoat

For the tinycc issue, is it possible to integrate a strip down version of clang instead of tinycc for architectures it doesn't support? Although it might be larger.

Size is indeed the main issue for LWJGL. It needs to be small enough to be embedded to the core lwjgl shared library and support all relevant architectures/ABIs. Feature-wise we don't need much, it will be used for simple downcalls/upcalls only. I'm still looking for alternatives and I'm open to suggestions.

Spasi avatar Jan 20 '20 18:01 Spasi

Btw: It seems like MacOSX doesn't supported by tinycc too? On these unpopular platforms, probably we can fallback to system CC. Just give them a chance to play "portable games". Thanks.

FlyGoat avatar Jan 21 '20 01:01 FlyGoat

I have set up PRs for all Ci jobs.

FlyGoat avatar Jan 21 '20 07:01 FlyGoat

I have managed to upload CI builds to my own S3 bucket and build lwjgl3 itself on MIPS64 platform. But I met some issues.

  • Libraries for Bullet didn't generate by CI. Some Bullet static library will be built in BulletSharpPInvoke but never get uploaded to S3. So I disabled Bullet in my local build.
  • jemalloc test failure (Fixed by this commit)

Now I have managed to run Minecraft on my MIPS64 laptop, it just works~ I'm looking forward to getting it merged by the upstream. Thanks.

FlyGoat avatar Jan 22 '20 16:01 FlyGoat

Hey @FlyGoat,

Is it OK if I bump all scripts from debian stretch to debian buster? I can't get GLFW+Wayland to build on mips64 if I don't use Buster. Afaict Buster is the current stable release, but not sure if there will be many users still on Stretch.

Spasi avatar Sep 11 '20 15:09 Spasi

Hey @FlyGoat,

Is it OK if I bump all scripts from debian stretch to debian buster? I can't get GLFW+Wayland to build on mips64 if I don't use Buster. Afaict Buster is the current stable release, but not sure if there will be many users still on Stretch.

I think it should be fine.

FlyGoat avatar Sep 12 '20 05:09 FlyGoat

Hey @FlyGoat,

All LWJGL-CI projects have migrated from Travis-CI/AppVeyor to Github Actions and two new architectures have been added (macOS ARM64 & Windows ARM64). The MIPS64 builds are also in there, but I had to comment-out a lot of them. I kept hitting various issues and didn't have time to fix them. Would you be so kind to investigate and submit fixes?

Thanks!

Spasi avatar Mar 07 '21 20:03 Spasi