bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] Building GNUBG on Debian based systems


From: Michael Petch
Subject: [Bug-gnubg] Building GNUBG on Debian based systems
Date: Thu, 16 Jun 2011 18:19:15 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

Howdy,

This applies specifically to Debian based systems, although the portion starting from creating the build directory should apply in most *nix environments.

First one must get all the pre-requisites to build GNUBG.  If using Ubuntu/Kubuntu or other Ubuntu derivatives issue this command (You will be prompted for the root password)

sudo apt-get build-dep gnubg
sudo apt-get install cvs

On other Debian systems where sudo usage isn't the default usage pattern, you have to log in as root first OR issue the command:
su -                        (you will be prompted for the root password)

then:

apt-get build-dep gnubg
apt-get install cvs

Once you have all the build dependencies you can build as a normal unprivileged user or root. To do so create a directory to perform builds under. For instance to build in your home account under a directory called "builds" you can issue this command:

cd ~
mkdir builds
cd builds

Once you change into the "builds" (cd builds) directory you want to pull out all the latest code from the CVS repository. That can easily be accomplished with this task:

cvs -z3 -d:pserver:address@hidden:/sources/gnubg co gnubg

It may take a little while to take out all the latest code (depending on connection speed). Once completed you will now see that a new subdirectory exists called "gnubg"

change into the gnubg subdirectory with:

cd gnubg

Okay, we are now ready to setup the build environment. First thing after pulling files out of CVS is to issue this command:

./autogen.sh

This command only really needs to be done after you have just pulled from CVS. Next we need to configure GNUBG to build on our system. We do so with this command:

CFLAGS="-O3" ./configure

This command has recently been defaulted to build thread-enabled code (allow multiple processors to be used by GNUBG), should auto detect SSE/SSE2 now, and if you did the apt-get's above all the libraries needed for 3D Board Support should also enable 3D support by default. In the past ./configure usually required other parameters. The CFLAGS bit is optional but this uses more aggressive optimizations. You can configure with standard settings (if you so desire - although i recommend the version above) with:

./configure

Issuing configure will cause a bunch of lines to fly past, and usually the last line on a successful configure will be "config.status: executing default-1 commands"

Okay now you can make the code with the configured environment:

make

If there are no errors it should spend time building the bearoff databases the first time things are made with "make". Okay, well one last step. You can install a successful build with this (you will need root privs for this to be successful) that cna be used by all users on the system:

If using Ubuntu/Kubuntu or other Ubuntu derivatives issue this command (You may be prompted for the root password)

sudo make install

On other Debian systems where sudo usage isn't the default usage pattern, you have to log in as root first OR issue the command:
su -                        (you will be prompted for the root password)

then

make install

Okay, a normal ./configure process puts GNUBG under /usr/local . This means the GNUBG executable is  /usr/local/bin/gnubg . From the command line you can issue:

/usr/local/bin/gnubg

The /usr/local directory will not interfere with other Debian software. So this will not overwrite the Ubuntu/Kubuntu/Debian version that is installed by apt/synaptic or aptitude. You can create a short cut on your desktop that launches with this command:

/usr/local/bin/gnubg -w

The "-w" is usually important when running from the desktop so that it suppresses the terminal output. Failure to do this with desktop/menu shortcuts can lead to GNUBG not loading properly.

If people run into problems I can always be contacted directly at address@hidden for assistance.

-- 
Michael Petch
CApp::Sysware Consulting Ltd.
OpenPGP FingerPrint=D81C 6A0D 987E 7DA5 3219 6715 466A 2ACE 5CAE 3304

reply via email to

[Prev in Thread] Current Thread [Next in Thread]