-
Notifications
You must be signed in to change notification settings - Fork 4
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
Errors linking a GNU/Linux version #7
Comments
Hello, @vanfanel This is one of the problems in legacy C code with globals in the header files.
Quickfix here: 9fd9253. Cheers! |
@EXL Whoa, that was fast! I understand the issue now... Thanks! |
@EXL Ooops, I think there was a typo on your fix, look:
|
@vanfanel Hmm, I tested this on Ubuntu 22.04 LTS and it worked. Please run make VERBOSE=1 And try to quote the options in CMakeLists.txt:
|
@EXL Ah, I see, it works if I simply run cmake.
This is the relevant part in verbose make:
|
I will be very happy if it works on RPi. BTW, there was an OpenGL ES renderer which can be enabled by the |
@EXL Now it works with the added CFLAGS! And yes, it works on the Pi4, too, both in OpenGL and GLES renderers. Performance is very good, too! EDIT: Forgot to mention I had to disable GLX package searching so it builds on my system (which as I said uses GLVND, not GLX). |
I am also trying to make this run without X11 (no GLX, no X11) using KMS/DRM on GNU/Linux. Gish/gish/src/main/cpp/Gish/main.c Line 242 in 3a8af8a
I think you should let SDL2 create the context, because by doing the manual EGL context creation you are tying the game to the old X11 API. In other words, PC_GLES is not X11 anymore: it's Wayland, direct KMS/DRM... And SDL2 should take care of it as you do in: Gish/gish/src/main/cpp/Gish/main.c Line 246 in 3a8af8a
|
Ok, nice!
There is a lot of ancient code in this project. You can make some PRs to update these things if you have the time and desire for that. I myself want to update the Android build when I have enough time to do so and make it possible for this application to work on modern versions of Android OS without any warnings. Also I want to get rid of some of the bad practices in this code that involve constantly changing the working directory with |
@EXL There's a LOT of Windows-centric code there, and missing Linux stuff. For example, for non-GLX OpenGL to work on Linux, you must retrieve the function address for So, the problem with all this has deep roots. I would remove all Windows specific code, and do everything via SDL2, but I couldn't even test if Windows still works because I don't have a single Windows computer or interest in one. So, you see, I would happily modernize it myself, but I don't know how broken other OSes would be after that. |
@vanfanel I think that the priority here is only Linux and Android platforms. The code for Android will someday also be updated, so there is no problem if something breaks there. I can give you r/w access to this repository so you don't have to bother with PRs and can push commits directly if that's more convenient for you. |
@EXL I have fixed non-GLX OpenGL, but as I said I had to store the After I get that sorted, sure, I will update the code on your repo, you can give me the premissions if you want. |
IDK. I would probably also look for a solution to this problem on the forums or among various code on GitHub if I ran into this.
Access granted. |
@EXL Since SDL2 now manages context, the x11-specific code is redundant. It means removing anything inside a PC_GLES ifdef |
@vanfanel Yes. AFAIR code inside |
@EXL Ah! While we are at it, do you remember if there's some way to control the game aspect ratio? Running it on a modern 16:9 screen totally ruins it by stretching the graphics, since Gish is designed to run on 4:3 Seems like EDIT: To set the size of the menus, etc... the |
@vanfanel If you keep the aspect ratio at 4:3 will there be black bars on the sides? There is also a zoom parameter perhaps with its help this aspect ratio troubles somehow be solved. |
Hi there, @EXL
I have just discovered this Gish SDL2 port you have done, which I believe is the only SDL2 version available of the sources (correct me if I am wrong on this).
I have tried to build a GNU/Linux version (not Android, but plain GNU/Linux) using
gish/src/main/cpp/CMakeLists.txt
, and the game builds, but it fails during the final linking phase:So almost there, but not quite there! Do you have an idea on why is this happening? Seems like some simple omission, but I don't know what it could be. Any ideas?
The text was updated successfully, but these errors were encountered: