[Howto][Hacks] Build Scid chessgame from Tarball for 64 bit.

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

[Howto][Hacks] Build Scid chessgame from Tarball for 64 bit.

Postby meteorrock on Wed Jan 30, 2013 11:27 pm

Hi everyone. :) Today I am going to show you how to build and troubleshoot a game tarball for Linux Mint 14.1 and Ubuntu 12.10 on AMD 64 bit. This is going to be an exercise for those new to linux on building tarballs and getting a cool game up and going. As I am a chess kid with a 1945 elo score on the chess sites this app draws my interests. I am cute and talented like that. :) LOL.

Image Image

First we will need to download the tarball for SCID, which is a chess game. Here is the link for this tarball. This game has no PPA or .deb for installation so we will have to build it from the tarball source. WE will have to also modify the configure file that is extracted to get this game up and going for users using a 64 bit Linux Mint or Ubuntu build. http://scid.sourceforge.net/download.html

Next we will have to extract that tarball to a folder, I extracted mine in my home folder. You can use the included archive manager to extract this tarball or you can extract it in your terminal with the following command.

Code: Select all
tar -zxvf scid-4.3.tar.bz2


After we have extracted this tarball, to get this game to run on 64 bit, will will need to include some tools from the apt-get. To compile Scid for Linux or other Unix operating systems, you must have Tcl/Tk (8.5 or newer is required) and a C++ compiler if they are not already installed. So lets do that to make sure. If the tools are already on your system, you will get a prompt in your terminal saying they are already installed. Tcl/Tk are some tools used to build your app Scid. They are GUI tools needed for that app to give you a user interface.

Code: Select all
sudo apt-get install tcl8.5-dev tk8.5-dev


To see if we have a C++ compiler installed, we will run the code below. GCC is a complier I use. It should be installed by default. If it is not you will have to install it from the apt-get using the install command. The below code should bring up in the terminal to show you if GCC is installed. The link for this compiler is at this site. http://gcc.gnu.org/

Code: Select all
gcc -v


If not installed lets get it with this code here.

Code: Select all
 sudo apt-get update && sudo apt-get install gcc


~~~~~~~~~~~~~~~~~~~~~~~~~~~`

Now if you try to compile your app "SCID" before getting those tcl/tk tools and modifying your configure file for SCID, you will get errors, because the author did not update his included configure file to work on 64 bit linux machines. You will get errors saying tcl/tk is not found and other errors saying "Location of X11 library: not found. " BUT we have X11 on our machine !! its just not in the right path for the configure file to see it though for SCID. To see if X11 is installed it should be in the /usr/lib/x86_64-linux-gnu PATH. If it is not installed we can get that package too through the apt-get if you need it. "X11" is a window system you will need for your app to come up inside of a window environment on your linux machine. X11 should be installed by default for Linux Mint 14.1 or ubuntu 12.10, as this windows system is used for other programs and apps you will want to install. If it is not use the code below.

Code: Select all
sudo apt-get install libx11-dev


~~~~~~~~~~~~~~~~~

Next lets modify our PATH variable inside of the configure file for SCID that was extracted inside of the "scid" folder earlier inside of your home folder where we extracted it. It will be named "configure." Open up that file with a text editor. We are now going to modify the configure file to find the X11 path variable since by default for 64 bit linux machines its saved to a different path. Mine was at the location /usr/lib/x86_64-linux-gnu. Check and make sure this is the correct path for you by copy pasting that path variable inside of your terminal. It should say "is a directory." Remember to save your changes below by saving the changes in your text editor upon exiting out. The code lines below will help you find the right lines to modify.

Open up the "configure" file for SCID and now go down to lines 210-217. You should see something like this in your configure script for this app.

Code: Select all
 # x11Path: List of common locations of the X11 library files.
    set x11Path {
        /usr/lib
        /usr/X11/lib
        /usr/X11R6/lib
        /usr/local/X11/lib
        /usr/local/X11R6/lib
        /usr/X/lib
        /usr/local/X/lib
        /usr/openwin/lib
    }


Now lets rewrite that path variable to include our new path like this.

Code: Select all
 # x11Path: List of common locations of the X11 library files.
    set x11Path {
        /usr/lib/x86_64-linux-gnu
        /usr/lib
        /usr/X11/lib
        /usr/X11R6/lib
        /usr/local/X11/lib
        /usr/local/X11R6/lib
        /usr/X/lib
        /usr/local/X/lib
        /usr/openwin/lib
    }


NOW this app should build for us! :) Just copy paste that path variable in there to include /usr/lib/x86_64-linux-gnu.

Lets use the cd command to "mount" that file we extracted earlier. Mine was extracted into the /home/meteorrock/scid directory.

Code: Select all
cd /home/meteorrock/scid


Or use your own file directory. The above is an example for those new to linux. Your path varaible will be different than mine, unless you named your computer after my user-name in here lol.

~~~~~~~~~~~~~~~~

To finish building this app we can now run some commands in the terminal. I will list them here for you. Lets configure and build this app to the /usr/local/bin/ so it can get other files this app might need to run properly.

Code: Select all
 ./configure BINDIR=/usr/local/bin


Now for the best of the commands to build this app.

Code: Select all
sudo make install


The command "BINDIR=/usr/local/bin" puts this app or program in that file for you. The "./ configure" makes the makefile for this app to run. You should see code flying up in your terminal now building this app from the tarball source. KOOLNESS. Your hacking now bro. :D

To run this app SCID for later press Alt+F2, type scid and press enter.

Enjoy. As always, my work is free to distribute and change. No permissions needed. Feel free to plug this work anywhere and everywhere on the internet. 8)

Image ........................................ Image
meteorrock
Level 3
Level 3
 
Posts: 122
Joined: Tue Jan 08, 2013 2:24 am

Linux Mint is funded by ads and donations.
 

Re: [Howto][Hacks] Build Scid chessgame from Tarball for 64

Postby Jonathan Taylor on Mon Mar 18, 2013 12:04 am

Hi, thanks for this tutorial!

I'm new to Linux Mint and Linux in general.

I'm trying to install Scid, but on a 32 bit system. When I run ./configure I get the can't find X11 files error. For my installation, those files are in the /usr/lib file path. I've tried editing the makefile and may not be editing it in the right spot. Any help would be appreciated!

Thanks!
Jonathan Taylor
Level 1
Level 1
 
Posts: 1
Joined: Mon Mar 18, 2013 12:00 am


Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 13 guests