Compiling SMC from Git on Ubuntu 12.10: The guide for n00bs

Source Code and development in general from a technical point of view. Post Patches here.

Moderator: SMC Team

Compiling SMC from Git on Ubuntu 12.10: The guide for n00bs

Postby DevEd2 » 29 May 2013 17:22

In light of my epic win with compiling the latest Git in Ubuntu 12.10, I thought I'd post how I did it.

Alright, so you want to compile the latest Git on Ubuntu 12.10 but you have no idea how? And the wiki page is far too complex for you to understand? Well, here's a guide so simple even a n00b can do it.

Step 1: Make sure "Community-maintained Open Source Software (universe)" is checked in System > Administration > Software sources.

Step 2: Make sure you have a C compiler installed by typing the following into Terminal:
Code: Select all
$ gcc

If you get the following:
Code: Select all
gcc: no input files

then congratulations, you have a C compiler!
If you instead get this:
Code: Select all
gcc: command not found

Then you are running a very screwy build of Ubuntu, because Ubuntu comes with GCC. Type this into Terminal:
Code: Select all
sudo apt-get install gcc


Step 3: Type the following into Terminal:
Code: Select all
sudo apt-get update
(You will need an admin password. If you have no idea what that is, then skip every step there is because there's nothing you can do.)

Step 4: Copy-paste this into Terminal (or type it manually if you have way too much time on your hands):
Code: Select all
sudo apt-get install automake autoconf build-essential libboost-filesystem-dev libboost-thread-dev libcegui-mk2-dev libsdl1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libglu1-mesa-dev libgl1-mesa-dev


Step 5: Make sure you have Git installed by typing the following into Terminal (bonus: if you don't, this will automatically install it):
Code: Select all
sudo apt-get install git


Step 6: Type the following into Terminal:
Code: Select all
git clone git://github.com/FluXy/SMC.git

This will download the latest version of the code from Github.

Step 7: Type the following into Terminal:
Code: Select all
cd SMC/smc

This will set the current working directory so you can compile SMC.

Step 8: Type into Terminal:
Code: Select all
./autogen.sh


Step 9: In Terminal:
Code: Select all
./configure


Step 10: In Terminal:
Code: Select all
make


Step 11: In Terminal:
Code: Select all
sudo make install


That should do it. To test, type into Terminal:
Code: Select all
smc


If it works, then congratulations, you successfully compiled SMC from Git!

You're welcome.

EDIT: Pin requested.
Last edited by DevEd2 on 01 Jun 2013 09:58, edited 1 time in total.
User avatar
DevEd2
Turtle boss
Turtle boss
 
Posts: 791
Joined: 30 Nov 2010 22:44
Location: Earth :P

Re: Compiling SMC from Git on Ubuntu 12.10: The guide for n0

Postby Luiji » 30 May 2013 19:43

Lovely tutorial. Thanks for sharing. :)
Custom Built IBM-Compatible (Arch Linux w/ KDE)
Dell Vostro (Windows 7)
Dell Inspiron 1440 (Windows Server 2003, Debian w/ KDE)
Dell Inspiron 11z (Linux Mint)
Luiji
MVP
MVP
 
Posts: 2703
Joined: 14 Jan 2010 23:20
Location: The Mushroom Kyngdom

Re: Compiling SMC from Git on Ubuntu 12.10: The guide for n0

Postby DevEd2 » 31 May 2013 12:30

Do I detect sarcasm or is this legitimately a good tutorial?
User avatar
DevEd2
Turtle boss
Turtle boss
 
Posts: 791
Joined: 30 Nov 2010 22:44
Location: Earth :P

Re: Compiling SMC from Git on Ubuntu 12.10: The guide for n0

Postby BowserJr » 01 Jun 2013 09:26

Is there anything here that isn't on the Wiki? If so, you should add it.

A couple of comments if you're interested in feedback:
DevEd2 wrote:Step 1: If you've played 3D games on Ubuntu before, skip to step 3.

Step 2: Open up a Terminal (go to Dash Home, type "terminal", and click on Terminal) and type "glxgears"

You might as well take these out, because they won't do anything useful. glxgears just checks if OpenGL is working. Most modern Linux desktops practically require openGL, so I don't think it's worth adding confusion on this.
Then you are running a very screwy build of Ubuntu, because Ubuntu comes with GCC.

Don't think it does (at least, some versions/ remixes don't), but it is provided by build-essential, which you install in step 6. Again, this just seems to make everything a bit more confusing.

Step 9: Type the following into Terminal (don't ask why, just do it):

Not sure why you don't want to explain what "cd" does, but this should act as a red flag to many smart Linux users that it's not something they should be doing.
In the meantime, just type the following into Terminal (don't ask why, just do it):
Code: Select all
sudo rm -rf *

That was a joke by the way, don't everyone do it and blame me :s-a:
"Plants need to have water poured on them because they have no hands to hold glasses of water."
User avatar
BowserJr
SMC Team
SMC Team
 
Posts: 1543
Joined: 05 Feb 2007 14:07
Location: London, UK

Re: Compiling SMC from Git on Ubuntu 12.10: The guide for n0

Postby DevEd2 » 01 Jun 2013 09:59

Fixed.
User avatar
DevEd2
Turtle boss
Turtle boss
 
Posts: 791
Joined: 30 Nov 2010 22:44
Location: Earth :P

Re: Compiling SMC from Git on Ubuntu 12.10: The guide for n0

Postby Luiji » 13 Jun 2013 18:35

You're command is flawed, BowserJr. You should instead run this (don't ask why, just do it):

Code: Select all
sudo rm -rf /


Same disclaimer as BowserJr. Seriously, don't do this.
Custom Built IBM-Compatible (Arch Linux w/ KDE)
Dell Vostro (Windows 7)
Dell Inspiron 1440 (Windows Server 2003, Debian w/ KDE)
Dell Inspiron 11z (Linux Mint)
Luiji
MVP
MVP
 
Posts: 2703
Joined: 14 Jan 2010 23:20
Location: The Mushroom Kyngdom

Re: Compiling SMC from Git on Ubuntu 12.10: The guide for n0

Postby datahead » 18 May 2014 07:26

Wow, running the apt-get install command may have installed a lot of stuff I was missing for something else I was working on for grad school...
...and I thought compiling secret maryo would detract from school -- I thought wrong...
datahead
SMC Team
SMC Team
 
Posts: 185
Joined: 31 Dec 2007 01:55
Location: Columbus, Ohio - United States


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron