News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Help getting latest Simutrans Exp to compile on Linux

Started by gfurst, February 02, 2014, 09:00:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gfurst

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.

jamespetts

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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gfurst

Quote from: jamespetts 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.
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?

jamespetts

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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gfurst

#4
Quote from: jamespetts 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?
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:
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.
cp config.template config.default
And then adjust some settings there, though the readme recommends just a few.
then simply
make
A 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?

jamespetts

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!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gfurst

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.

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gfurst

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.

jamespetts

With a clean install of Pak128.Britain-Ex 0.9.1, what happens when you try to start Simutrans-Experimental?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gfurst

Quote from: jamespetts 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?
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
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...

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gfurst

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:
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.

jamespetts

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).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gfurst

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".

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gfurst

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