LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Games (https://www.linuxquestions.org/questions/linux-games-33/)
-   -   Installing Loki Publisher games on current distros? (https://www.linuxquestions.org/questions/linux-games-33/installing-loki-publisher-games-on-current-distros-4175723421/)

mintylinux 03-25-2023 11:14 AM

Installing Loki Publisher games on current distros?
 
Hi, i am currently running the latest version of Manjaro as of this date. I was trying to install Heavy Metal FAKK2 from a cdrom that i have from loki, who ported the game back in 2001. I tried to run the setup.sh script and was stopped with an error.

"This installation doesn't support fgrep: warning: fgrep is obsolescent; using grep -F"

How does one fix this issue, or how does one update this setup.sh script to make it installable on a latest version of linux? Not just this game, but any other game that was released from loki.

Thanks!

wpeckham 03-25-2023 12:08 PM

Fgrep was once a separate utility that has long since been folded into grep. The "grep -f" replacement is the correct syntax, and should work.
You can also make a symbolic link to grep named fgrep, and this will work because grep knows to change behavior when it is called with that name.

My system currently has a very short script named fgrep, that calls grep with the -F parameter and outputs that exact message. Note that it is informational, not even a warning much less an error. This leads me to believe that you HAVE no issue and are seeing the correct behavior from fgrep. If your install is stopping, that is not likely to be the reason why.

Rodrigolitzius 08-26-2023 05:06 PM

Hey, i had the exact same problem with the exact same game some months ago. Today i decided to try it again and i might have fixed the issue;

What happened
There's directories for the installation of the game for different OSes and GLIBC versions at setup.data/
To know how to install the game the script tries to determine the OS, GLIBC version and architecture. This is were things go wrong

When it tries to get the GLIBC version, it calls fgrep. It redirects all output from fgrep to /dev/null, but for some reason that i'm not sure of, fgrep outputs "fgrep: warning: fgrep is obsolescent; using grep -F".

So in the end the function DetectLIBC outputs "fgrep: warning: fgrep is obsolescent; using grep -F\nglibc-2.1" and assigns it to the variable $libc

This variable is then used in the try_run function to get the path of the "installation directory". It should be something like:
setup.data/bin/Linux/x86/glibc-X.Y/ (X.Y is the GLIBC version).

But, due to the error in the DetectLIBC function, the contents of the variable $libc is wrong, so the path is actually:
setup.data/bin/Linux/x86-64/fgrep: warning: fgrep is obsolescent; using grep -F\nglibc-2.1/

This path obviously doesn't exist, so the script assumes GLIBC (or LIBC, i don't even know) doesn't exist and terminates.

To fix that, you just need to change fgrep at line 32 to grep -F

But there's still a problem...
Remember the architecture variable? ($arch). So... at runtime, it is "x86_64" on my machine, but the script was written on 2001, and x86_64 was created on 1999. It was really new, so the script didn't have support for it. You can manually set the variable to "x86" by changing arch=`DetectARCH` at line 49 to arch="x86", which will get you to the installation process and the game will install just fine, but at least for me, when i run it, it segfaults...

Try running it yourself and maybe you're luckier than me. If it also segfaults when you try to run it, my best guess is that it only works on 32 bit systems, unfortunately.

I hope this helps. If a miracle happens and it works, tell me what you did. I really want to try out this game

wpeckham 08-26-2023 05:32 PM

Why not install on a 32-bit distribution more like those for which it was made?
There still might be issues to resolve, but that would avoid more than a few.


All times are GMT -5. The time now is 01:34 PM.