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

MIPS64 Support #526

Open
10 of 12 tasks
FlyGoat opened this issue Jan 19, 2020 · 10 comments
Open
10 of 12 tasks

MIPS64 Support #526

FlyGoat opened this issue Jan 19, 2020 · 10 comments

Comments

@FlyGoat
Copy link

FlyGoat commented Jan 19, 2020

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
Copy link
Author

FlyGoat commented Jan 20, 2020

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.

@Spasi
Copy link
Member

Spasi commented Jan 20, 2020

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.

@FlyGoat
Copy link
Author

FlyGoat commented Jan 20, 2020

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.

@Spasi
Copy link
Member

Spasi commented Jan 20, 2020

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.

@FlyGoat
Copy link
Author

FlyGoat commented Jan 21, 2020

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
Copy link
Author

FlyGoat commented Jan 21, 2020

I have set up PRs for all Ci jobs.

@FlyGoat
Copy link
Author

FlyGoat commented Jan 22, 2020

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.

@Spasi
Copy link
Member

Spasi commented Sep 11, 2020

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.

@FlyGoat
Copy link
Author

FlyGoat commented Sep 12, 2020

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.

@Spasi
Copy link
Member

Spasi commented Mar 7, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Build Targets
Development

No branches or pull requests

2 participants