Compiling on Linux

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

User avatar
BenTrein
Engineer
Engineer
Posts: 21
Joined: 24 Dec 2009 10:26
Skype: bentrein
Location: Samut Prakarn, Thailand
Contact:

Compiling on Linux

Post by BenTrein »

Hi There,

I moderate a server, and have a GUI patch. This means, I need to compile OpenTTD myself. Everything went fine (following the wiki) up until version 1.1.0.

Note: I get the following error whether I apply the GUI patch or not, so it's not the GUI.

I download the source code from svn://svn.openttd.org/tags/1.1.0 - I assume that is the latest stable one.

Then I type
$ ./configure --without-liblzo2 (Note, Fedora uses lzo, and doesn't know a lzo2; it has always worked like this. The error seems to be unrelated)

Code: Select all

checking revision... no detection
WARNING: there is no means to determine the version.
WARNING: please use a subversion, mercurial, or git checkout of OpenTTD.
WARNING: you can only join game servers that have been compiled without
WARNING:   version detection.
WARNING: there is a great chance you desync.
WARNING: USE WITH CAUTION!
$ make then goes fine, however, as mentioned in the warning, there's no way I can connect to any server. Pls help me find a solution for that.

Edit: Sorry, the link to the wiki was missing.
Last edited by BenTrein on 04 Apr 2011 07:20, edited 1 time in total.
Greetz,

Ben Trein

The internet isn't a highway. It's a swamp: the more you surf, the more it draws you in!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Compiling on Linux

Post by planetmaker »

If you get that message you did not obtain the source by means of a revision control system. How did you obtain the source from the quoted link? Did you copy (parts of) the directories subsequently?

The usual way is

Code: Select all

svn co svn://svn.openttd.org/tags/1.1.0
cd 1.1.0
./configure && make
bin/openttd &
User avatar
BenTrein
Engineer
Engineer
Posts: 21
Joined: 24 Dec 2009 10:26
Skype: bentrein
Location: Samut Prakarn, Thailand
Contact:

Re: Compiling on Linux

Post by BenTrein »

I got the source code like this:

Code: Select all

svn checkout svn://svn.openttd.org/tags/1.1.0
The configure && make I did separately, and I've never don the bin/openttd. I just downloaded the already compiled version from the website, and replaced the openttd file and lang-folder.

The error I mentioned happened during ./configure.
Greetz,

Ben Trein

The internet isn't a highway. It's a swamp: the more you surf, the more it draws you in!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Compiling on Linux

Post by planetmaker »

BenTrein wrote:I got the source code like this:

Code: Select all

svn checkout svn://svn.openttd.org/tags/1.1.0
The configure && make I did separately, and I've never don the bin/openttd. I just downloaded the already compiled version from the website, and replaced the openttd file and lang-folder.

The error I mentioned happened during ./configure.
Yes, that's why I wanted to check that you're actually compiling the source which you got via subversion itself.

Doing configure and make separately is no error - if done within the directory you checked out. The bin/openttd just starts the programme ;-)

Is maybe subversion not in your path?
User avatar
BenTrein
Engineer
Engineer
Posts: 21
Joined: 24 Dec 2009 10:26
Skype: bentrein
Location: Samut Prakarn, Thailand
Contact:

Re: Compiling on Linux

Post by BenTrein »

planetmaker wrote:Is maybe subversion not in your path?
If that is the case, wouldn't it not work at all? I do get a(n almost) complete set of downloads... I mean, if I compile it, single player works. So something comes. :)

However, how do I check if something (subversion in this case) is in my path?
Greetz,

Ben Trein

The internet isn't a highway. It's a swamp: the more you surf, the more it draws you in!
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Compiling on Linux

Post by Terkhen »

Use the which command. "which svn" will return the absolute path to svn if it is in your path, otherwise it will return an error.
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Compiling on Linux

Post by Ammler »

BenTrein wrote: $ ./configure --without-liblzo2 (Note, Fedora uses lzo, and doesn't know a lzo2; it has always worked like this. The error seems to be unrelated)
I fixed the wiki and added lzo-devel...
User avatar
BenTrein
Engineer
Engineer
Posts: 21
Joined: 24 Dec 2009 10:26
Skype: bentrein
Location: Samut Prakarn, Thailand
Contact:

Re: Compiling on Linux

Post by BenTrein »

Code: Select all

$which svn
/usr/bin/svn
So that's not the issue. Any way I can manually add the version so my configure can find it?
Ammler wrote:
BenTrein wrote: $ ./configure --without-liblzo2 (Note, Fedora uses lzo, and doesn't know a lzo2; it has always worked like this. The error seems to be unrelated)
I fixed the wiki and added lzo-devel...
Thanks:

Code: Select all

yum -y install lzo-devel
<blabla>
No packadge lzo-devel available
I'd found that too. :)
Greetz,

Ben Trein

The internet isn't a highway. It's a swamp: the more you surf, the more it draws you in!
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Compiling on Linux

Post by Terkhen »

If svn is in your path but configure can't find it then there is something wrong with your setup or your checkout. What is the output of "svn status" in your checkout folder?
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Compiling on Linux

Post by Ammler »

BenTrein wrote:
Ammler wrote:
BenTrein wrote: $ ./configure --without-liblzo2 (Note, Fedora uses lzo, and doesn't know a lzo2; it has always worked like this. The error seems to be unrelated)
I fixed the wiki and added lzo-devel...
Thanks:

Code: Select all

yum -y install lzo-devel
<blabla>
No packadge lzo-devel available
I'd found that too. :)
then your repos-setup is broken, are you able to install openttd with yum?

Code: Select all

[root@fedora ~]# yum -v search lzo-devel

lzo-devel.i686 : Development files for the lzo library
Repo        : fedora
Regular fedora users might help you better, but your broken setup might also cause other missing libs/tools.

On suse I would run "zypper source-install openttd" to install the official supported dependencies, is there a similar feature for yum?

Edit: there is:

Code: Select all

[root@fedora ~]# yum-builddep openttd

...snip...

Dependencies Resolved

=================================================================================================================================================================================
 Package                                              Arch                           Version                                               Repository                       Size
=================================================================================================================================================================================
Installing:
 SDL-devel                                            x86_64                         1.2.14-10.fc13                                        updates                         362 k
 ccache                                               x86_64                         2.4-18.fc13                                           updates                          52 k
 desktop-file-utils                                   x86_64                         0.16-1.fc13                                           fedora                           50 k
 doxygen                                              x86_64                         1:1.7.3-1.fc13                                        updates                         2.6 M
 fontconfig-devel                                     x86_64                         2.8.0-1.fc13                                          fedora                          209 k
 freetype-devel                                       x86_64                         2.3.11-7.fc13                                         updates                         363 k
 libicu-devel                                         x86_64                         4.2.1-8.fc13                                          fedora                          616 k
 libpng-devel                                         x86_64                         2:1.2.44-1.fc13                                       updates                         111 k
 libtimidity-devel                                    x86_64                         0.1.0-8.fc12                                          fedora                          6.7 k
 lzo-devel                                            x86_64                         2.03-3.fc12                                           fedora                           29 k

...snip...
(yum-builddep is part of package yum-utils)
User avatar
BenTrein
Engineer
Engineer
Posts: 21
Joined: 24 Dec 2009 10:26
Skype: bentrein
Location: Samut Prakarn, Thailand
Contact:

Re: Compiling on Linux

Post by BenTrein »

That did the trick. Thank you.

Now I'm running into errors during make, but they are admin-gui related. I'll ask the gui who wrote that.

Thanks a million, again. :bow:

Edit: See below - it didn't do the trick. Ouch ouch ouch. How embarrassed I am!
Last edited by BenTrein on 04 Apr 2011 14:29, edited 1 time in total.
Greetz,

Ben Trein

The internet isn't a highway. It's a swamp: the more you surf, the more it draws you in!
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Compiling on Linux

Post by Ammler »

then it would be interesting to know, which of the above mentioned packages weren't installed and configure forgot to complain about
User avatar
BenTrein
Engineer
Engineer
Posts: 21
Joined: 24 Dec 2009 10:26
Skype: bentrein
Location: Samut Prakarn, Thailand
Contact:

Re: Compiling on Linux

Post by BenTrein »

Ammler wrote:then it would be interesting to know, which of the above mentioned packages weren't installed and configure forgot to complain about
Very indeed, but then one (I? :P) should remove it one by one until I get the error again... And frankly, I'm too lazy for that; unless someone would be seriously grateful.
Greetz,

Ben Trein

The internet isn't a highway. It's a swamp: the more you surf, the more it draws you in!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Compiling on Linux

Post by planetmaker »

Ok, let's assume, I'm seriously grateful.
User avatar
BenTrein
Engineer
Engineer
Posts: 21
Joined: 24 Dec 2009 10:26
Skype: bentrein
Location: Samut Prakarn, Thailand
Contact:

Re: Compiling on Linux

Post by BenTrein »

planetmaker wrote:Ok, let's assume, I'm seriously grateful.
Ouch, ouch ouch. This is embarrassing!

I svn-ed 1.0.1 and everything compiled fine. But that's not the problem.. :D It was my mistake.

So I tried svn 1.1.0 for good cause, and guess what: The problem still exists.

Code: Select all

WARNING: there is no means to determine the version.
etc.

Anyone another creative suggestion?
Greetz,

Ben Trein

The internet isn't a highway. It's a swamp: the more you surf, the more it draws you in!
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Compiling on Linux

Post by Ammler »

you didn't yet do what Terkhen asked you...
User avatar
BenTrein
Engineer
Engineer
Posts: 21
Joined: 24 Dec 2009 10:26
Skype: bentrein
Location: Samut Prakarn, Thailand
Contact:

Re: Compiling on Linux

Post by BenTrein »

Apologies. I need to read more carefully.
Terkhen wrote:If svn is in your path but configure can't find it then there is something wrong with your setup or your checkout. What is the output of "svn status" in your checkout folder?

Code: Select all

$ svn status
svn: warning: '.' is not a working copy
Interesting that with exactly this system, this installation, without any changes, it did work fine copiling 1.0.5... And at least two previous versions too.
Greetz,

Ben Trein

The internet isn't a highway. It's a swamp: the more you surf, the more it draws you in!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Compiling on Linux

Post by planetmaker »

Well, you don't compile an svn checkout but something else (maybe the source from a tar you downloaded?). Make sure you compile your game in the dir which actually contains the source you checked-out by means of svn.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Compiling on Linux

Post by Terkhen »

And if you are in the right folder, the checkout is corrupted or incomplete. Delete your source and checkout 1.1.0 source again.
User avatar
BenTrein
Engineer
Engineer
Posts: 21
Joined: 24 Dec 2009 10:26
Skype: bentrein
Location: Samut Prakarn, Thailand
Contact:

Re: Compiling on Linux

Post by BenTrein »

Terkhen wrote:And if you are in the right folder, the checkout is corrupted or incomplete. Delete your source and checkout 1.1.0 source again.
Sigh - one should learn something new every day. :D

Here's the history; just for entertainment's sake. I need to compile two different versions - one for a non mod noob friend of mine (noob in Linux that is), and one for myself using the moderator gui. The one for the friend of mine has also a patch (colouring the city names based on the rating). So - being behind not such a fast internet connection - thought I'd save time by copy/pasting the checkout into a new folder, and compiling it there. That was not such a smart move, now, was it? :D

I can in all honesty say, I didn't know. :tongue: :oops:

Thanks for the hints; it's helped me. At least now I have lzo-devel running properly! :)
Greetz,

Ben Trein

The internet isn't a highway. It's a swamp: the more you surf, the more it draws you in!
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 9 guests