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

Build Mindustry from source #39

Merged
merged 8 commits into from
Feb 15, 2022
Merged

Build Mindustry from source #39

merged 8 commits into from
Feb 15, 2022

Conversation

TobTobXX
Copy link
Contributor

@TobTobXX TobTobXX commented Feb 15, 2022

An effort to try to build mindustry from source.

There are still some rough edges (eg. some dependencies have to be manually specified in the generator, support for x-checker-data, ...) and this is why it's a WIP PR.

TODOs:

  • remove most of the manually specified deps
  • remove custom build badge
  • generator documentation
  • x-checker-data

@flathubbot

This comment was marked as outdated.

@TheEvilSkeleton
Copy link
Collaborator

> Task :tools:pack FAILED
Exception in thread "main" arc.util.ArcRuntimeException: Couldn't load shared library 'libarcarm64.so' for target: Linux, 64-bit
	at arc.util.SharedLibraryLoader.load(SharedLibraryLoader.java:84)
	at arc.util.ArcNativesLoader.load(ArcNativesLoader.java:14)
	at mindustry.tools.ImagePacker.main(ImagePacker.java:28)
Caused by: arc.util.ArcRuntimeException: Unable to read file for extraction: libarcarm64.so
	at arc.util.SharedLibraryLoader.readFile(SharedLibraryLoader.java:93)
	at arc.util.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:253)
	at arc.util.SharedLibraryLoader.load(SharedLibraryLoader.java:81)
	... 2 more
FAILURE: Build failed with an exception.
* Where:
Build file '/run/build/mindustry/tools/build.gradle' line: 209
* What went wrong:
Execution failed for task ':tools:pack'.
> Process 'command '/usr/lib/sdk/openjdk17/jvm/openjdk-17.0.1/bin/java'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2m 2s
16 actionable tasks: 16 executed
FB: host_command_exited_cb 1442740 256
�]2;flatpak-builder: Cleanup mindustry�Error: module mindustry: Child process exited with code 1
FB: Unmounting read-only fs: fusermount -uz /srv/buildbot/worker/build-aarch64-2/build/.flatpak-builder/rofiles/rofiles-ub9qD1
dbus-daemon[1442582]: Reloaded configuration

Looks like arm64 failed.

@TobTobXX
Copy link
Contributor Author

Yeah, dunno why it hangs instead of aborts...

Did the jar even work on arm?

Also, how do you start a build job?

@flathubbot

This comment was marked as outdated.

@flathubbot

This comment was marked as outdated.

@TheEvilSkeleton
Copy link
Collaborator

Also, how do you start a build job?

You type in bot, build in the comments.

@TobTobXX
Copy link
Contributor Author

Mindustry doesn't have any native libraries (SDL, OpenAL) compiled for ARM, which is what you see when looking further down the stack trace.

ARM is not supported.

Anuken/Mindustry#2167 (comment)

I think arm should be dropped, the jar wouldn't have worked either, probably.

@TheEvilSkeleton
Copy link
Collaborator

I think it'd be best to drop arm64.

@TobTobXX
Copy link
Contributor Author

bot, build

@flathubbot

This comment was marked as outdated.

@flathubbot

This comment was marked as outdated.

@flathubbot

This comment was marked as outdated.

@flathubbot

This comment was marked as outdated.

@TheEvilSkeleton
Copy link
Collaborator

TheEvilSkeleton commented Feb 15, 2022

It works!

I'm not sure, but is the following image here to stay or is it possible to make it say the usual "pre-alpha build 135"?

image

@TobTobXX
Copy link
Contributor Author

Yeah, I just realized too, joining a server is practically impossible with a from-source built client...

I'll see if there's a way to sign it or something...

But I just read up on x-data-checker. It is not needed anymore since it doesn't depend on external data, right?

@TheEvilSkeleton
Copy link
Collaborator

TheEvilSkeleton commented Feb 15, 2022

But I just read up on x-data-checker. It is not needed anymore since it doesn't depend on external data, right?

For it to automatically bump Mindustry versions, it's needed.

@TobTobXX
Copy link
Contributor Author

bot, build

@flathubbot

This comment was marked as outdated.

@flathubbot

This comment was marked as outdated.

@flathubbot

This comment was marked as outdated.

@TobTobXX
Copy link
Contributor Author

Screenshot from 2022-02-15 19-17-49

That seems to be fixed. Only x-checker-data remaining.

@flathubbot

This comment was marked as outdated.

@TobTobXX TobTobXX marked this pull request as ready for review February 15, 2022 18:53
@TobTobXX TobTobXX changed the title [WIP] Build Mindustry from source Build Mindustry from source Feb 15, 2022
@flathubbot

This comment was marked as outdated.

@flathubbot

This comment was marked as outdated.

@TobTobXX
Copy link
Contributor Author

Oh, and btw, building stable is a PITA, because it requires several backporting patches to get a compatible JDK + gradle version. So it'd probably be best if the building manifest keeps in beta until next stable (probably 7.0).

@flathubbot

This comment was marked as outdated.

@flathubbot
Copy link
Contributor

Started test build 78609

@flathubbot
Copy link
Contributor

Build 78609 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/76488/com.github.Anuken.Mindustry.flatpakref

@TheEvilSkeleton
Copy link
Collaborator

TheEvilSkeleton commented Feb 15, 2022

It works really well. Thanks a lot for doing this, and thank you so much for documenting the process!

@TheEvilSkeleton TheEvilSkeleton merged commit 45c81ac into flathub:beta Feb 15, 2022
@TobTobXX
Copy link
Contributor Author

np, it was fun! thank you for being responsive + open 😁

@TobTobXX TobTobXX deleted the testing branch February 15, 2022 19:15
TheEvilSkeleton added a commit that referenced this pull request Jul 24, 2022
TheEvilSkeleton added a commit that referenced this pull request Aug 8, 2022
* Remove GitHub Action

* Revert "Build Mindustry from source (#39)"

This reverts commit 45c81ac.

* Update runtime

* Update Mindustry.jar to 136.1

* Update Mindustry.jar to 137
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.

3 participants