Page 1 of 1

make install issiues.

Posted: 26 Feb 2006 05:44
by solbu
Hello.

I have enjoyed the game you have created. However I have a few problems on Linux that I can not seem to fix.

When I run the game from the directory I have compiled it (eg /home/solbu/download/openttd-0.4.5), the game runs with no problems of any kind.

I can also install it globaly as root (by editing the Makefile.config) into, say /usr/local/share/games/openttd and run it from that directory with no problems.

But when I run it as a regular user (from say /home/solbu) it does not run.
The error message i get are as follow:

Code: Select all

[solbu@jensen ~]$ openttd
Your sample.cat file is corrupted or missing!
Error: No available language packs
openttd: openttd.c:76: error: Assertion `0' failed.
[solbu@jensen ~]$
This only happens when I do not run it inside the directory that the data and lang directories resides.
[solbu@jensen ~]$ ls /usr/local/share/games/openttd/
data/ gm/ lang/ scenario/

[solbu@jensen ~]$ ls /usr/local/share/games/openttd/data/
autorail.grf dosdummy.grf openttd.grf sample.cat trgcr.grf trgir.grf trkfoundw.grf
canalsw.grf nsignalsw.grf opntitle.dat trg1r.grf trghr.grf trgtr.grf

[solbu@jensen ~]$ ls /usr/local/share/games/openttd/lang/
american.lng danish.lng finnish.lng hungarian.lng origveh.lng slovak.lng
brazilian_portuguese.lng dutch.lng french.lng icelandic.lng polish.lng spanish.lng
catalan.lng english.lng galician.lng italian.lng portuguese.lng swedish.lng
czech.lng estonian.lng german.lng norwegian.lng romanian.lng turkish.lng

[solbu@jensen ~]$ pwd
/home/solbu
[solbu@jensen ~]$
Here is an excerpt from the Makefile.config:
INSTALL:=1
PREFIX:=/usr/local
BINARY_DIR:=games
DATA_DIR:=share/games/openttd
ICON_DIR:=
USE_HOMEDIR:=1
PERSONAL_DIR:=.openttd
Does anyone have any ideas on how I fix this problem?
I want to enable the regular users on my computers to enjoy this also without the need to install a separate copy for each user.

Posted: 26 Feb 2006 12:06
by Darkvater
The easiest solution, or testing would be to see where openttd is actually looking for your sample.cat file. You can try

Code: Select all

strace openttd 2> log
and then

Code: Select all

grep -iHn "sample.cat" log
Then we can see what the makefile does and how it should be fixed.

Posted: 26 Feb 2006 16:56
by solbu
Darkvater wrote:The easiest solution, or testing would be to see where openttd is actually looking for your sample.cat file. You can try

Code: Select all

strace openttd 2> log
and then

Code: Select all

grep -iHn "sample.cat" log
Then we can see what the makefile does and how it should be fixed.
And the winner is:

Code: Select all

[solbu@jensen ~]$ grep -iHn "sample.cat" log
log:151:open("data/SAMPLE.CAT", O_RDONLY)       = -1 ENOENT (No such file or directory)
log:152:open("data/sample.cat", O_RDONLY)       = -1 ENOENT (No such file or directory)
log:153:open("data/SAMPLE.CAT", O_RDONLY)       = -1 ENOENT (No such file or directory)
log:154:open("data/sample.cat", O_RDONLY)       = -1 ENOENT (No such file or directory)
log:155:write(2, "Your sample.cat file is corrupte"..., 46Your sample.cat file is corrupted or missing!
[solbu@jensen ~]$

Posted: 26 Feb 2006 17:59
by Darkvater
Hmm, have you compiled the game with these settings and not only did install with the settings?

Because if settings are not set, the files are searched in the current working directory.

Posted: 27 Feb 2006 01:07
by solbu
Darkvater wrote:Hmm, have you compiled the game with these settings and not only did install with the settings?

Because if settings are not set, the files are searched in the current working directory.
Yes. Didn't you see the Makefile excerpts? :)

In stead of asking me if I did this or that, tell me _what_ and where I'm supposed to do it. (And yes, I am root)

Posted: 27 Feb 2006 06:44
by DaleStan
You can change a makefile all you want; if you don't make clean && make afterwards, it really won't have much effect.

Posted: 27 Feb 2006 07:30
by solbu
DaleStan wrote:You can change a makefile all you want; if you don't make clean && make afterwards, it really won't have much effect.
I always do that.

I just tested the command you sugested just now because you suggested that. :)
Stil no go.

Posted: 27 Feb 2006 08:54
by Darkvater
Well obviously looking at strace it is looking for the data files in the current directory. So you have to put them where the openttd executable is.

At least until this problem is sorted out.

Posted: 27 Feb 2006 09:12
by solbu
Darkvater wrote:Well obviously looking at strace it is looking for the data files in the current directory. So you have to put them where the openttd executable is.

At least until this problem is sorted out.
I take it that you or someone in the development team will look into this to possibly fix it in a future release?

I hate the thought of copying the game into every users homedir to make it work for those that want to use it. But for now that will have to do. :)

The game is wonderfull and I love it. :)
Brings a lot of memories from back when I played TTD on my 486 in the old days.