Issue compiling on Ubuntu

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
User avatar
FulliAutomatix
Engineer
Engineer
Posts: 104
Joined: 24 Aug 2014 12:20
Location: Kaon Prison, Cybertron

Issue compiling on Ubuntu

Post by FulliAutomatix » 29 Aug 2018 13:01

So I'm attempting to compile JGR's Patchpack on Ubuntu Server 18.04, but I can't get further than getting the libraries needed to compile it in the first place!
I try using these commands in this order

Code: Select all

sudo su
git clone https://github.com/JGRennison/OpenTTD-patches.git jgrpp
cd jgrpp
sudo apt-get build-dep openttd
but when I do the apt-get for the required libraries, I get an issue saying

Code: Select all

Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
and I have no clue where to go from here.

Anybody able to help me?

Many thanks

P.S. this compile is just to get a Linux version of JGRPP to run as a server.

agentw4b
Traffic Manager
Traffic Manager
Posts: 154
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: Issue compiling on Ubuntu

Post by agentw4b » 29 Aug 2018 18:32

FulliAutomatix wrote:So I'm attempting to compile JGR's Patchpack on Ubuntu Server 18.04, but I can't get further than getting the libraries needed to compile it in the first place!
I try using these commands in this order

Code: Select all

sudo su
git clone https://github.com/JGRennison/OpenTTD-patches.git jgrpp
cd jgrpp
sudo apt-get build-dep openttd
but when I do the apt-get for the required libraries, I get an issue saying

Code: Select all

Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
and I have no clue where to go from here.

Anybody able to help me?

Many thanks

P.S. this compile is just to get a Linux version of JGRPP to run as a server.
If you want to create a deb package, I can not do it, but I think it's more important to install it first.
I do not remember all of the .deb packages I've installed, but then I did the following

Dedicated server:
---------------------------------------
sudo apt-get install pkg-config
cd jgrpp
chmod +x findversion.sh
chmod +x configure
chmod +x version_utils.sh
./configure --enable-dedicated --without-liblzo2
make

(You may need to edit the program version name in the jgrpp/src/rev.cpp file and change the parameter: const char _openttd_revision [] = "jgrpp-0.27.0")

make
sudo make install
cd /home/youruser
/usr/local/games/openttd -D

(Use CTRL-C to exit the game and find out that the openttd.cfg file was created in the /home/youruser/.openttd subdirectory. You can edit the openttd.cfg)

(Because I use both Openttd and Opentdd-JGR at the same time, I have rename /usr/local/games/openttd to /usr/local/games/openttdjgr, but it is not necessary)

(opengfx)
wget https://binaries.openttd.org/extra/open ... .2-all.zip
sudo unzip opengfx-0.5.2-all.zip
tar -xvf opengfx-0.5.2.tar
mv opengfx-0.5.2 ~/.openttd/baseset


(Openttd services)
wget https://bitbucket.org/frodus/openttd-in ... -1.1.1.zip
unzip openttd-init-1.1.1.zip -d openttd-init
sudo ln -s ~/openttd-init/openttd /etc/init.d/openttd
sudo chmod 755 ~/openttd-init/openttd
sudo update-rc.d openttd defaults

(Finally rename ~/openttd-init/config.example to config and edit the variables to suitable values.)

(firewall)
sudo apt-get ufw
sudo apt-get install ufw
sudo ufw allow 3979
sudo ufw reload

(start and stop)
/etc/init.d/openttd start
/etc/init.d/openttd stop


(If you want to know how I install a regular openttd on Ubuntu, you can check it here, just changed the version of openttd: viewtopic.php?f=31&t=76826)
Last edited by agentw4b on 01 Sep 2018 20:06, edited 1 time in total.
Owner and admin of servers:Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779), Experimental games 04 (92.63.57.152:3679), Experimental games 05 (92.63.57.152:3579).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS

oberhümer
Tycoon
Tycoon
Posts: 1277
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: Issue compiling on Ubuntu

Post by oberhümer » 01 Sep 2018 17:40

FulliAutomatix wrote:

Code: Select all

E: You must put some 'source' URIs in your sources.list
The packages necessary to compile OpenTTD are associated not with the OpenTTD binary package that you would get with sudo apt install openttd, but with the corresponding source package. Source packages are in a different section of the Ubuntu repositories, which you need to enable first, either in the GUI (software-properties-gtk) or directly in /etc/sources.list[.d] (look for commented-out deb-src lines). After that, apt-get build-dep will work fine

More details here (I just googled your error message). I'll add a note to the wiki.
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---

agentw4b
Traffic Manager
Traffic Manager
Posts: 154
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: Issue compiling on Ubuntu

Post by agentw4b » 01 Sep 2018 18:07

From: https://wiki.openttd.org/Compiling_on_Linux


sudo apt-get install build-essential pkg-config libsdl1.2-dev subversion patch zlib1g-dev liblzo2-dev liblzma-dev libfontconfig-dev libicu-dev
Owner and admin of servers:Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779), Experimental games 04 (92.63.57.152:3679), Experimental games 05 (92.63.57.152:3579).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS

User avatar
FulliAutomatix
Engineer
Engineer
Posts: 104
Joined: 24 Aug 2014 12:20
Location: Kaon Prison, Cybertron

Re: Issue compiling on Ubuntu

Post by FulliAutomatix » 01 Sep 2018 19:42

Thanks for the help!

I managed to download all the dependencies that a dedicated server needs, and I got to compiling it, but when I run the make file I encounter this error after it compiles what I think are all the .cpp files.
[+] Spoiler
Image
yes, I took that on my phone because I don't know how to take a screenshot on Ubuntu Server
This is on the source for JGR's Patch Pack 0.27.0 pulled straight from github using the git command.

Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 5 guests