The International Simutrans Forum

Simutrans Extended => Simutrans-Extended paksets => Pak128.Britain-Ex => Topic started by: Spenk009 on January 05, 2019, 08:29:45 AM

Title: Compiling the Pakset
Post by: Spenk009 on January 05, 2019, 08:29:45 AM
Many posters have issues building their own executables and/or paksets. I hope to bring some light into this dark with a quick guide on building PakBritain128-Extended on Linux and Windows.

Linux users:
Clone the github repository following the guide here (https://help.github.com/articles/cloning-a-repository/) and the command git clone https://github.com/jamespetts/simutrans-pak128.britain
You may need to install libpng15.so.15 from here (http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libpng15-1.5.28-alt2.x86_64.rpm), by extracting the /usr/lib64/ contents into your /usr/lib/ and the /usr/share/ into your /usr/share/.
In your cloned directory, .../simutrans-pak128.britain/ run make -jX X is the amount of threads (or cores) your cpu has plus one (i7 2700K (4 cores) 8 threads = 9).

There may be an error encountered which requires the installation of build essentials (Error 126, "sudo apt-get install build-essential"). If you encounter Error 127 you can try running make with sudo.



This is an old guide to compiling your own pakset on Windows.

Thank you to jamespetts, VS, and all others in the project.
Title: Re: Compiling the Pakset
Post by: jamespetts on January 05, 2019, 01:06:35 PM
Splendid, thank you - stickied!
Title: Re: Compiling the Pakset
Post by: Vladki on January 05, 2019, 01:10:24 PM
There is no need to use sudo. In general make shoud never be run as root, except for "make install". The compilation should run for security reasons as normal unprivileged user.
Title: Re: Compiling the Pakset
Post by: Spenk009 on January 06, 2019, 07:43:20 AM
Vladki: I get Error 126 or 127 if I try to compile without sudo. This is probably due to file ownership issues which I'm still quite foreign to. I've edited the post to reflect this.
Title: Re: Compiling the Pakset
Post by: Vladki on January 06, 2019, 02:34:20 PM
In this case no part of the process (git clone; make) shall be run with sudo. So you should be the owner of those files. However it is possible that the files are marked read-only. You can fix that by running:
chmod -R u+rwX .
In the cloned directory. If it fails on some files, check the ownership with "ls -l"

Ah, and of course if you once had run "sudo make", some files will be owned by root. Just delete them as root "sudo rm" and try again.