<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://studioware.com/wikislax/index.php?action=history&amp;feed=atom&amp;title=Compiling_from_Source</id>
		<title>Compiling from Source - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://studioware.com/wikislax/index.php?action=history&amp;feed=atom&amp;title=Compiling_from_Source"/>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_from_Source&amp;action=history"/>
		<updated>2026-05-07T15:09:51Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.2</generator>

	<entry>
		<id>http://studioware.com/wikislax/index.php?title=Compiling_from_Source&amp;diff=18&amp;oldid=prev</id>
		<title>Wikislax: Created page with &quot;{{RightTOC}}  == Why do this ? ==  Linux distributions come with binaries of lots of software, however there are some reasons why we sometimes want to install from source :  *...&quot;</title>
		<link rel="alternate" type="text/html" href="http://studioware.com/wikislax/index.php?title=Compiling_from_Source&amp;diff=18&amp;oldid=prev"/>
				<updated>2017-12-06T21:25:24Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{RightTOC}}  == Why do this ? ==  Linux distributions come with binaries of lots of software, however there are some reasons why we sometimes want to install from source :  *...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{RightTOC}}&lt;br /&gt;
&lt;br /&gt;
== Why do this ? ==&lt;br /&gt;
&lt;br /&gt;
Linux distributions come with binaries of lots of software, however there are some reasons why we sometimes want to install from source :&lt;br /&gt;
&lt;br /&gt;
* The software needed is not included in the distribution&lt;br /&gt;
* The software needed is not available in the [https://slackbuilds.org/ Slackbuilds] repository&lt;br /&gt;
* We want to fit the software compile-options to the '''exact''' needs of our site&lt;br /&gt;
* A newer bug-fixing or security-fixing version of the software needs to be applied promptly&lt;br /&gt;
* The software is not installed in the standard '''/usr''' file structure where some other software would expect it to be&lt;br /&gt;
&lt;br /&gt;
Compiling software from source is often simple, however when the software is complex or has many options, can require some additional knowledge to choose the right options. The usual steps are :&lt;br /&gt;
&lt;br /&gt;
* Locate the source package (google…) and download it&lt;br /&gt;
* Uncompress the tarball (compressed file) under '''/usr/local'''&lt;br /&gt;
* Set up correct ownership and access rights on the file structure&lt;br /&gt;
* Go to the software directory and read the '''README''' and '''INSTALL''' files&lt;br /&gt;
* Check the options using '''./configure --help | less'''&lt;br /&gt;
* Configure the package to your system specific needs running the '''./configure script''', that automatically checks your system to produce all the required '''Makefiles'''. This is the step that sometimes might have many options&lt;br /&gt;
* '''make''' and '''make install''' using the right login and permissions&lt;br /&gt;
* '''ldconfig''' to make sure any library included is taken into account&lt;br /&gt;
* Set up configuration files&lt;br /&gt;
* Use the software&lt;br /&gt;
* '''make clean''' and remove the sources (or not)&lt;br /&gt;
&lt;br /&gt;
What you usually need to type on your keyboard is something like that :&lt;br /&gt;
&lt;br /&gt;
 # tar -tvf software-x.y.z.tgz&lt;br /&gt;
 # tar -C /usr/local -xvf software-x.y.z.tgz&lt;br /&gt;
 # cd /usr/local&lt;br /&gt;
 # chown -R root:root software-x.y.z&lt;br /&gt;
 # chmod -R o-w software-x.y.z&lt;br /&gt;
 # cd software-x.y.z&lt;br /&gt;
 # vi README&lt;br /&gt;
 …&lt;br /&gt;
 # vi INSTALL&lt;br /&gt;
 …&lt;br /&gt;
 # ./configure -help | less&lt;br /&gt;
 # ./configure --libdir=/usr/local/lib64 -option1 -option2 …&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
 # make clean&lt;br /&gt;
 # ldconfig&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # rm -R software-x.y.z&lt;br /&gt;
 # cd /etc/software&lt;br /&gt;
 # vi xxx&lt;br /&gt;
 …&lt;br /&gt;
 # cd /etc/rc.d&lt;br /&gt;
 # vi rc.software&lt;br /&gt;
 # ./rc.software restart&lt;br /&gt;
&lt;br /&gt;
== 64-bits ==&lt;br /&gt;
&lt;br /&gt;
64-bits versions of Slackware store libraries in '''/lib64''' &amp;amp; '''/usr/lib64''' while 32-bits versions of Slackware store them in '''/lib''' and '''/usr/lib'''.&lt;br /&gt;
&lt;br /&gt;
Using 64-bits versions of Slackware, unless you install [http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib multilib] (which seems to break the ability to compile the Kernel BTW), it is not very important where you store local libraries and '''/usr/local/lib''' - which is the default for most gnu software - could be OK. However, to stay in line with the 64-bits Slackware standard, we will generally store the local software libraries in '''/usr/local/lib64''' using the '''-libdir''' option of '''.configure'''.&lt;br /&gt;
&lt;br /&gt;
== Access rights ==&lt;br /&gt;
&lt;br /&gt;
Software not working after installation is usually a permission issue. Keep the initial setting of '''022''' for '''umask''' in '''/etc/profile''' to make sure files are created with read access for '''other''' when installing. For software to be ran under a user other than root (cyrus imap under cyrus, spamAssassin-clamav-mimedefang under milter), '''su''' under this user after installation to make sure the software works and launch the software from the console to detect permission issues messages. The '''/var/log''' directory is another place to check for errors.&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
&lt;br /&gt;
Another major cause of software failing to work properly is missing libraries because they are searched in the wrong place - for example '''/usr/lib64''' instead of '''/usr/local/lib''' - or because they have the wrong name - for example library '''imap2007/c-client.a''' actually needs to be linked as '''imap2007/libc-client.a'''.&lt;br /&gt;
&lt;br /&gt;
== Headers ==&lt;br /&gt;
&lt;br /&gt;
Yet another type of failures - at compile time - is evolution of the underlying libraries and changes made to the .h header files. Downgrading libraries in a distribution is strongly disadvised, so your best approach will be to wait for a new compatible version of your software, to find a working version on [https://slackbuilds.org/ slackbuilds.org], to google a solution, or to contact and work with the authors of the software.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pFoot|[[Compiling the Kernel]]|[[Main Page]]|[[Compiling Xen]]}}&lt;/div&gt;</summary>
		<author><name>Wikislax</name></author>	</entry>

	</feed>