The International Simutrans Forum

 

Author Topic: Help getting latest Simutrans Exp to compile on Linux  (Read 4917 times)

0 Members and 1 Guest are viewing this topic.

Offline gfurst

  • *
  • Posts: 32
  • Languages: EN, PT
Help getting latest Simutrans Exp to compile on Linux
« on: February 02, 2014, 09:00:27 PM »
Being a long time Simutrans user and finally  checking out what experimental is all about, I'm read to try the new features and improvements.
Seems to be a major leap between the standard and experimental version. I though experimental were just to try out new feature but were soon merged on standard.

Anyway, my problem is that I'm on linux and currently there are no pre-compiled versions available. On the main "get simutrans exp" thread it does suggest its better to get the source and build it for my self.
But I can't figure out how to do this, all I've got is this Git page, however I have no idea what I'm supposed to do.
Where is the usual tar packed file with sources? where is the config and make files?

Most here seem to be very familiar with building source code, but I barely build a single thing, no idea how git is supposed to work, thanks.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18740
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #1 on: February 02, 2014, 09:15:28 PM »
You need to install Git on your machine, then create a directory in which to host a local copy of the Github repository. Use the "master" branch to be sure to get the same version as the latest release. There are tutorials on the internet that will explain to you how to do all of these things.

Next, you will need to install various packages on which Simutrans depends, such as libbz2 and pthreads. I must confess, I cannot remember the full list of packages off the top of my head (or whether there are any other than those two), so some testing may be needed. You will need the "devel" versions of both of those packages to be able to use them to compile code. Again, there should be tutorials on the internet about how to install these (it will be something like "apt-get install libbz2-devel" in a Debian based system, but I am not sure of the exact command off the top of my head, and I am currently using a Windows computer).

Next comes the actual building - just go to the directory in which the source code from Github is located and type "make". The compiling process will take a while. When you are finished, you it will either have succeeded in building the executable (which will simply be called "simutrans" and will be in a subdirectory, "/simutrans", of the directory in which you compiled the sources), or there will be an error and it will have failed. If you get errors, copy and paste the text and post it in this thread, and I and others will try to help you to solve them (if you have not been able to solve them yourself).

Sorry for the problems with the automatic build, and thank you for your interest in Simutrans-Experimental. If you do manage to build a version successfully, would you mind uploading it so that others can download it?

Offline gfurst

  • *
  • Posts: 32
  • Languages: EN, PT
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #2 on: February 03, 2014, 12:11:47 AM »
You need to install Git on your machine, then create a directory in which to host a local copy of the Github repository. Use the "master" branch to be sure to get the same version as the latest release.
Hey jamespetts, thanks for the help, installing the required libs and etc I'm ok to do, even compiling I think I could do ok, however I'm not understand how to properly use github.
There is a link in the "get simutrans exp" but I don't know what o make of it.
How exactly I work 'git' to get the necessary files into my local folder? Just to clarify, but is not the same as simply downloading the zip form github project page, right?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18740
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #3 on: February 03, 2014, 12:18:57 AM »
Using Github is indeed different to downloading the .zip from the project page (although you could do that if you wanted, too). Have you not found a good Git tutorial?

Offline gfurst

  • *
  • Posts: 32
  • Languages: EN, PT
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #4 on: February 03, 2014, 01:19:06 AM »
Using Github is indeed different to downloading the .zip from the project page (although you could do that if you wanted, too). Have you not found a good Git tutorial?
Not to be harsh but Git is an app very very resourceful in managing projects and stuff, but just getting the proper code from html doesn't seem to be the focus of tutorials, I still didn't find a easy way to just download the respective files from the master branch into current dir.

Edit:
So ok finally I was able to work with git, simply by:
Code: [Select]
git --git-dir=/path/ clone http:git/directory/But it did seem to download everything just as a zipped from the git project's page.
Code: [Select]
cp config.template config.defaultAnd then adjust some settings there, though the readme recommends just a few.
then simply
Code: [Select]
makeA few minutes and Voila!

One question though, I used to use pak128 with standard, which pak is best suited for experimental, more up to date with its features?
« Last Edit: February 03, 2014, 02:19:53 AM by gfurst »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18740
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #5 on: February 03, 2014, 11:36:11 AM »
Glad that you managed to get it to work! Although you could just have downloaded a zipped file, once you have Git set up, it is much easier to keep up to date with the latest code, as all that you have to do is use the command "git pull origin master", save and close the default text file that opens and then "make" again whenever the latest version is released.

The pakset with the most Simutrans-Experimental compatible features is Pak128.Britain-Ex, the latest version of which is currently 0.9.1.

Happy playing!

Offline gfurst

  • *
  • Posts: 32
  • Languages: EN, PT
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #6 on: February 03, 2014, 02:39:27 PM »
Hey jamespetts, thanks, and many thanks for simutrans experimental.
I didn't see before that you're the project coordinator. It about adds the features I thought were missing from simutrans.

On another note, I'm having trouble getting a customized cityrules.tab to work, here is a quicky thread.

Oh and besides, I'm happy to share the built version of experimental 64bit for linux.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18740
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #7 on: February 03, 2014, 03:26:44 PM »
Thank you for being willing to share your build: do you think that you could upload it to http://files.simutrans-germany.com and allow me to copy it onto my server? This would be of use to many people, I think.

Offline gfurst

  • *
  • Posts: 32
  • Languages: EN, PT
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #8 on: February 03, 2014, 04:00:06 PM »
Thats ok jamespetts, but I'm afraid that my other issue with the cityrules file may actually not be issue my game is not loading. Right now I can't be sure but it isn't loading with the regular pak128.britain files.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18740
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #9 on: February 03, 2014, 04:09:27 PM »
With a clean install of Pak128.Britain-Ex 0.9.1, what happens when you try to start Simutrans-Experimental?

Offline gfurst

  • *
  • Posts: 32
  • Languages: EN, PT
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #10 on: February 03, 2014, 04:56:33 PM »
With a clean install of Pak128.Britain-Ex 0.9.1, what happens when you try to start Simutrans-Experimental?
Thanks james, but I've managed to pinpoint where it was faulty....
I did a extensive diagnostic run, separating factors with a fresh compile and fresh unpack of the pak128.britain.
Turns out the problem was with the base simuconf.tab, where I had
Code: [Select]
singleuser_install = 1
pak_file_path = pak128.Britain-Ex/
turns out it wasn't able to load the pack with that path, commenting it again solved it, it wasn't needed anyway...
Do you mind removing the other thread? Afterall it turned out unrelated...

Beginning to play test things out.
One minor issue though, have you noticed that the tropical climate is not holding any trees? I've tried generating the map with different values for "always trees" and "no trees" but no luck...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18740
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #11 on: February 03, 2014, 05:45:57 PM »
Ahh, glad that things are working for you now. Yes, I will remove the other thread.

As to the tropical climate having no trees, I suspect that that is because nobody has drawn any tropical trees for the pakset, which is intended to be set in the UK. Indeed, when I generate maps, I entirely eliminate the tropical climate by giving it a level of zero. I am also in the process of renaming the "Mediterranean" climate to "plains", "temperate" to "lowlands" and "tundra" to "uplands" to correspond with the topography found in the UK.

Offline gfurst

  • *
  • Posts: 32
  • Languages: EN, PT
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #12 on: February 04, 2014, 03:14:37 PM »
Hey James, I am now able to play alright and my cityrules.tab is more or less alright, its producing more straight streets with 2x2 blocks. My aim was to enable bigger blocks but this becomes very complicated and the system is somewhat limited. I will eventually work on it.

I'm having an issue with loading save games right now, first one of my save crash upon loading, now my second try it will never load, but won't crash.
On the loading bar shows "destroying old map" on the terminal shows only:
Code: [Select]
parse_simuconf() in program dir (config/simuconf.tab) for override of save file: Reading simuconf.tab successful!
parse_simuconf() in pak dir (Pak128.Britain-Ex/config/simuconf.tab) for override of save file: Reading simuconf.tab successful!
Calculating textures ...done
Do you have idea what this is?
Sorry for trying to solve this issue in this same thread, it's just to make sure its something serious before starting another one.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18740
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #13 on: February 05, 2014, 12:21:37 PM »
Do you have the latest version, that is, 11.18? There were some heap corruption bugs in 11.17 which might cause this (and all sorts of other errors), and I pushed 11.18 at around the time that you were discussing how to compile above, so you might have missed it.

The output that you have shown, however, gives no clue, unfortunately, as this is standard output whenever a game is loaded (the old game has to be destroyed before a new one is loaded).

Incidentally, I should be interested to see the results of your amended cityrules.tab (perhaps in another thread, however).

Offline gfurst

  • *
  • Posts: 32
  • Languages: EN, PT
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #14 on: February 05, 2014, 08:31:16 PM »
Hey, the version was 11.17, but I've managed to set up a local repository and know how to update it.
Compiled the new version but still haven't tried saving-loading.
Compiled this version with "DEBUG = 1" so maybe it will be more verbose.
I'm about to create the new thread for my custom cityrules file, additionally I'm going to write a suggestion for a alternative way of plotting cities, should this be on the standard forum or experimental?
And at last, I'm also going to write a thread "Comprehensive guide to compiling on Linux".

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18740
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #15 on: February 05, 2014, 08:44:50 PM »
Ahh, I shall look forward to your threads - that sounds very useful. Thank you.

As to the city rules file, I suggest that you post it on this forum, as city rules are pakset specific.

Offline gfurst

  • *
  • Posts: 32
  • Languages: EN, PT
Re: Help getting latest Simutrans Exp to compile on Linux
« Reply #16 on: February 06, 2014, 12:38:07 AM »
Hey James, I actually posted on 'General  resources and tools', simply because I think most paks use very similar cityrules and thus this could be useful for others too.
The link http://forum.simutrans.com/index.php?topic=13262.0