Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 14-04-2006, 11:31 AM   #1 (permalink)
In The Zone
 
Join Date: May 2004
Location: ** Hosur ** Operating System:GNU
Posts: 451
Default [WIP] Compiling and Installing from Sources [A Guide]


[WIP] Compiling Sources [A Complete Guide]

Usually for any linux applciations there are sources.
You can normally compile these souces and install on any distribution.

Most of the Applications Sources are provided as tarball's

So after getting the tarball you need to extract it...

If the tarball ends with .tar.gz then you have to extract it with command something like

Code:
tar xvzf some_application-0.1.3.tar.gz
If the tarball ends with .tar.bz2 then you have to extract it with command something like

Code:
tar xvjf some_application-0.1.3.tar.bz2

Now "some_application" will be extracted into a directory some_application-0.1.3

Now go into that directory [cd some_application-0.1.3]

Code:
./configure
This builds a new Makefile. The only generic options you are likely to use are the `--prefix' and `--exec-prefix' options. These options are used to specify the installation directory.

The default for `--prefix' is `/usr/local'. The default for `--exec-prefix' is the value used for `--prefix'.

Code:
./configure --prefix=/path
you should substitute /path with the prefix into which you want to install
the application.

After running `configure', you can build the tools by running `make'.
Code:
make
To install the tools, run `make install'.
Code:
make install
Installing the tools will copy the programs and any required support files to the installation directory. The location of the installation directory is controlled by `configure' options


To Summarize...

a) Extract the tarball
b) ./configure --prefix=/path
c) make
d) su
e) make install



Usually there will be a file named "INSTALL" in the directory. Read that first.

This should install the required application...



Some things to know...

Environment Variables

To list the current values of all environment variables, issue the command

Code:
env

PKG_CONFIG_PATH

A colon-separated (on Windows, semicolon-separated) list of directories to search for .pc files. The default directory will always be searched after searching the path; the default is libdir/pkgconfig:datadir/pkgconfig where libdir is the libdir where pkg-config and datadir is the datadir where pkg-config was installed.


LD_LIBRARY_PATH

The LD_LIBRARY_PATH environment variable contains a colon-separated list of directories in which the linker will search for library (.a) files.


[WIP]

Plz do comment on this for any changes and additions to make this a better guide.
TO DO: Common errors while Compiling and Installing..
-- NC --

Edited: Should be SU while installing | Thanks to desertwind
__________________
Million's Of Open Minds Can't Be Wrong!
http://nc.xmgfree.com/weblog
Everybody Wants to go to Heaven...But nobody wants to Die! :wink:
naveenchandran is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 14-04-2006, 11:57 AM   #2 (permalink)
Wise Old Owl
 
desertwind's Avatar
 
Join Date: Nov 2004
Location: Hyderabad
Posts: 1,096
Default

Naveen, good guide for newbies. One correction.

You need to root before installation of package, so the procedure is as follows.

a) Extract the tarball
b) ./configure --prefix=/path
c) make
d) su
give root password
d) make install

Also I suggest to use sourceinstall for installing from source for newbies. It is a GTK2 tool which provides a better way to manage configure options, directories and environment variables. Using it you can install, upgrade or remove a package.

Two screeshots attached.



__________________
Sometime you'll think you understand everything

...Then you'll regain consciousness
desertwind is offline  
Old 14-04-2006, 01:17 PM   #3 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default

hmm...desertwind..there already is Checkinstall which will make .rpm .deb or any such for easy install.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by topgear

Advertisement




All times are GMT +5.5. The time now is 08:40 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2