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

Base package requirements not clear in running the application instructions. #19

Closed
SissiHermanni opened this issue Dec 19, 2022 · 18 comments
Assignees

Comments

@SissiHermanni
Copy link

  • Install dependencies: sudo apt install libglew2.2 libglfw3 libopenal1 libopenmpt0
    • Alternatively, install provided .deb or .rpm package and dependencies should be installed automatically.

I think it's worth adding that installing the game on an Ubuntu-based operating system requires Ubuntu Jammy as base package, because Bionic and Focal doesn't have and can't have libglew2.2.

Bionic has version 2.0 (supported until 2023) and Focal has version 2.1 (supported until 2025).
If you try install game with .deb in Focal or Bionic it will warn you that the dependencies cannot be met and refuses to install.
This also applies to the portable Linux version.

If you can compile .deb file in Ubuntu Bionic as base package you also have forward compatibility for Focal and Jammy.

@deathkiller deathkiller self-assigned this Dec 19, 2022
@deathkiller
Copy link
Owner

ubuntu-18.04 GitHub Runner is deprecated and I would like to keep using ubuntu-latest. So should I replace libglew2.2 with libglew2.0? I'm not really familiar with this, so I'll take suggestions.

@myself600
Copy link

It is necessary to use older dependencies (thus building on older distros) when supporting older GNU/Linux systems via native packages. Launchpad builds them for each distro separately, making it possible to use the latest dependencies provided by the OS. There are other ways tho, if you want to bundle dependencies, most notably Appimages and other distribution formats including Snaps or Flatpaks that includes dependencies bundled at the cost of binary size. Another way is static compilation (e.g. https://johnvansickle.com/ffmpeg/) or shipping the libraries alongside binaries (like on Windows), also universal installers come to mind (those with the .run extension - Virtualbox, Nvidia drivers).

Packages should usually be built for OS releases that are still maintained upstream (in this case, those colored yellow and green here: https://en.wikipedia.org/wiki/Ubuntu#Releases). Practicality is more important, except when features and security updates are involved. So I would say, target the oldest (yellow colored) Ubuntu (18.04 is quickly reaching EOL so you might want to skip that as you said) and its dependencies if you want to universally support multiple releases at once or try to bundle them statically.

@deathkiller
Copy link
Owner

I changed GLEW to 2.1 and it seems I can't run it on Ubuntu 22 anymore, because there is no GLEW 2.1, only GLEW 2.2. So any suggestions before I roll it back? Is static linking of GLEW the only way?

Also Flatpak and Appimage as another option could be great, but I don't know how to build them.

@myself600
Copy link

I changed GLEW to 2.1 and it seems I can't run it on Ubuntu 22 anymore, because there is no GLEW 2.1, only GLEW 2.2. So any suggestions before I roll it back? Is static linking of GLEW the only way?

Probably. Makes sense as compiled binaries tend to require specific versions of libraries. Maybe include a separate static workflow? You can also strip the binary and compress it using UPX.

@deathkiller
Copy link
Owner

OK, I changed Linux build to use static GLEW, so it should work correctly now. I wonder if binary is already stripped or not. Windows version is stripped. I would like to avoid UPX, binaries are not that big.

@SissiHermanni
Copy link
Author

SissiHermanni commented Dec 20, 2022

I tested commit 3cd8dc3 and it's .deb file in Focal. Now it allows to install it with success, but there is still problem to run program itself.

./jazz2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./jazz2)
./jazz2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./jazz2)
./jazz2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./jazz2)

Focal's libc6 is listed as 2.31.
Bionic's libc6 is listed as 2.27 (If you are interested to support almost EOL package base.)

@deathkiller
Copy link
Owner

So I have to build it directly on corresponding OS version, right? Is there any other way?

ubuntu-18.04 runner is already deprecated, so it can be removed anytime and it will probably be very soon. I can add workflow with ubuntu-20.04 if you need it though.

@myself600
Copy link

myself600 commented Dec 20, 2022

So I have to build it directly on corresponding OS version, right? Is there any other way?

Pretty much what I said. libc6 is usually the wall at which point I give up satisfying dependencies. This is why you have to use older OS releases because dependencies go deep to core system level (e.g. Virtualbox use EL6 to build .run packages which is 12 years old atm, but still being supported via Extended Life Phase till 2024).

Regarding stripping ELF binaries, I was using https://web.archive.org/web/20190921150039/https://tep.shoutwiki.com/wiki/Building to do that (this is how executables are stripped when buliding .deb packages from source), but you can use other methods like the install -s or something. Actually, the file command tells you whether the binary is stripped or not.

@SissiHermanni
Copy link
Author

ubuntu-18.04 runner is already deprecated, so it can be removed anytime and it will probably be very soon. I can add workflow with ubuntu-20.04 if you need it though.

Focal is supported until 2025, and many people (me included) likes to use more matured version of their distro.
This means there are many users who use Ubuntu 20.04, Linux Mint 20.3, Pop!_OS 20.04 and many other distros that use Focal as their package base until the newer ones are matured enough for them. I even remember there was article about it some years ago.

@deathkiller
Copy link
Owner

deathkiller commented Dec 20, 2022

I added https://github.com/deathkiller/jazz2-native/actions/workflows/linux_legacy.yml with ubuntu-20.04. Also, I disabled GLEW for Linux builds, because it seems it's not needed there. Everything should be fine now.

@SissiHermanni
Copy link
Author

SissiHermanni commented Dec 20, 2022

Now .deb file installed game and it even started! Good work!

I found bug though. For some reason there is problem with controls. In menu up arrow and left arrow doesn't work. If you can get to game, your choice of character will run constantly to the left.

@deathkiller
Copy link
Owner

Send me log from terminal and also try both SDL and GLFW versions.

@SissiHermanni
Copy link
Author

SDL version worked fine. No problem there it seems.
GLFW version not so much.

log.txt

@deathkiller
Copy link
Owner

It seems there is nothing wrong in the log. I can try it myself, but it's probably some bug in GLFW library (and also it could be already fixed in newer versions). Just use the SDL version if it works for you.

@maze88
Copy link

maze88 commented Apr 13, 2023

I'm experiencing the same issue (on Debian 11).
I read the comments but didn't quite understand how to solve it...

Running $ jazz2 returns:

jazz2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by jazz2)
jazz2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by jazz2)
jazz2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by jazz2)

@deathkiller
Copy link
Owner

It seems the binary is not compatible with your system. You can try to download build for older Linux versions - https://github.com/deathkiller/jazz2-native/actions/workflows/linux_legacy.yml [in GitHub Actions > Linux (Legacy)] - or build the game yourself. Distributed binaries are precompiled on the latest ubuntu and because it's Linux, there are compatibility issues when you try to run it on different/older OS versions.

@maze88
Copy link

maze88 commented Apr 19, 2023

Thanks Dan, that did the trick! (:

@deathkiller
Copy link
Owner

That's great. You're welcome!

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

No branches or pull requests

4 participants