JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2k stars 607 forks source link

Could not load renderer. "No such file or directory" when it's RIGHT THERE #1235

Closed DarthZiplock closed 1 month ago

DarthZiplock commented 1 month ago

From the crash log file:

2024-07-14 23:08:38 Sys_LoadDll(/home/rhodey/Games/JediAcademy/rdsp-vanilla_x86_64.so) failed: "Failed loading /home/rhodey/Games/JediAcademy/rdsp-vanilla_x86_64.so: libjpeg.so.8: cannot open shared object file: No such file or directory" Failed to load renderer

The file it's referencing is sitting exactly where the path says it isn't. Why can't it see it? Folder permissions are set to full access.

Happens with openjo, and both sp and mp openjk.

Few google searches indicate others have had this issue with no posted solutions.

Any ideas?

ensiform commented 1 month ago

You most likely don't have lib jpeg 8 installed exactly as the error says the linker is looking for. Probably jpeg9

DarthZiplock commented 1 month ago

You most likely don't have lib jpeg 8 installed exactly as the error says the linker is looking for. Probably jpeg9

My package manager says libjpeg is already installed, and I have a whole bunch of libjpeg.so files on my system according to search. Copying one to the game directory doesn't change the error.

Trying to specifically install libjpeg8 or 9 returns "no package found."

ensiform commented 1 month ago

Well without knowing more about the system you have or what version it is, can't really help further

DarthZiplock commented 1 month ago

Well without knowing more about the system you have or what version it is, can't really help further

My bad. I'm running Fedora 40 KDE, RX580 GPU, dual Xeon X5677 CPUs, 24GB RAM, kernel 6.9.7.

ensiform commented 1 month ago

Well without knowing more about the system you have or what version it is, can't really help further

My bad. I'm running Fedora 40 KDE, RX580 GPU, dual Xeon X5677 CPUs, 24GB RAM, kernel 6.9.7.

You said the file listed is right there but are you talking about the rd vanilla file or the libjpeg.so.8 that the error message says is missing. If fedora does not have 8 or 9 versions available it's because you have libjpeg turbo and lack the .8 link in your installed libs. Pre built openjk is on GitHub actions which uses Ubuntu, you may have different packages.

DarthZiplock commented 1 month ago

Where's the libjpeg.so.8 file supposed to be? Am I reading the error log wrong? The rd vanilla file exists in /home/rhodey/Games/JediAcademy/

It doesn't give a path for the libjpeg file though, and the only thing I've been able to find online says that it should be at /usr/lib/x86_64-linux-gnu/

So I created a symlink there to one of the existing libjpeg.so.8 files on my system but that didn't help.

DarthZiplock commented 1 month ago

SOLVED. Managed to find an obscure reddit post with the solution! Here's what I did to install libjpeg8 on Fedora 40, in case anyone else comes across this:

sudo dnf copr enable aflyhorse/libjpeg
sudo dnf copr add aflyhorse/libjpeg

Now the games work.

Appreciate you pointing me in the right direction.

ensiform commented 1 month ago

Out of curiosity where did you try to put the libjpeg.so.8 link? It should have resided in that folder where libs are installed on your system pointing to whatever libjpeg so file you did have. Building openjk from source would probably also probably been a solution for linking to the right libjpeg. The reason the error doesn't give a path to libjpeg because dlopen is searching in it's known path on your system internally which is typically somewhere in /usr/lib as you previously mentioned.

DarthZiplock commented 1 month ago

Out of curiosity where did you try to put the libjpeg.so.8 link? It should have resided in that folder where libs are installed on your system pointing to whatever libjpeg so file you did have. Building openjk from source would probably also probably been a solution for linking to the right libjpeg. The reason the error doesn't give a path to libjpeg because dlopen is searching in it's known path on your system internally which is typically somewhere in /usr/lib as you previously mentioned.

The search results I was finding kept saying it should be in /usr/lib/x86_64-linux-gnu/ so that's where I made the symlink.

However, after installing the actual libjpeg package the files ended up in /usr/lib64.

I'm still sorta new to this Linux stuff. I'm just happy it works now cuz compiling apps from source is still way over my head. Can't ever get it to work.

ensiform commented 1 month ago

Out of curiosity where did you try to put the libjpeg.so.8 link? It should have resided in that folder where libs are installed on your system pointing to whatever libjpeg so file you did have. Building openjk from source would probably also probably been a solution for linking to the right libjpeg. The reason the error doesn't give a path to libjpeg because dlopen is searching in it's known path on your system internally which is typically somewhere in /usr/lib as you previously mentioned.

The search results I was finding kept saying it should be in /usr/lib/x86_64-linux-gnu/ so that's where I made the symlink.

However, after installing the actual libjpeg package the files ended up in /usr/lib64.

I'm still sorta new to this Linux stuff. I'm just happy it works now cuz compiling apps from source is still way over my head. Can't ever get it to work.

Well, not sure where you found information searching for /usr/lib/x86_64-linux-gnu as this is a Debian/Ubuntu path. You'll want to familiarize yourself with your distro location for installed system libraries all the extra steps you went through could have been avoided, installing jpeg8 may have fixed the issue but it's not really recommended as libjpeg-turbo is superior. A Link in /use/lib64 would be the best approach, however since you installed a custom jpeg8, it is whatever, your system.

DarthZiplock commented 1 month ago

Out of curiosity where did you try to put the libjpeg.so.8 link? It should have resided in that folder where libs are installed on your system pointing to whatever libjpeg so file you did have. Building openjk from source would probably also probably been a solution for linking to the right libjpeg. The reason the error doesn't give a path to libjpeg because dlopen is searching in it's known path on your system internally which is typically somewhere in /usr/lib as you previously mentioned.

The search results I was finding kept saying it should be in /usr/lib/x86_64-linux-gnu/ so that's where I made the symlink. However, after installing the actual libjpeg package the files ended up in /usr/lib64. I'm still sorta new to this Linux stuff. I'm just happy it works now cuz compiling apps from source is still way over my head. Can't ever get it to work.

Well, not sure where you found information searching for /usr/lib/x86_64-linux-gnu as this is a Debian/Ubuntu path. You'll want to familiarize yourself with your distro location for installed system libraries all the extra steps you went through could have been avoided, installing jpeg8 may have fixed the issue but it's not really recommended as libjpeg-turbo is superior. A Link in /use/lib64 would be the best approach, however since you installed a custom jpeg8, it is whatever, your system.

I just tried creating a symlink in lib64 to the libjpeg-turbo file and the game wouldn't launch again. So I dunno what's going on here, or why it doesn't like the symlinks I created but works fine with the ones that come with the libjpeg8 package. But whatever, the games are working now.

EDIT: The crash log found the libjpeg.so.8 file but said it was the wrong version.