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

[1.0] Build fixes for modern toolchains + new official 1.0-stable binaries #101105

Open
wants to merge 5 commits into
base: 1.0
Choose a base branch
from

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Jan 3, 2025

After #101040, I had to give a go at making a new set of official builds for 1.0-stable, which is the only release we don't have builds for yet.

So here we go, a set of fixes that make it possible to build 1.0-stable (+ fixes), i.e. the new 1.0 branch, with modern GCC and Clang, including mingw-gcc for Windows and osxcross for macOS.

I didn't bother with Android, iOS, and JavaScript (or the other unmaintained legacy platforms that 1.0 still had old code for), as those are more complex and way outdated, and wouldn't run (a priori) on modern devices.

Like #101040, this work is just for archival reason, game preservation, and just poking a bit of fun at Godot's history, making it possible for current users to experience the thrill of the 1.0 release... and maybe see how much work happened in the past 10 years :)

The 1.0 branch is still unmaintained, and aside from potential build fixes, there's no plan to reopen its development, fix bugs, and make any sort of new official patch release.

For reviewers, I've intentionally tried to match the pre-existing code style and not to clean the mess of trailing whitespace and mixed indentation in the buildsystem files. Style fixes in 1.0 is out of scope of this effort ;)


Alongside those source code changes, I've made a 1.0 branch to godot-build-scripts too, to be able to make reproducible official builds: https://github.com/godotengine/godot-build-scripts/tree/1.0

Thanks to it, I've been able to make official builds for the following platforms:

  • Linux: Editor and export templates (x86_64, x86_32)
  • Windows: Editor and export templates (x86_64, x86_32)
  • macOS: Editor and export templates (x86_64)
  • Linux Server: Headless editor (x86_64)

The builds are available here: https://github.com/godotengine/godot-builds/releases/1.0-stable

I might update them as issues are found and fixed in this PR or godot-build-scripts, and then I'll also upload them to the 1.0-stable tag on godotengine/godot.

The original 1.0-stable export templates likely also had Android and iOS, and maybe JavaScript (Web, asm.js). Those could likely be made to build with old versions of the NDK, Xcode, Emscripten, etc., but I doubt they'd run on any modern device. I'll leave that to motivated contributors if someone wants to push the archival work this far.


Screenshot:

image

This is from https://github.com/KOBUGE-Games/jetpaca checked out at one of its earlier commits (be223231e02a59a65dc90dde1bd8f52040589c60) which is somewhat compatible with 1.0-stable.


BTW, I'm not the first to do this, @Calinou did something similar in https://github.com/Calinou/godot-vintage-builds

The main difference here is that these binaries are compiled on a modern distro (Fedora 41) with recent compilers, and include macOS x86_64 builds too, and export templates for Windows, macOS and Linux.

The Windows and macOS binaries are also signed (and notarized for macOS) like official 3.x and 4.x releases.

Godot 1.0 was developed at a time where compilers defaulted to C++98.

Also disable `-Wall` on debug builds, there are now hundreds of warnings
from newer compilers that would need to be fixed.

This would best be done by adding a new `warnings` SCons option, which would
also affect non-debug builds, but I have no intention to fix warnings in the
1.0 branch, the goal here is just to get it to compile for archival and game
preservation.
Fix support for cross-compilation, and fix handling of builtin libraries,
which would still attempt to link system libs and use system headers.

Also patch out GLU includes from GLEW, we don't need it, so that removes
another mandatory dependency.
Also add `core/method_bind_ext.inc` to `.gitignore`.
@akien-mga akien-mga changed the title [1.0] Build fixes for modern toolchains [1.0] Build fixes for modern toolchains + new official 1.0-stable binaries Jan 3, 2025
@akien-mga akien-mga changed the title [1.0] Build fixes for modern toolchains + new official 1.0-stable binaries [1.0] Build fixes for modern toolchains + new official 1.0-stable binaries Jan 3, 2025
@akien-mga
Copy link
Member Author

BTW I've tested this on the following toolchains:

  • Linux/Server builds: Fedora 41 host, PyPy (Python 2.7) with SCons 3.1.2, Godot Linux SDKs with GCC 13.2.0 built against glibc 2.28, binutils 2.40.
  • Windows: Fedora 41 host, PyPy (Python 2.7) with SCons 3.1.2, MinGW 12.0.0, GCC 14.2.1, binutils 2.42.
  • macOS: Fedora 41 host, PyPy (Python 2.7) with SCons 3.1.2, osxcross with Apple Clang (LLVM 17.0.6) and MacOSX SDK 15.2 from Xcode 16.2.

I fully expect that other compiler combinations may not work out of the box, notably various versions of Visual Studio, or actual Xcode on macOS.

@Calinou
Copy link
Member

Calinou commented Jan 4, 2025

Note that unlike 2.1, you need Python 2 to compile 1.0 due to the mixed indentation in buildsystem files (as Python 3 doesn't allow it).

@bruvzg
Copy link
Member

bruvzg commented Jan 5, 2025

Checked on macOS, 64-bit version is building and running (with a bunch of errors in the console and with usual unbundled apps activation bugs). But barely usable, do to lack of UI scaling everything is tiny.

@akien-mga
Copy link
Member Author

Checked on macOS, 64-bit version is building and running (with a bunch of errors in the console and with usual unbundled apps activation bugs).

Does my prebuilt .app work properly with regard to those activation bugs?

But barely usable, do to lack of UI scaling everything is tiny.

I guess macOS users who want to try 1.0 with an authentic experience will have to set their Retina monitor to 1024x768 :P

@bruvzg
Copy link
Member

bruvzg commented Jan 5, 2025

Does my prebuilt .app work properly with regard to those activation bugs?

Yes, pre-build .app seems to be activating properly, but consistently crashing on exit (local build do not).

@akien-mga
Copy link
Member Author

Does my prebuilt .app work properly with regard to those activation bugs?

Yes, pre-build .app seems to be activating properly, but consistently crashing on exit (local build do not).

Yeah I remember us fighting such issues in the past. I don't intend to do actual code changes to the 1.0 branch so it doesn't diverge too much from what the 1.0-stable tag was, so I guess we can consider it "good enough" for sampling Godot's history on macOS.

Unless we can pinpoint that crash to osxcross specifically and we could work it around without changing the engine.

@bruvzg
Copy link
Member

bruvzg commented Jan 6, 2025

Unless we can pinpoint that crash to osxcross specifically and we could work it around without changing the engine.

Seems to be something audio thread related:

Thread 11 Crashed:
0   Godot                         	       0x1015b10d2 AudioServerSW::_thread_func(void*) + 50
1   Godot                         	       0x100ad90e0 ThreadPosix::thread_callback(void*) + 16
2   libsystem_pthread.dylib       	    0x7ff818cc0253 _pthread_start + 99
3   libsystem_pthread.dylib       	    0x7ff818cbbbef thread_start + 15

@akien-mga
Copy link
Member Author

akien-mga commented Jan 6, 2025

I think this PR mostly needs to be tested with different versions of Visual Studio (2013 was likely used at the time, whoops) to make sure it's not making things worse, notably making sure my hacky is_msvc logic works. Then it should be mergeable.

If we can find a way to make it build with recent and supported VS versions, that's also nice of course, but it could also be done later - if someone cares :P

@akien-mga
Copy link
Member Author

akien-mga commented Jan 6, 2025

I uploaded new binaries to https://github.com/godotengine/godot-builds/releases/tag/1.0-stable to fix a couple issues:

  • Windows 64-bit export templates were being overwritten by 32-bit ones, now fixed
  • Strip debug symbols
  • Fixed the naming convention from 1.0-stable to 1.0_stable, we changed to - in 3.0 only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants