make install issiues.

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
solbu
Engineer
Engineer
Posts: 5
Joined: 26 Feb 2006 05:24

make install issiues.

Post 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.
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post 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.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
solbu
Engineer
Engineer
Posts: 5
Joined: 26 Feb 2006 05:24

Post 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 ~]$
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post 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.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
solbu
Engineer
Engineer
Posts: 5
Joined: 26 Feb 2006 05:24

Post 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)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post 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.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
solbu
Engineer
Engineer
Posts: 5
Joined: 26 Feb 2006 05:24

Post 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.
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post 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.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
solbu
Engineer
Engineer
Posts: 5
Joined: 26 Feb 2006 05:24

Post 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.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 9 guests