<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>One hand clapping &#187; Linux</title>
	<atom:link href="http://warped.org/blog/category/tech/linux-tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://warped.org/blog</link>
	<description>Max Baker -- A Man with a Hand</description>
	<lastBuildDate>Mon, 10 May 2010 03:26:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ch0wned &#8211; Adding  Open Office 3.x and Java on EL4 for X86_64 in your homedir</title>
		<link>http://warped.org/blog/2010/04/07/ch0wned-adding-open-office-3-x-and-java-on-el4-for-x86_64-in-your-homedir/</link>
		<comments>http://warped.org/blog/2010/04/07/ch0wned-adding-open-office-3-x-and-java-on-el4-for-x86_64-in-your-homedir/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 17:11:52 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ch0wned]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open office]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=132</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a Linux user and don't have root access. 

Intro

Continuing my install series, here&#8217;s how you get OpenOffice 3 and Java w/ the Browser plugin working out of your homedirectory on an old linux install (EL4) without root access.  I assume you already have a working [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a Linux user and don't have root access. </tt>
</p>
<h1>Intro</h1>
<p>
Continuing my install series, here&#8217;s how you get OpenOffice 3 and Java w/ the Browser plugin working out of your homedirectory on an old linux install (EL4) without root access.  I assume you already have <a href="http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/">a working 64-bit firefox compiled</a>.
</p>
<p>
This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.
</p>
<h1>Downloads</h1>
<ul>
<li>OOo_3.2.0_LinuxX86-64_install_wJRE_en-US.tar.gz</li>
<li>jdk-6u19-linux-x64.bin</li>
</ul>
<h1>Building</h1>
<ol>
<li>Open Office
<p>
After unpackaging open office run ./setup in the directory it creates.  Select $HOME/share/oo-3.2 as a destination and now you will run into your first error:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> error: can<span style="color: #ff0000;">'t create transaction lock on /var/lock/rpm/transaction</span></pre></div></div>

<p>This is due to a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=222194">janky version of RPM that comes with EL4 and maybe EL5</a>.  Create the file ~/.rpmmacros with the following line :</p>

<div class="wp_syntax"><div class="code"><pre class="spec" style="font-family:monospace;">%_rpmlock_path %{_dbpath}/__db.000</pre></div></div>

<p>Now go run ./setup again.  Choose Advanced, uncheck &#8220;Gnome Integration&#8221;.  Here you will run into the second error :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Package Name: ooobasis3.2-core04-3.2.0-9483.x86_64.rpm 
&nbsp;
rpm <span style="color: #660033;">--upgrade</span> <span style="color: #660033;">--ignoresize</span> <span style="color: #660033;">-vh</span> <span style="color: #660033;">--relocate</span> <span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">opt</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>oo <span style="color: #660033;">--dbpath</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>oo<span style="color: #000000; font-weight: bold;">/</span>.RPM_OFFICE_DATABASE OOO320_m12_native_packed-<span style="color: #000000;">1</span>_en-US.9483<span style="color: #000000; font-weight: bold;">/</span>RPMS<span style="color: #000000; font-weight: bold;">/</span>ooobasis3.2-core04-3.2.0-9483.x86_64.rpm 
Returns: <span style="color: #000000;">1</span> 
Error during installation  
error: Failed dependencies: libfreetype.so.6<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>64bit<span style="color: #7a0874; font-weight: bold;">&#41;</span> is needed by ooobasis3.2-core04-3.2.0-9483.x86_64</pre></div></div>

<p>But since we know we already have this dependency installed in from my previous ch0wned post in $HOME, we can work around this.  Create a file $HOME/bin/rpm that will override this for the time being:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>rpm <span style="color: #660033;">--nodeps</span> <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>

<p>And now you can re-run setup a 3rd time, select advanced, deselect gnome integration and GO.  Last step is to create some symlinks to the sbase / scalc / sdraw / swriter / smath / soffice executables in your $HOME/bin directory.   You may need to create a small wrapper that calls them with run_gapp.  Be sure to remove that $HOME/bin/rpm script when you&#8217;re done.
</p>
</li>
<li>Java x86_64 w/ Firefox Plugin
<p>
Download the .bin copy of the JDK.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x jdk<span style="color: #000000; font-weight: bold;">*</span>
.<span style="color: #000000; font-weight: bold;">/</span>jdk<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> jdk<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>share 
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>jdk<span style="color: #000000; font-weight: bold;">*/</span>bin<span style="color: #000000; font-weight: bold;">/</span>j<span style="color: #000000; font-weight: bold;">*</span> .</pre></div></div>

<p>Now for the browser plugin part</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>.mozilla<span style="color: #000000; font-weight: bold;">/</span>plugins
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> ~<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>jdk<span style="color: #000000; font-weight: bold;">*/</span>jre<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>amd64<span style="color: #000000; font-weight: bold;">/</span>libnpjp2.so .</pre></div></div>

<p>Restart your browser and go to &#8220;about:plugins&#8221; et viola.
</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/07/ch0wned-adding-open-office-3-x-and-java-on-el4-for-x86_64-in-your-homedir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ch0wned &#8211; Building your own Thunderbird 3 on EL4 for X86_64 in your homedir</title>
		<link>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-thunderbird-3-on-el4-for-x86_64-in-your-homedir/</link>
		<comments>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-thunderbird-3-on-el4-for-x86_64-in-your-homedir/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 23:47:04 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ch0wned]]></category>
		<category><![CDATA[thunderbird]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=128</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a Linux user and don't have root access. 
Intro
Having just gone through my guide on installing Firefox now you&#8217;re ready to do basically the same thing for Thunderbird.


This guide assumes you&#8217;re leaving off from my previous post : http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/  where you&#8217;ve setup a script called [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a Linux user and don't have root access. </tt></p>
<h1>Intro</h1>
<p>Having just gone through my <a href="http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/">guide on installing Firefox</a> now you&#8217;re ready to do basically the same thing for Thunderbird.
</p>
<p>
This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.
</p>
<h1>Prerequisites</h1>
<ul>
<li>firefox-3.6.2.source.tar.bz2 </li>
<li>nss-3.12.6-with-nspr-4.8.4.tar.gz</li>
<li>sqlite-amalgamation-3.6.23.1.tar.gz</li>
<li>Python-2.5.5.tar.bz2</li>
<li><a href="http://www.linuxfromscratch.org/blfs/view/svn/general/nspr.html">NSPR Patch from Standalone Linux</a> (READ THIS!)</li>
<li><a href="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/nss.html">NSS Patch from Standalone Linux</a> (READ THIS!)</li>
<li>My Patch for OSS</li>
</ul>
<h2>Building</h2>
<p>Follow <a href="http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/">my guide on installing Firefox</a> for all the prereqs.</p>
<h1>Thunderbird 3.0 Building</h1>
<h2>Configuring</h2>
<p>Make a file called mozconfig-tbird</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mk_add_options <span style="color: #007800;">MOZ_OBJDIR</span>=<span style="color: #000000; font-weight: bold;">@</span>TOPSRCDIR<span style="color: #000000; font-weight: bold;">@/</span>objdir-tb-release
mk_add_options <span style="color: #007800;">MOZ_MAKE_FLAGS</span>=<span style="color: #ff0000;">&quot;-j4&quot;</span>
&nbsp;
ac_add_options <span style="color: #660033;">--enable-application</span>=mail
ac_add_options <span style="color: #660033;">--enable-official-branding</span>
ac_add_options <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>thunderbird
<span style="color: #666666; font-style: italic;"># required for make package for tbird now?</span>
ac_add_options <span style="color: #660033;">--enable-static</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Optimization</span>
ac_add_options <span style="color: #660033;">--disable-tests</span>
ac_add_options <span style="color: #660033;">--disable-debug</span>
ac_add_options <span style="color: #660033;">--enable-optimize</span>=<span style="color: #ff0000;">&quot;-O2 -funroll-loops -fexpensive-optimizations&quot;</span>
ac_add_options <span style="color: #660033;">--enable-strip</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Features</span>
ac_add_options <span style="color: #660033;">--disable-accessibility</span>
ac_add_options <span style="color: #660033;">--disable-updater</span>
ac_add_options <span style="color: #660033;">--disable-installer</span>
<span style="color: #666666; font-style: italic;">#ac_add_options --enable-safe-browsing</span>
ac_add_options <span style="color: #660033;">--enable-xinerama</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Libraries / Dependencies</span>
ac_add_options <span style="color: #660033;">--disable-libnotify</span>
ac_add_options <span style="color: #660033;">--disable-gnomevfs</span>
ac_add_options <span style="color: #660033;">--enable-default-toolkit</span>=cairo-gtk2
ac_add_options <span style="color: #660033;">--enable-system-cairo</span>
ac_add_options <span style="color: #660033;">--with-system-nss</span>
ac_add_options <span style="color: #660033;">--with-nss-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
ac_add_options <span style="color: #660033;">--with-system-nspr</span>
ac_add_options <span style="color: #660033;">--with-nspr-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
ac_add_options <span style="color: #660033;">--enable-system-sqlite</span></pre></div></div>

<h2>Building</h2>
<p>I had to patch firefox to use OSS instead of ALSA because EL4 doesn&#8217;t have a working ALSA by default.  If you have ALSA working, you may not have to do this step.  I got the guts of this patch from somewhere, but I can&#8217;t find it now, thanks whoever you are!</p>
<p>
The patch is on my build firefox page referenced above.
</p>
<p>The following is a fork of my config_gapp script.  There are some tricky bits because I&#8217;ve left off some -L&#8217;s to avoid the NSS and NSPR libs that are installed in /usr/lib64.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">LOCAL_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss -I/usr/X11R6/include <span style="color: #007800;">$CPPFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss -I/usr/X11R6/include <span style="color: #007800;">$CFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CXXFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss  -I/usr/X11R6/include  <span style="color: #007800;">$CXXFLAGS</span>&quot;</span>
<span style="color: #666666; font-style: italic;">#export LDFLAGS=&quot;-L$LOCAL_HOME/lib -L/usr/lib64 -L/usr/X11R6/lib64 $LDFLAGS&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LDFLAGS</span>=<span style="color: #ff0000;">&quot;-L<span style="color: #007800;">$LOCAL_HOME</span>/lib -L/usr/X11R6/lib64 <span style="color: #007800;">$LDFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pkg-config
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib/pkgconfig:/usr/lib64/pkgconfig:<span style="color: #007800;">$PKG_CONFIG_PATH</span>&quot;</span>
<span style="color: #666666; font-style: italic;">#export LD_LIBRARY_PATH=&quot;$LOCAL_HOME/lib:/usr/X11R6/lib64:/usr/lib64&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib:/usr/X11R6/lib64&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># NOTE: I had to hardcode the path for some reason</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">MOZCONFIG</span>=<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>mozconfig-tbird
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-j</span> <span style="color: #000000;">4</span> <span style="color: #660033;">-f</span> client.mk build 
&nbsp;
<span style="color: #666666; font-style: italic;"># make package</span>
<span style="color: #666666; font-style: italic;"># look in dist/*.tar.bz2</span></pre></div></div>

<h2>Installing</h2>
<p>First you make a .tar.bz2, then you go install it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> objdir-tb-release
<span style="color: #c20cb9; font-weight: bold;">make</span> package
<span style="color: #c20cb9; font-weight: bold;">cp</span> mozilla<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/*</span>.tar.bz2 <span style="color: #000000; font-weight: bold;">/</span>somewhere
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>share
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvfj <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>that<span style="color: #000000; font-weight: bold;">/*</span>.tar.bz2</pre></div></div>

<p>Now make a wrapper script $HOME/bin/thunderbird :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> run_gapp <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>thunderbird<span style="color: #000000; font-weight: bold;">/</span>thunderbird <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>

<h2>Errors</h2>
<p>Here are some of the error messages I encountered along the way that were solved w/ the prerequisites and patch.  Hopefully this helps future googlers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">nsUrlClassifierDBService.cpp:<span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x678<span style="color: #7a0874; font-weight: bold;">&#41;</span>: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>inflateInit_<span style="color: #ff0000;">'
nsUrlClassifierDBService.cpp:(.text+0x69c): undefined reference to `inflate'</span>
nsUrlClassifierDBService.cpp:<span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x6d4<span style="color: #7a0874; font-weight: bold;">&#41;</span>: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>inflateEnd<span style="color: #ff0000;">'</span></pre></div></div>

<p>Changed thunderbird-3.0.4/objdir-tb-release/mozilla/toolkit/components/build/Makefile to add libz to the compile.  I&#8217;m sure there&#8217;s a classier way of doing this.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EXTRA_DSO_LDOPTS += \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>LIBS_DIR<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>EXTRA_DSO_LIBS<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>MOZ_UNICHARUTIL_LIBS<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>MOZ_COMPONENT_LIBS<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>MOZ_JS_LIBS<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>NULL<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    <span style="color: #660033;">-lz</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>thunderbird-3.0.4<span style="color: #000000; font-weight: bold;">/</span>directory<span style="color: #000000; font-weight: bold;">/</span>c-sdk<span style="color: #000000; font-weight: bold;">/</span>ldap<span style="color: #000000; font-weight: bold;">/</span>libraries<span style="color: #000000; font-weight: bold;">/</span>libprldap<span style="color: #000000; font-weight: bold;">/</span>ldappr-public.c:<span style="color: #000000;">45</span>:<span style="color: #000000;">27</span>: <span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nss<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>pprio.h: Permission denied</pre></div></div>

<p>Fix yer permissions. duh.  </p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-thunderbird-3-on-el4-for-x86_64-in-your-homedir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ch0wned &#8211; Building your own Firefox on EL4 for X86_64 in your homedir</title>
		<link>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/</link>
		<comments>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 22:45:10 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=91</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a Linux user and don't have root access. 
Intro
So you want Firefox 3.new on your EL4 workstation and don&#8217;t have root access?  Worse off it&#8217;s an x86_64 machine?   This is not for the faint of heart, and you will run into some snags, [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a Linux user and don't have root access. </tt></p>
<h1>Intro</h1>
<p>So you want Firefox 3.new on your EL4 workstation and don&#8217;t have root access?  Worse off it&#8217;s an x86_64 machine?   This is not for the faint of heart, and you will run into some snags, but hopefully with my help you can make it work.</p>
<p>
This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.
</p>
<h1>Prerequisites</h1>
<ul>
<li>firefox-3.6.2.source.tar.bz2 </li>
<li>nss-3.12.6-with-nspr-4.8.4.tar.gz</li>
<li>sqlite-amalgamation-3.6.23.1.tar.gz</li>
<li>Python-2.5.5.tar.bz2</li>
<li><a href="http://www.linuxfromscratch.org/blfs/view/svn/general/nspr.html">NSPR Patch from Standalone Linux</a> (READ THIS!)</li>
<li><a href="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/nss.html">NSS Patch from Standalone Linux</a> (READ THIS!)</li>
<li>My Patches</li>
</ul>
<h2>Building</h2>
<ol>
<li>SQL Lite
<p>Make sure you get the &#8220;amalgamation&#8221; package.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</p>
</li>
<li>NSPR
<p>Cheers to the Linux from Scratch gurus.  See above link.<br />
Apply this patch using &#8220;patch -p1 < file.patch" .  You might have to change 1 to another number.  I did this on the above newer version of NSPR/NSS w/out a problem.
</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">Submitted By: DJ Lucas <span style="">&#40;</span>dj at linuxfromscratch dot org<span style="">&#41;</span>
Date: <span style="">2009</span>-08-<span style="">28</span>
Initial Package Version: <span style="">4.8</span>
Upstream Status: not applicable
Origin: self
Description: Adds pkg-config file for nspr.
&nbsp;
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/config.mk nspr-<span style="">4.8</span>/mozilla/nsprpub/config/config.mk
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/config.mk	<span style="">2005</span>-04-<span style="">29</span> <span style="">16</span>:02:<span style="">53.000000000</span> -0500</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/config/config.mk	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">162</span>,<span style="">3</span> +<span style="">162</span>,<span style="">4</span> @@</span>
 RELEASE_INCLUDE_DIR = $<span style="">&#40;</span>RELEASE_DIR<span style="">&#41;</span>/$<span style="">&#40;</span>BUILD_NUMBER<span style="">&#41;</span>/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span>/include
 RELEASE_BIN_DIR = $<span style="">&#40;</span>RELEASE_DIR<span style="">&#41;</span>/$<span style="">&#40;</span>BUILD_NUMBER<span style="">&#41;</span>/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span>/bin
 RELEASE_LIB_DIR = $<span style="">&#40;</span>RELEASE_DIR<span style="">&#41;</span>/$<span style="">&#40;</span>BUILD_NUMBER<span style="">&#41;</span>/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span>/lib
<span style="color: #00b000;">+RELEASE_PC_DIR = $<span style="">&#40;</span>RELEASE_LIB_DIR<span style="">&#41;</span>/pkgconfig</span>
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/Makefile.in nspr-<span style="">4.8</span>/mozilla/nsprpub/config/Makefile.in
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/Makefile.in	<span style="">2009</span>-03-03 <span style="">16</span>:04:<span style="">23.000000000</span> -0600</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/config/Makefile.in	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">52</span>,<span style="">9</span> +<span style="">52</span>,<span style="">10</span> @@</span>
&nbsp;
 # autoconf.mk must be deleted last <span style="">&#40;</span>from the top-level directory<span style="">&#41;</span>
 # because it is included by every makefile.
<span style="color: #991111;">-DIST_GARBAGE	= nsprincl.mk nsprincl.sh nspr-config</span>
<span style="color: #00b000;">+DIST_GARBAGE	= nsprincl.mk nsprincl.sh nspr-config nspr.pc</span>
&nbsp;
 RELEASE_BINS	= nspr-config
<span style="color: #00b000;">+RELEASE_PC	= nspr.pc</span>
&nbsp;
 include $<span style="">&#40;</span>topsrcdir<span style="">&#41;</span>/config/config.mk
&nbsp;
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/nspr.pc.in nspr-<span style="">4.8</span>/mozilla/nsprpub/config/nspr.pc.in
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/nspr.pc.in	<span style="">1969</span>-<span style="">12</span>-<span style="">31</span> <span style="">18</span>:00:<span style="">00.000000000</span> -0600</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/config/nspr.pc.in	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">43</span>:<span style="">13.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">0</span>,<span style="">0</span> +<span style="">1</span>,<span style="">11</span> @@</span>
<span style="color: #00b000;">+prefix=@prefix@</span>
<span style="color: #00b000;">+exec_prefix=@exec_prefix@</span>
<span style="color: #00b000;">+libdir=@libdir@</span>
<span style="color: #00b000;">+includedir=@includedir@</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+Name: NSPR</span>
<span style="color: #00b000;">+Description: The Netscape Portable Runtime</span>
<span style="color: #00b000;">+Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@</span>
<span style="color: #00b000;">+Libs: -L$<span style="">&#123;</span>libdir<span style="">&#125;</span> -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ -lpthread </span>
<span style="color: #00b000;">+Cflags: -I$<span style="">&#123;</span>includedir<span style="">&#125;</span></span>
<span style="color: #00b000;">+</span>
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/rules.mk nspr-<span style="">4.8</span>/mozilla/nsprpub/config/rules.mk
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/rules.mk	<span style="">2009</span>-05-01 <span style="">18</span>:08:<span style="">01.000000000</span> -0500</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/config/rules.mk	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">211</span>,<span style="">7</span> +<span style="">211</span>,<span style="">7</span> @@</span>
 	rm -rf $<span style="">&#40;</span>wildcard *.OBJ *.OBJD<span style="">&#41;</span> dist $<span style="">&#40;</span>ALL_TRASH<span style="">&#41;</span> $<span style="">&#40;</span>DIST_GARBAGE<span style="">&#41;</span>
 	+$<span style="">&#40;</span>LOOP_OVER_DIRS<span style="">&#41;</span>
&nbsp;
<span style="color: #991111;">-install:: $<span style="">&#40;</span>RELEASE_BINS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_HEADERS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_LIBS<span style="">&#41;</span></span>
<span style="color: #00b000;">+install:: $<span style="">&#40;</span>RELEASE_BINS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_HEADERS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_LIBS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_PC<span style="">&#41;</span></span>
 ifdef RELEASE_BINS
 	$<span style="">&#40;</span>NSINSTALL<span style="">&#41;</span> -t -m 0755 $<span style="">&#40;</span>RELEASE_BINS<span style="">&#41;</span> $<span style="">&#40;</span>DESTDIR<span style="">&#41;</span>$<span style="">&#40;</span>bindir<span style="">&#41;</span>
 endif
<span style="color: #440088;">@@ -<span style="">221</span>,<span style="">6</span> +<span style="">221</span>,<span style="">9</span> @@</span>
 ifdef RELEASE_LIBS
 	$<span style="">&#40;</span>NSINSTALL<span style="">&#41;</span> -t -m 0755 $<span style="">&#40;</span>RELEASE_LIBS<span style="">&#41;</span> $<span style="">&#40;</span>DESTDIR<span style="">&#41;</span>$<span style="">&#40;</span>libdir<span style="">&#41;</span>/$<span style="">&#40;</span>lib_subdir<span style="">&#41;</span>
 endif
<span style="color: #00b000;">+ifdef RELEASE_PC</span>
<span style="color: #00b000;">+	$<span style="">&#40;</span>NSINSTALL<span style="">&#41;</span> -t -m 0644 $<span style="">&#40;</span>RELEASE_PC<span style="">&#41;</span> $<span style="">&#40;</span>DESTDIR<span style="">&#41;</span>$<span style="">&#40;</span>libdir<span style="">&#41;</span>/pkgconfig/</span>
<span style="color: #00b000;">+endif</span>
 	+$<span style="">&#40;</span>LOOP_OVER_DIRS<span style="">&#41;</span>
&nbsp;
 release:: export
<span style="color: #440088;">@@ -<span style="">272</span>,<span style="">6</span> +<span style="">275</span>,<span style="">23</span> @@</span>
 	fi
 	cp $<span style="">&#40;</span>RELEASE_HEADERS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_HEADERS_DEST<span style="">&#41;</span>
 endif
<span style="color: #00b000;">+ifdef RELEASE_PC</span>
<span style="color: #00b000;">+	@echo &quot;Copying pkg-config files to release directory&quot;</span>
<span style="color: #00b000;">+	@if test -z &quot;$<span style="">&#40;</span>BUILD_NUMBER<span style="">&#41;</span>&quot;; then \</span>
<span style="color: #00b000;">+		echo &quot;BUILD_NUMBER must be defined&quot;; \</span>
<span style="color: #00b000;">+		false; \</span>
<span style="color: #00b000;">+	else \</span>
<span style="color: #00b000;">+		true; \</span>
<span style="color: #00b000;">+	fi</span>
<span style="color: #00b000;">+	@if test ! -d $<span style="">&#40;</span>RELEASE_PC_DEST<span style="">&#41;</span>; then \</span>
<span style="color: #00b000;">+		rm -rf $<span style="">&#40;</span>RELEASE_PC_DEST<span style="">&#41;</span>; \</span>
<span style="color: #00b000;">+		$<span style="">&#40;</span>NSINSTALL<span style="">&#41;</span> -D $<span style="">&#40;</span>RELEASE_PC_DEST<span style="">&#41;</span>;\</span>
<span style="color: #00b000;">+	else \</span>
<span style="color: #00b000;">+		true; \</span>
<span style="color: #00b000;">+	fi</span>
<span style="color: #00b000;">+	cp $<span style="">&#40;</span>RELEASE_PC<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_PC_DEST<span style="">&#41;</span></span>
<span style="color: #00b000;">+endif</span>
<span style="color: #00b000;">+</span>
 	+$<span style="">&#40;</span>LOOP_OVER_DIRS<span style="">&#41;</span>
&nbsp;
 alltags:
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/configure nspr-<span style="">4.8</span>/mozilla/nsprpub/configure
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/configure	<span style="">2009</span>-05-08 08:<span style="">12</span>:<span style="">31.000000000</span> -0500</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/configure	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">6037</span>,<span style="">6</span> +<span style="">6037</span>,<span style="">7</span> @@</span>
 config/nsprincl.mk
 config/nsprincl.sh
 config/nspr-config
<span style="color: #00b000;">+config/nspr.pc</span>
 lib/Makefile 
 lib/ds/Makefile 
 lib/libc/Makefile 
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/configure.in nspr-<span style="">4.8</span>/mozilla/nsprpub/configure.in
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/configure.in	<span style="">2009</span>-05-01 <span style="">18</span>:08:<span style="">00.000000000</span> -0500</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/configure.in	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">2871</span>,<span style="">6</span> +<span style="">2871</span>,<span style="">7</span> @@</span>
 config/nsprincl.mk
 config/nsprincl.sh
 config/nspr-config
<span style="color: #00b000;">+config/nspr.pc</span>
 lib/Makefile 
 lib/ds/Makefile 
 lib/libc/Makefile</pre></div></div>

</p>
<p>Once patched, run this script to configure and build NSPR</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh </span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> mozilla<span style="color: #000000; font-weight: bold;">/</span>nsprpub
config_gapp \
            <span style="color: #660033;">--with-mozilla</span> \
            <span style="color: #660033;">--with-pthreads</span> \
            <span style="color: #660033;">--enable-64bit</span> \
            <span style="color: #660033;">--disable-debug</span> \
            <span style="color: #660033;">--enable-optimize</span>=<span style="color: #ff0000;">&quot;-O2&quot;</span>
&nbsp;
run_gapp <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-j4</span>
&nbsp;
run_gapp <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-f</span> <span style="color: #660033;">-LR</span> dist<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nspr <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>include</pre></div></div>

</li>
<li>NSS
<p>Again cheers to DJ for this gem. Apply it.</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">Submitted By: DJ Lucas <span style="">&#40;</span>dj at linuxfromscratch dot org<span style="">&#41;</span>
Date: <span style="">2009</span>-09-05
Initial Package Version: 3.12.4
Upstream Status: not applicable
Origin: self
Description: Adds auto-generated nss.pc and nss-config script, and allows
             building without nspr in the source tree.
&nbsp;
diff -Naur nss-3.12.4-orig/mozilla/security/nss/config/Makefile nss-3.12.4/mozilla/security/nss/config/Makefile
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/config/Makefile	<span style="">1969</span>-<span style="">12</span>-<span style="">31</span> <span style="">18</span>:00:<span style="">00.000000000</span> -0600</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/config/Makefile	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">15</span>:<span style="">20.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">0</span>,<span style="">0</span> +<span style="">1</span>,<span style="">40</span> @@</span>
<span style="color: #00b000;">+CORE_DEPTH = ../..</span>
<span style="color: #00b000;">+DEPTH      = ../..</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+include $<span style="">&#40;</span>CORE_DEPTH<span style="">&#41;</span>/coreconf/config.mk</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+NSS_MAJOR_VERSION = `grep &quot;NSS_VMAJOR&quot; ../lib/nss/nss.h | awk '<span style="">&#123;</span>print $$<span style="">3</span><span style="">&#125;</span>'`</span>
<span style="color: #00b000;">+NSS_MINOR_VERSION = `grep &quot;NSS_VMINOR&quot; ../lib/nss/nss.h | awk '<span style="">&#123;</span>print $$<span style="">3</span><span style="">&#125;</span>'`</span>
<span style="color: #00b000;">+NSS_PATCH_VERSION = `grep &quot;NSS_VPATCH&quot; ../lib/nss/nss.h | awk '<span style="">&#123;</span>print $$<span style="">3</span><span style="">&#125;</span>'`</span>
<span style="color: #00b000;">+PREFIX = /usr</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+all: export libs</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+export:</span>
<span style="color: #00b000;">+	# Create the nss.pc file</span>
<span style="color: #00b000;">+	mkdir -p $<span style="">&#40;</span>DIST<span style="">&#41;</span>/lib/pkgconfig</span>
<span style="color: #00b000;">+	sed -e &quot;s,@prefix@,$<span style="">&#40;</span>PREFIX<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@exec_prefix@,\$$<span style="">&#123;</span>prefix<span style="">&#125;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@libdir@,\$$<span style="">&#123;</span>prefix<span style="">&#125;</span>/lib,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@includedir@,\$$<span style="">&#123;</span>prefix<span style="">&#125;</span>/include/nss,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_MAJOR_VERSION@,$<span style="">&#40;</span>NSS_MAJOR_VERSION<span style="">&#41;</span>,g&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_MINOR_VERSION@,$<span style="">&#40;</span>NSS_MINOR_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_PATCH_VERSION@,$<span style="">&#40;</span>NSS_PATCH_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    nss.pc.in &gt; nss.pc</span>
<span style="color: #00b000;">+	chmod 0644 nss.pc</span>
<span style="color: #00b000;">+	ln -sf ../../../../security/nss/config/nss.pc $<span style="">&#40;</span>DIST<span style="">&#41;</span>/lib/pkgconfig</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+	# Create the nss-config script</span>
<span style="color: #00b000;">+	mkdir -p $<span style="">&#40;</span>DIST<span style="">&#41;</span>/bin</span>
<span style="color: #00b000;">+	sed -e &quot;s,@prefix@,$<span style="">&#40;</span>PREFIX<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_MAJOR_VERSION@,$<span style="">&#40;</span>NSS_MAJOR_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_MINOR_VERSION@,$<span style="">&#40;</span>NSS_MINOR_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_PATCH_VERSION@,$<span style="">&#40;</span>NSS_PATCH_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    nss-config.in &gt; nss-config</span>
<span style="color: #00b000;">+	chmod 0755 nss-config</span>
<span style="color: #00b000;">+	ln -sf ../../../security/nss/config/nss-config $<span style="">&#40;</span>DIST<span style="">&#41;</span>/bin</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+libs:</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+dummy: all export libs</span>
<span style="color: #00b000;">+</span>
diff -Naur nss-3.12.4-orig/mozilla/security/nss/config/nss-config.in nss-3.12.4/mozilla/security/nss/config/nss-config.in
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/config/nss-config.in	<span style="">1969</span>-<span style="">12</span>-<span style="">31</span> <span style="">18</span>:00:<span style="">00.000000000</span> -0600</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/config/nss-config.in	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">16</span>:<span style="">56.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">0</span>,<span style="">0</span> +<span style="">1</span>,<span style="">153</span> @@</span>
<span style="color: #00b000;">+#!/bin/sh</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+prefix=@prefix@</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+major_version=@NSS_MAJOR_VERSION@</span>
<span style="color: #00b000;">+minor_version=@NSS_MINOR_VERSION@</span>
<span style="color: #00b000;">+patch_version=@NSS_PATCH_VERSION@</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+usage<span style="">&#40;</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+<span style="">&#123;</span></span>
<span style="color: #00b000;">+	cat &lt; &lt;EOF</span>
<span style="color: #00b000;">+Usage: nss-config <span style="">&#91;</span>OPTIONS<span style="">&#93;</span> <span style="">&#91;</span>LIBRARIES<span style="">&#93;</span></span>
<span style="color: #00b000;">+Options:</span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--prefix<span style="">&#91;</span>=DIR<span style="">&#93;</span><span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--exec-prefix<span style="">&#91;</span>=DIR<span style="">&#93;</span><span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--includedir<span style="">&#91;</span>=DIR<span style="">&#93;</span><span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--libdir<span style="">&#91;</span>=DIR<span style="">&#93;</span><span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--version<span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--libs<span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--cflags<span style="">&#93;</span></span>
<span style="color: #00b000;">+Dynamic Libraries:</span>
<span style="color: #00b000;">+	nss</span>
<span style="color: #00b000;">+	nssutil</span>
<span style="color: #00b000;">+	smime</span>
<span style="color: #00b000;">+	ssl</span>
<span style="color: #00b000;">+	softokn</span>
<span style="color: #00b000;">+EOF</span>
<span style="color: #00b000;">+	exit $1</span>
<span style="color: #00b000;">+<span style="">&#125;</span></span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test $# -eq <span style="">0</span>; then</span>
<span style="color: #00b000;">+	usage <span style="">1</span> <span style="">1</span>&gt;&amp;2</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+lib_nss=yes</span>
<span style="color: #00b000;">+lib_nssutil=yes</span>
<span style="color: #00b000;">+lib_smime=yes</span>
<span style="color: #00b000;">+lib_ssl=yes</span>
<span style="color: #00b000;">+lib_softokn=yes</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+while test $# -gt <span style="">0</span>; do</span>
<span style="color: #00b000;">+  case &quot;$<span style="">1</span>&quot; in</span>
<span style="color: #00b000;">+  -*=*<span style="">&#41;</span> optarg=`echo &quot;$<span style="">1</span>&quot; | sed 's/<span style="">&#91;</span>-_a-zA-Z0-<span style="">9</span><span style="">&#93;</span>*=//'` ;;</span>
<span style="color: #00b000;">+  *<span style="">&#41;</span> optarg= ;;</span>
<span style="color: #00b000;">+  esac</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+  case $<span style="">1</span> in</span>
<span style="color: #00b000;">+    --prefix=*<span style="">&#41;</span></span>
<span style="color: #00b000;">+      prefix=$optarg</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --prefix<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_prefix=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --exec-prefix=*<span style="">&#41;</span></span>
<span style="color: #00b000;">+      exec_prefix=$optarg</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --exec-prefix<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_exec_prefix=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --includedir=*<span style="">&#41;</span></span>
<span style="color: #00b000;">+      includedir=$optarg</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --includedir<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_includedir=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --libdir=*<span style="">&#41;</span></span>
<span style="color: #00b000;">+      libdir=$optarg</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --libdir<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_libdir=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --version<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo $<span style="">&#123;</span>major_version<span style="">&#125;</span>.$<span style="">&#123;</span>minor_version<span style="">&#125;</span>.$<span style="">&#123;</span>patch_version<span style="">&#125;</span></span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --cflags<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_cflags=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --libs<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_libs=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    nss<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_nss=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    nssutil<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_nssutil=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    smime<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_smime=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    ssl<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_ssl=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    softokn<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_softokn=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    *<span style="">&#41;</span></span>
<span style="color: #00b000;">+      usage <span style="">1</span> <span style="">1</span>&gt;&amp;2</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+  esac</span>
<span style="color: #00b000;">+  shift</span>
<span style="color: #00b000;">+done</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+# Set variables that may be dependent upon other variables</span>
<span style="color: #00b000;">+if test -z &quot;$exec_prefix&quot;; then</span>
<span style="color: #00b000;">+    exec_prefix=`pkg-config --variable=exec_prefix nss`</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+if test -z &quot;$includedir&quot;; then</span>
<span style="color: #00b000;">+    includedir=`pkg-config --variable=includedir nss`</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+if test -z &quot;$libdir&quot;; then</span>
<span style="color: #00b000;">+    libdir=`pkg-config --variable=libdir nss`</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_prefix&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo $prefix</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_exec_prefix&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo $exec_prefix</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_includedir&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo $includedir</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_libdir&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo $libdir</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_cflags&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo -I$includedir</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_libs&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+      libdirs=&quot;-L$libdir&quot;</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_nss&quot;; then</span>
<span style="color: #00b000;">+	libdirs=&quot;$libdirs -lnss$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_nssutil&quot;; then</span>
<span style="color: #00b000;">+        libdirs=&quot;$libdirs -lnssutil$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_smime&quot;; then</span>
<span style="color: #00b000;">+	libdirs=&quot;$libdirs -lsmime$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_ssl&quot;; then</span>
<span style="color: #00b000;">+	libdirs=&quot;$libdirs -lssl$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_softokn&quot;; then</span>
<span style="color: #00b000;">+        libdirs=&quot;$libdirs -lsoftokn$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      echo $libdirs</span>
<span style="color: #00b000;">+fi      </span>
<span style="color: #00b000;">+</span>
diff -Naur nss-3.12.4-orig/mozilla/security/nss/config/nss.pc.in nss-3.12.4/mozilla/security/nss/config/nss.pc.in
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/config/nss.pc.in	<span style="">1969</span>-<span style="">12</span>-<span style="">31</span> <span style="">18</span>:00:<span style="">00.000000000</span> -0600</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/config/nss.pc.in	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">15</span>:<span style="">20.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">0</span>,<span style="">0</span> +<span style="">1</span>,<span style="">12</span> @@</span>
<span style="color: #00b000;">+prefix=@prefix@</span>
<span style="color: #00b000;">+exec_prefix=@exec_prefix@</span>
<span style="color: #00b000;">+libdir=@libdir@</span>
<span style="color: #00b000;">+includedir=@includedir@</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+Name: NSS</span>
<span style="color: #00b000;">+Description: Network Security Services</span>
<span style="color: #00b000;">+Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@</span>
<span style="color: #00b000;">+Requires: nspr &gt;= 4.8</span>
<span style="color: #00b000;">+Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@</span>
<span style="color: #00b000;">+Cflags: -I$<span style="">&#123;</span>includedir<span style="">&#125;</span></span>
<span style="color: #00b000;">+</span>
diff -Naur nss-3.12.4-orig/mozilla/security/nss/Makefile nss-3.12.4/mozilla/security/nss/Makefile
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/Makefile	<span style="">2008</span>-<span style="">12</span>-02 <span style="">17</span>:<span style="">24</span>:<span style="">39.000000000</span> -0600</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/Makefile	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">15</span>:<span style="">20.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">78</span>,<span style="">7</span> +<span style="">78</span>,<span style="">7</span> @@</span>
 # <span style="">&#40;</span><span style="">7</span><span style="">&#41;</span> Execute &quot;local&quot; rules. <span style="">&#40;</span>OPTIONAL<span style="">&#41;</span>.                              #
 #######################################################################
&nbsp;
<span style="color: #991111;">-nss_build_all: build_coreconf build_nspr build_dbm all</span>
<span style="color: #00b000;">+nss_build_all: build_coreconf build_dbm all</span>
&nbsp;
 nss_clean_all: clobber_coreconf clobber_nspr clobber_dbm clobber
&nbsp;
<span style="color: #440088;">@@ -<span style="">140</span>,<span style="">12</span> +<span style="">140</span>,<span style="">6</span> @@</span>
 	--with-dist-prefix='$<span style="">&#40;</span>NSPR_PREFIX<span style="">&#41;</span>' \
 	--with-dist-includedir='$<span style="">&#40;</span>NSPR_PREFIX<span style="">&#41;</span>/include'
&nbsp;
<span style="color: #991111;">-build_nspr: $<span style="">&#40;</span>NSPR_CONFIG_STATUS<span style="">&#41;</span></span>
<span style="color: #991111;">-	cd $<span style="">&#40;</span>CORE_DEPTH<span style="">&#41;</span>/../nsprpub/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span> ; $<span style="">&#40;</span>MAKE<span style="">&#41;</span></span>
<span style="color: #991111;">-</span>
<span style="color: #991111;">-clobber_nspr: $<span style="">&#40;</span>NSPR_CONFIG_STATUS<span style="">&#41;</span></span>
<span style="color: #991111;">-	cd $<span style="">&#40;</span>CORE_DEPTH<span style="">&#41;</span>/../nsprpub/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span> ; $<span style="">&#40;</span>MAKE<span style="">&#41;</span> clobber</span>
<span style="color: #991111;">-</span>
 build_dbm:
 ifndef NSS_DISABLE_DBM
 	cd $<span style="">&#40;</span>CORE_DEPTH<span style="">&#41;</span>/dbm ; $<span style="">&#40;</span>MAKE<span style="">&#41;</span> export libs
diff -Naur nss-3.12.4-orig/mozilla/security/nss/manifest.mn nss-3.12.4/mozilla/security/nss/manifest.mn
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/manifest.mn	<span style="">2008</span>-04-04 <span style="">15</span>:<span style="">36</span>:<span style="">59.000000000</span> -0500</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/manifest.mn	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">15</span>:<span style="">20.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">42</span>,<span style="">6</span> +<span style="">42</span>,<span style="">6</span> @@</span>
&nbsp;
 RELEASE = nss
&nbsp;
<span style="color: #991111;">-DIRS = lib cmd</span>
<span style="color: #00b000;">+DIRS = lib cmd config</span></pre></div></div>

<p>I had to add the following line to nss-3.12.6/mozilla/security/coreconf/location.mk to get it to find the newly installed NSPR.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">INCLUDES += -I<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>include</pre></div></div>

<p>Then run this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">BUILD_OPT</span>=<span style="color: #000000;">1</span> 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">NSS_USE_SYSTEM_SQLITE</span>=<span style="color: #000000;">1</span> 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">NSPR_INCLUDE_DIR</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nspr 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">USE_SYSTEM_ZLIB</span>=<span style="color: #000000;">1</span> 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">ZLIB_LIBS</span>=-lz 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">USE_64</span>=<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#patch -Np1 -i ../nss-3.12.5-standalone-1.patch </span>
&nbsp;
run_gapp \
    <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> mozilla<span style="color: #000000; font-weight: bold;">/</span>security<span style="color: #000000; font-weight: bold;">/</span>nss nss_build_all</pre></div></div>

<p>Then run this to install it :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">LOC_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">NSS_LINUXDIR</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">/</span>mozilla<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">*`</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;NSS_LINUXDIR=<span style="color: #007800;">$NSS_LINUXDIR</span>&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> mozilla<span style="color: #000000; font-weight: bold;">/</span>dist
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m755</span> <span style="color: #007800;">$NSS_LINUXDIR</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/*</span>.so <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib 
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m644</span> <span style="color: #007800;">$NSS_LINUXDIR</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000; font-weight: bold;">*</span>.chk,libcrmf.a<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib 
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m755</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nss 
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m755</span> <span style="color: #007800;">$NSS_LINUXDIR</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>certutil,nss-config,pk12util<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin 
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m644</span> <span style="color: #007800;">$NSS_LINUXDIR</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>pkgconfig<span style="color: #000000; font-weight: bold;">/</span>nss.pc <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>pkgconfig 
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-RL</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>public,private<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>nss<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nss 
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">644</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nss<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

</p>
</li>
<li>Python
<p>See my other post here : <a href="http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/">http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/</a>
</p>
</li>
</ol>
<h1>Firefox</h1>
<h2>Configuring</h2>
<p>Make a file called mozconfig-firefox or some such.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">BUILD_OFFICIAL</span>=<span style="color: #000000;">1</span>
mk_add_options <span style="color: #007800;">BUILD_OFFICIAL</span>=<span style="color: #000000;">1</span>
mk_add_options <span style="color: #007800;">MOZ_CO_PROJECT</span>=browser
<span style="color: #666666; font-style: italic;"># the following line uses 4 CPUs to build</span>
<span style="color: #666666; font-style: italic;">#mk_add_options MOZ_MAKE_FLAGS=&quot;-j4&quot;</span>
&nbsp;
ac_add_options <span style="color: #660033;">--enable-application</span>=browser
ac_add_options <span style="color: #660033;">--enable-official-branding</span>
ac_add_options <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>firefox
&nbsp;
<span style="color: #666666; font-style: italic;"># Optimization</span>
ac_add_options <span style="color: #660033;">--disable-tests</span>
ac_add_options <span style="color: #660033;">--disable-debug</span>
ac_add_options <span style="color: #660033;">--enable-optimize</span>=<span style="color: #ff0000;">&quot;-O2 -funroll-loops -fexpensive-optimizations&quot;</span>
ac_add_options <span style="color: #660033;">--enable-strip</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Features</span>
ac_add_options <span style="color: #660033;">--disable-accessibility</span>
ac_add_options <span style="color: #660033;">--disable-updater</span>
ac_add_options <span style="color: #660033;">--disable-installer</span>
ac_add_options <span style="color: #660033;">--enable-safe-browsing</span>
ac_add_options <span style="color: #660033;">--enable-xinerama</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Libraries / Dependencies</span>
ac_add_options <span style="color: #660033;">--disable-libnotify</span>
ac_add_options <span style="color: #660033;">--disable-gnomevfs</span>
ac_add_options <span style="color: #660033;">--enable-default-toolkit</span>=cairo-gtk2
ac_add_options <span style="color: #660033;">--enable-system-cairo</span>
ac_add_options <span style="color: #660033;">--with-system-nss</span>
ac_add_options <span style="color: #660033;">--with-nss-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
ac_add_options <span style="color: #660033;">--with-system-nspr</span>
ac_add_options <span style="color: #660033;">--with-nspr-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
ac_add_options <span style="color: #660033;">--enable-system-sqlite</span></pre></div></div>

<h2>Building</h2>
<p>I had to patch firefox to use OSS instead of ALSA because EL4 doesn&#8217;t have a working ALSA by default.  If you have ALSA working, you may not have to do this step.  I got the guts of this patch from somewhere, but I can&#8217;t find it now, thanks whoever you are!</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">diff -ur firefox-3.6.2-orig/media/libsydneyaudio/src/Makefile.in firefox-3.6.2/media/libsydneyaudio/src/Makefile.in
<span style="color: #888822;">--- firefox-3.6.2-orig/media/libsydneyaudio/src/Makefile.in	<span style="">2010</span>-03-<span style="">16</span> 02:<span style="">56</span>:<span style="">36.000000000</span> -0700</span>
<span style="color: #888822;">+++ firefox-3.6.2/media/libsydneyaudio/src/Makefile.in	<span style="">2010</span>-04-01 <span style="">10</span>:<span style="">13</span>:<span style="">27.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">47</span>,<span style="">7</span> +<span style="">47</span>,<span style="">7</span> @@</span>
&nbsp;
 ifeq <span style="">&#40;</span>$<span style="">&#40;</span>OS_ARCH<span style="">&#41;</span>,Linux<span style="">&#41;</span>
 CSRCS		= \
<span style="color: #991111;">-		sydney_audio_alsa.c \</span>
<span style="color: #00b000;">+		sydney_audio_oss.c \</span>
 		$<span style="">&#40;</span>NULL<span style="">&#41;</span>
 endif
&nbsp;
diff -ur firefox-3.6.2-orig/media/libsydneyaudio/src/sydney_audio_oss.c firefox-3.6.2/media/libsydneyaudio/src/sydney_audio_oss.c
<span style="color: #888822;">--- firefox-3.6.2-orig/media/libsydneyaudio/src/sydney_audio_oss.c	<span style="">2010</span>-03-<span style="">16</span> 02:<span style="">56</span>:<span style="">36.000000000</span> -0700</span>
<span style="color: #888822;">+++ firefox-3.6.2/media/libsydneyaudio/src/sydney_audio_oss.c	<span style="">2010</span>-04-01 <span style="">10</span>:<span style="">15</span>:<span style="">40.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">47</span>,<span style="">11</span> +<span style="">47</span>,<span style="">11</span> @@</span>
 #include &quot;sydney_audio.h&quot;
&nbsp;
 // for versions newer than 3.6.1
<span style="color: #991111;">-#define OSS_VERSION<span style="">&#40;</span>x, y, z<span style="">&#41;</span> <span style="">&#40;</span>x &lt; &lt; <span style="">16</span> | y &lt;&lt; <span style="">8</span> | z<span style="">&#41;</span></span>
<span style="color: #00b000;">+#define OSS_VERSION_<span style="">&#40;</span>x, y, z<span style="">&#41;</span> <span style="">&#40;</span>x &lt;&lt; <span style="">16</span> | y &lt;&lt; <span style="">8</span> | z<span style="">&#41;</span></span>
 // support only versions newer than 3.6.1
<span style="color: #991111;">-#define SUPP_OSS_VERSION OSS_VERSION<span style="">&#40;</span><span style="">3</span>,<span style="">6</span>,<span style="">1</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+#define SUPP_OSS_VERSION OSS_VERSION_<span style="">&#40;</span><span style="">3</span>,<span style="">6</span>,<span style="">1</span><span style="">&#41;</span></span>
&nbsp;
<span style="color: #991111;">-#if <span style="">&#40;</span>SOUND_VERSION &lt; SUPP_OSS_VERSION<span style="">&#41;</span></span>
<span style="color: #00b000;">+#if <span style="">&#40;</span>SOUND_VERSION &lt; SUPP_OSS_VERSION_<span style="">&#41;</span></span>
 #error Unsupported OSS Version
 #else
&nbsp;
<span style="color: #440088;">@@ -<span style="">127</span>,<span style="">7</span> +<span style="">127</span>,<span style="">7</span> @@</span>
         case SA_PCM_FORMAT_S16_BE:
             *fmt = AFMT_S16_BE;
             break;
<span style="color: #991111;">-#if SOUND_VERSION &gt;= OSS_VERSION<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+#if SOUND_VERSION &gt;= OSS_VERSION_<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
         /* <span style="">24</span>-bit formats <span style="">&#40;</span>LSB aligned in <span style="">32</span> bit word<span style="">&#41;</span> */
         case SA_PCM_FORMAT_S24_LE:
             *fmt = AFMT_S24_LE;
<span style="color: #440088;">@@ -<span style="">563</span>,<span style="">6</span> +<span style="">563</span>,<span style="">8</span> @@</span>
 #if <span style="">0</span> /* TODO */
   AudioOutputUnitStop<span style="">&#40;</span>s-&gt;output_unit<span style="">&#41;</span>;
 #endif
<span style="color: #00b000;">+  close<span style="">&#40;</span>s-&gt;output_fd<span style="">&#41;</span>;</span>
<span style="color: #00b000;">+  s-&gt;output_fd = -<span style="">1</span>;</span>
   pthread_mutex_unlock<span style="">&#40;</span>&amp;s-&gt;mutex<span style="">&#41;</span>;
   return SA_SUCCESS;
 <span style="">&#125;</span>
<span style="color: #440088;">@@ -<span style="">581</span>,<span style="">10</span> +<span style="">583</span>,<span style="">11</span> @@</span>
    * The audio device resets its mSampleTime counter after pausing,
    * so we need to clear our tracking value to keep that in sync.
    */
<span style="color: #991111;">-  s-&gt;bytes_played = <span style="">0</span>;</span>
<span style="color: #00b000;">+  //s-&gt;bytes_played = <span style="">0</span>;</span>
 #if <span style="">0</span> /* TODO */
   AudioOutputUnitStart<span style="">&#40;</span>s-&gt;output_unit<span style="">&#41;</span>;
 #endif
<span style="color: #00b000;">+  sa_stream_open<span style="">&#40;</span>s<span style="">&#41;</span>;</span>
   pthread_mutex_unlock<span style="">&#40;</span>&amp;s-&gt;mutex<span style="">&#41;</span>;
   return SA_SUCCESS;
 <span style="">&#125;</span>
<span style="color: #440088;">@@ -<span style="">615</span>,<span style="">7</span> +<span style="">618</span>,<span style="">7</span> @@</span>
   if <span style="">&#40;</span>s == NULL || s-&gt;output_fd == -<span style="">1</span><span style="">&#41;</span> <span style="">&#123;</span>
     return SA_ERROR_NO_INIT;
   <span style="">&#125;</span>
<span style="color: #991111;">-#if SOUND_VERSION &gt;= OSS_VERSION<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+#if SOUND_VERSION &gt;= OSS_VERSION_<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
   int mvol = <span style="">&#40;</span><span style="">&#40;</span>int<span style="">&#41;</span><span style="">&#40;</span><span style="">100</span>*vol<span style="">&#41;</span><span style="">&#41;</span> | <span style="">&#40;</span><span style="">&#40;</span>int<span style="">&#41;</span><span style="">&#40;</span><span style="">100</span>*vol<span style="">&#41;</span> &lt; &lt; <span style="">8</span><span style="">&#41;</span>;
   if <span style="">&#40;</span>ioctl<span style="">&#40;</span>s-&gt;output_fd, SNDCTL_DSP_SETPLAYVOL, &amp;mvol<span style="">&#41;</span> &lt; <span style="">0</span><span style="">&#41;</span><span style="">&#123;</span>
     return SA_ERROR_SYSTEM;
<span style="color: #440088;">@@ -<span style="">637</span>,<span style="">7</span> +<span style="">640</span>,<span style="">7</span> @@</span>
   if <span style="">&#40;</span>s == NULL || s-&gt;output_fd == -<span style="">1</span><span style="">&#41;</span> <span style="">&#123;</span>
     return SA_ERROR_NO_INIT;
   <span style="">&#125;</span>
<span style="color: #991111;">-#if SOUND_VERSION &gt;= OSS_VERSION<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+#if SOUND_VERSION &gt;= OSS_VERSION_<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
   int mvol;
   if <span style="">&#40;</span>ioctl<span style="">&#40;</span>s-&gt;output_fd, SNDCTL_DSP_SETPLAYVOL, &amp;mvol<span style="">&#41;</span> &lt; <span style="">0</span><span style="">&#41;</span><span style="">&#123;</span>
     return SA_ERROR_SYSTEM;</pre></div></div>

<p>The following is a fork of my config_gapp script.  There are some tricky bits because I&#8217;ve left off some -L&#8217;s to avoid the NSS and NSPR libs that are installed in /usr/lib64.</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">LOCAL_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss -I/usr/X11R6/include <span style="color: #007800;">$CPPFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss -I/usr/X11R6/include <span style="color: #007800;">$CFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CXXFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss  -I/usr/X11R6/include  <span style="color: #007800;">$CXXFLAGS</span>&quot;</span>
<span style="color: #666666; font-style: italic;">#export LDFLAGS=&quot;-L$LOCAL_HOME/lib -L/usr/lib64 -L/usr/X11R6/lib64 $LDFLAGS&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LDFLAGS</span>=<span style="color: #ff0000;">&quot;-L<span style="color: #007800;">$LOCAL_HOME</span>/lib -L/usr/X11R6/lib64 <span style="color: #007800;">$LDFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pkg-config
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib/pkgconfig:/usr/lib64/pkgconfig:<span style="color: #007800;">$PKG_CONFIG_PATH</span>&quot;</span>
<span style="color: #666666; font-style: italic;">#export LD_LIBRARY_PATH=&quot;$LOCAL_HOME/lib:/usr/X11R6/lib64:/usr/lib64&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib:/usr/X11R6/lib64&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">MOZCONFIG</span>=..<span style="color: #000000; font-weight: bold;">/</span>mozconfig-firefox
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-j</span> <span style="color: #000000;">4</span> <span style="color: #660033;">-f</span> client.mk build</pre></div></div>

<h2>Installing</h2>
<p>First you make a .tar.bz2, then you go install it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span> package
<span style="color: #c20cb9; font-weight: bold;">cp</span> dist<span style="color: #000000; font-weight: bold;">/*</span>.tar.bz2 <span style="color: #000000; font-weight: bold;">/</span>somewhere
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>share
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvfj <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>that<span style="color: #000000; font-weight: bold;">/*</span>.tar.bz2</pre></div></div>

<p>Now make a wrapper script $HOME/bin/firefox :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> run_gapp <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>firefox <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>

<h2>Errors</h2>
<p>Here are some of the error messages I encountered along the way that were solved w/ the prerequisites and patch.  Hopefully this helps future googlers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>staticlib<span style="color: #000000; font-weight: bold;">/</span>components<span style="color: #000000; font-weight: bold;">/</span>libpipnss.a<span style="color: #7a0874; font-weight: bold;">&#40;</span>nsNSSCallbacks.o<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x150a<span style="color: #7a0874; font-weight: bold;">&#41;</span>: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>RegisterMyOCSPAIAInfoCallback<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
: undefined reference to `CERT_RegisterAlternateOCSPAIAInfoCallBack'</span>
..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>staticlib<span style="color: #000000; font-weight: bold;">/</span>components<span style="color: #000000; font-weight: bold;">/</span>libpipnss.a<span style="color: #7a0874; font-weight: bold;">&#40;</span>nsNSSCallbacks.o<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x154d<span style="color: #7a0874; font-weight: bold;">&#41;</span>: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>UnregisterMyOCSPAIAInfoCallback<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
: undefined reference to `CERT_RegisterAlternateOCSPAIAInfoCallBack'</span>
..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>staticlib<span style="color: #000000; font-weight: bold;">/</span>components<span style="color: #000000; font-weight: bold;">/</span>libpipnss.a<span style="color: #7a0874; font-weight: bold;">&#40;</span>nsNSSCallbacks.o<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x2aa9<span style="color: #7a0874; font-weight: bold;">&#41;</span>: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>HandshakeCallback<span style="color: #7a0874; font-weight: bold;">&#40;</span>PRFileDesc<span style="color: #000000; font-weight: bold;">*</span>, void<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
: undefined reference to `SSL_HandshakeNegotiatedExtension'</span>
collect2: <span style="color: #c20cb9; font-weight: bold;">ld</span> returned <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">exit</span> status
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>libxul.so<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span>
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mbaker<span style="color: #000000; font-weight: bold;">/</span>firefox-3.6.2<span style="color: #000000; font-weight: bold;">/</span>toolkit<span style="color: #000000; font-weight: bold;">/</span>library<span style="color: #ff0000;">'
make[3]: *** [libs_tier_toolkit] Error 2
make[3]: Leaving directory `/opt/local/mbaker/firefox-3.6.2'</span>
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>tier_toolkit<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span>
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mbaker<span style="color: #000000; font-weight: bold;">/</span>firefox-3.6.2<span style="color: #ff0000;">'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/opt/local/mbaker/firefox-3.6.2'</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>build<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></pre></div></div>

<p>That one was solved by installing NSS and NSPR separately with the linux-from-scratch patches.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">error: system NSPR does not support PR_STATIC_ASSERT</pre></div></div>

<p>Look in config.log and then fix your permissions in $HOME/include/nss.  </p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ch0wned &#8211; Building Amarok 1.4.10 in $HOME on Redhat EL4</title>
		<link>http://warped.org/blog/2010/04/05/ch0wned-building-amarok-1-4-10-in-home-on-redhat-el4/</link>
		<comments>http://warped.org/blog/2010/04/05/ch0wned-building-amarok-1-4-10-in-home-on-redhat-el4/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 00:49:40 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=94</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a linux user and don't have root access. 
Intro
All I wanted to do was play Internet radio via a SOCKS proxy.  Is that too much to ask for on Redhat EL4?  Apparently so.  So after many hours of frustration, here is how you [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a linux user and don't have root access. </tt></p>
<h1>Intro</h1>
<p>All I wanted to do was play Internet radio via a SOCKS proxy.  Is that too much to ask for on Redhat EL4?  Apparently so.  So after many hours of frustration, here is how you get Amarok 1.x (1.4.10 was the last one made) to compile and run from your homedir on Linux 2.ANCIENT.  </p>
<p>
This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.
</p>
<h1>Prerequisites</h1>
<ul>
<li>amarok-1.4.10.tar.bz2</li>
<li>binutils-2.20.1.tar.bz2</li>
<li>xine-lib-1.1.18.1.tar.bz2</li>
<li>taglib-1.6.1.tar.gz</li>
<li>ffmpeg-0.5.1.tar.bz2</li>
<li>My Patch</li>
</ul>
<h1>Building</h1>
<p>For taglib, ffmpeg, and binutils:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>For xine-lib :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp <span style="color: #660033;">--without-speex</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>For amarok:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp</pre></div></div>

<p>Then apply this patch :</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">diff -ru amarok-1.4.10/amarok/src/mediadevice/generic/genericmediadevice.cpp amarok-1.4.10-max/amarok/src/mediadevice/generic/genericmediadevice.cpp
<span style="color: #888822;">--- amarok-1.4.10/amarok/src/mediadevice/generic/genericmediadevice.cpp	<span style="">2008</span>-08-<span style="">13</span> <span style="">14</span>:<span style="">21</span>:<span style="">51.000000000</span> -0700</span>
<span style="color: #888822;">+++ amarok-1.4.10-max/amarok/src/mediadevice/generic/genericmediadevice.cpp	<span style="">2010</span>-04-05 <span style="">16</span>:<span style="">21</span>:<span style="">11.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">557</span>,<span style="">7</span> +<span style="">557</span>,<span style="">7</span> @@</span>
     args<span style="">&#91;</span>&quot;artist&quot;<span style="">&#93;</span> = artist;
     args<span style="">&#91;</span>&quot;albumartist&quot;<span style="">&#93;</span> = albumartist;
     args<span style="">&#91;</span>&quot;initial&quot;<span style="">&#93;</span> = albumartist.mid<span style="">&#40;</span> <span style="">0</span>, <span style="">1</span> <span style="">&#41;</span>.upper<span style="">&#40;</span><span style="">&#41;</span>;
<span style="color: #991111;">-    args<span style="">&#91;</span>&quot;filetype&quot;<span style="">&#93;</span> = mb.url<span style="">&#40;</span><span style="">&#41;</span>.pathOrURL<span style="">&#40;</span><span style="">&#41;</span>.section<span style="">&#40;</span> &quot;.&quot;, -<span style="">1</span> <span style="">&#41;</span>.lower<span style="">&#40;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">+    args<span style="">&#91;</span>&quot;filetype&quot;<span style="">&#93;</span> = mb.url<span style="">&#40;</span><span style="">&#41;</span>.url<span style="">&#40;</span><span style="">&#41;</span>.section<span style="">&#40;</span> &quot;.&quot;, -<span style="">1</span> <span style="">&#41;</span>.lower<span style="">&#40;</span><span style="">&#41;</span>;</span>
     QString track;
     if <span style="">&#40;</span> mb.track<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#41;</span>
         track.sprintf<span style="">&#40;</span> &quot;%02d&quot;, mb.track<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#41;</span>;
<span style="color: #440088;">@@ -<span style="">657</span>,<span style="">7</span> +<span style="">657</span>,<span style="">7</span> @@</span>
&nbsp;
     if<span style="">&#40;</span> !kioCopyTrack<span style="">&#40;</span> bundle.url<span style="">&#40;</span><span style="">&#41;</span>, desturl <span style="">&#41;</span> <span style="">&#41;</span>
     <span style="">&#123;</span>
<span style="color: #991111;">-        debug<span style="">&#40;</span><span style="">&#41;</span> &lt; &lt; &quot;Failed to copy track: &quot; &lt;&lt; bundle.url<span style="">&#40;</span><span style="">&#41;</span>.pathOrURL<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; &quot; to &quot; &lt;&lt; desturl.pathOrURL<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; endl;</span>
<span style="color: #00b000;">+        debug<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; &quot;Failed to copy track: &quot; &lt;&lt; bundle.url<span style="">&#40;</span><span style="">&#41;</span>.url<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; &quot; to &quot; &lt;&lt; desturl.url<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; endl;</span>
         return <span style="">0</span>;
     <span style="">&#125;</span>
&nbsp;
<span style="color: #440088;">@@ -<span style="">833</span>,<span style="">7</span> +<span style="">833</span>,<span style="">7</span> @@</span>
 void
 GenericMediaDevice::dirListerClear<span style="">&#40;</span> const KURL &amp;url <span style="">&#41;</span>
 <span style="">&#123;</span>
<span style="color: #991111;">-    QString directory = url.pathOrURL<span style="">&#40;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">+    QString directory = url.path<span style="">&#40;</span><span style="">&#41;</span>;</span>
     GenericMediaFile *vmf = m_mfm<span style="">&#91;</span>directory<span style="">&#93;</span>;
     if<span style="">&#40;</span> vmf <span style="">&#41;</span>
         vmf-&gt;deleteAll<span style="">&#40;</span> false <span style="">&#41;</span>;
<span style="color: #440088;">@@ -<span style="">842</span>,<span style="">7</span> +<span style="">842</span>,<span style="">7</span> @@</span>
 void
 GenericMediaDevice::dirListerDeleteItem<span style="">&#40;</span> KFileItem *fileitem <span style="">&#41;</span>
 <span style="">&#123;</span>
<span style="color: #991111;">-    QString filename = fileitem-&gt;url<span style="">&#40;</span><span style="">&#41;</span>.pathOrURL<span style="">&#40;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">+    QString filename = fileitem-&gt;url<span style="">&#40;</span><span style="">&#41;</span>.path<span style="">&#40;</span><span style="">&#41;</span>;</span>
     GenericMediaFile *vmf = m_mfm<span style="">&#91;</span>filename<span style="">&#93;</span>;
     if<span style="">&#40;</span> vmf <span style="">&#41;</span>
         vmf-&gt;deleteAll<span style="">&#40;</span> true <span style="">&#41;</span>;
diff -ru amarok-1.4.10/amarok/src/plugin/plugin.h amarok-1.4.10-max/amarok/src/plugin/plugin.h
<span style="color: #888822;">--- amarok-1.4.10/amarok/src/plugin/plugin.h	<span style="">2008</span>-08-<span style="">13</span> <span style="">14</span>:<span style="">21</span>:<span style="">51.000000000</span> -0700</span>
<span style="color: #888822;">+++ amarok-1.4.10-max/amarok/src/plugin/plugin.h	<span style="">2010</span>-04-05 <span style="">16</span>:07:<span style="">18.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">9</span>,<span style="">9</span> +<span style="">9</span>,<span style="">11</span> @@</span>
&nbsp;
 #define AMAROK_EXPORT_PLUGIN<span style="">&#40;</span> classname <span style="">&#41;</span> \
     extern &quot;C&quot; <span style="">&#123;</span> \
<span style="color: #991111;">-          KDE_EXPORT Amarok::Plugin* create_plugin<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#123;</span> return new classname; <span style="">&#125;</span> \</span>
<span style="color: #00b000;">+           __attribute__ <span style="">&#40;</span><span style="">&#40;</span>visibility<span style="">&#40;</span>&quot;default&quot;<span style="">&#41;</span><span style="">&#41;</span><span style="">&#41;</span> Amarok::Plugin* create_plugin<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#123;</span> return new classname; <span style="">&#125;</span> \</span>
     <span style="">&#125;</span>
&nbsp;
<span style="color: #00b000;">+          //KDE_EXPORT Amarok::Plugin* create_plugin<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#123;</span> return new classname; <span style="">&#125;</span> </span>
<span style="color: #00b000;">+</span>
 #include &lt;qmap .h&gt;
 #include &lt;qstring .h&gt;
&nbsp;
<span style="color: #888822;">--- amarok-1.4.10/amarok/src/amarokcore/amarokconfig.cpp	<span style="">2010</span>-04-05 <span style="">17</span>:<span style="">19</span>:<span style="">09.000000000</span> -0700</span>
<span style="color: #888822;">+++ amarok-1.4.10-max/amarok/src/amarokcore/amarokconfig.cpp	<span style="">2010</span>-04-05 <span style="">15</span>:<span style="">46</span>:<span style="">37.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">465</span>,<span style="">8</span> +<span style="">465</span>,<span style="">8</span> @@</span>
   KConfigSkeleton::ItemBool  *itemMonitorChanges;
   itemMonitorChanges = new KConfigSkeleton::ItemBool<span style="">&#40;</span> currentGroup<span style="">&#40;</span><span style="">&#41;</span>, QString::fromLatin1<span style="">&#40;</span> &quot;Monitor Changes&quot; <span style="">&#41;</span>, mMonitorChanges, true <span style="">&#41;</span>;
   addItem<span style="">&#40;</span> itemMonitorChanges, QString::fromLatin1<span style="">&#40;</span> &quot;MonitorChanges&quot; <span style="">&#41;</span> <span style="">&#41;</span>;
<span style="color: #991111;">-  KConfigSkeleton::ItemPathList  *itemCollectionFolders;</span>
<span style="color: #991111;">-  itemCollectionFolders = new KConfigSkeleton::ItemPathList<span style="">&#40;</span> currentGroup<span style="">&#40;</span><span style="">&#41;</span>, QString::fromLatin1<span style="">&#40;</span> &quot;Collection Folders&quot; <span style="">&#41;</span>, mCollectionFolders <span style="">&#41;</span>;</span>
<span style="color: #00b000;">+  KConfigSkeleton::ItemString *itemCollectionFolders;</span>
<span style="color: #00b000;">+  itemCollectionFolders = new KConfigSkeleton::ItemString <span style="">&#40;</span> currentGroup<span style="">&#40;</span><span style="">&#41;</span>, QString::fromLatin1<span style="">&#40;</span> &quot;Collection Folders&quot; <span style="">&#41;</span>, mCollectionFolders <span style="">&#41;</span>;</span>
   addItem<span style="">&#40;</span> itemCollectionFolders, QString::fromLatin1<span style="">&#40;</span> &quot;CollectionFolders&quot; <span style="">&#41;</span> <span style="">&#41;</span>;
&nbsp;
   setCurrentGroup<span style="">&#40;</span> QString::fromLatin1<span style="">&#40;</span> &quot;MySql&quot; <span style="">&#41;</span> <span style="">&#41;</span>;
&nbsp;
<span style="color: #991111;">&lt;/qstring&gt;&lt;/qmap&gt;</span></pre></div></div>

<p>Then go ahead with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<h2>Errors</h2>
<p>Here are some of the error messages I encountered along the way that were solved w/ the prerequisites and patch.  Hopefully this helps future googlers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ld</span>: .libs<span style="color: #000000; font-weight: bold;">/</span>xine.o: relocation R_X86_64_PC32 against <span style="color: #000000; font-weight: bold;">`</span>xine_event_send<span style="color: #ff0000;">' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value</span></pre></div></div>

<p>Needs a newer version of binutils that handles X86_64 better.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">amarokconfig.cpp: In constructor <span style="color: #000000; font-weight: bold;">`</span>AmarokConfig::AmarokConfig<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
amarokconfig.cpp:468: error: `ItemPathList'</span> is not a member of <span style="color: #000000; font-weight: bold;">`</span>KConfigSkeleton<span style="color: #ff0000;">'
amarokconfig.cpp:468: error: `itemCollectionFolders'</span> was not declared <span style="color: #000000; font-weight: bold;">in</span> this scope
amarokconfig.cpp:<span style="color: #000000;">469</span>: error: <span style="color: #000000; font-weight: bold;">`</span>class KConfigSkeleton::ItemPathList<span style="color: #ff0000;">' has not been declared</span></pre></div></div>

<p>This is due to the old version of KDE 3.3 on EL4.  Needs the patch above to amarokconfig.cpp.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">void-engine.cpp:<span style="color: #000000;">22</span>: error: visibility arg must be one of <span style="color: #ff0000;">&quot;default&quot;</span>, <span style="color: #ff0000;">&quot;hidden&quot;</span>, <span style="color: #ff0000;">&quot;protected&quot;</span> or <span style="color: #ff0000;">&quot;internal&quot;</span></pre></div></div>

<p>Again, some ancient KDE 3.3 bug that is fixed by the patch above.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">genericmediadevice.cpp: In member <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>QString GenericMediaDevice::buildDestination<span style="color: #7a0874; font-weight: bold;">&#40;</span>const QString<span style="color: #000000; font-weight: bold;">&amp;</span>, const MetaBundle<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
genericmediadevice.cpp:560: error: '</span>const class KURL<span style="color: #ff0000;">' has no member named '</span>pathOrURL<span style="color: #ff0000;">'
genericmediadevice.cpp: In member function `virtual MediaItem* GenericMediaDevice::copyTrackToDevice(const MetaBundle&amp;)'</span>:
genericmediadevice.cpp:<span style="color: #000000;">660</span>: error: <span style="color: #ff0000;">'const class KURL'</span> has no member named <span style="color: #ff0000;">'pathOrURL'</span>
genericmediadevice.cpp:<span style="color: #000000;">660</span>: error: <span style="color: #ff0000;">'const class KURL'</span> has no member named <span style="color: #ff0000;">'pathOrURL'</span>
genericmediadevice.cpp: In member <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>void GenericMediaDevice::dirListerClear<span style="color: #7a0874; font-weight: bold;">&#40;</span>const KURL<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
genericmediadevice.cpp:836: error: '</span>const class KURL<span style="color: #ff0000;">' has no member named '</span>pathOrURL<span style="color: #ff0000;">'
genericmediadevice.cpp: In member function `void GenericMediaDevice::dirListerDeleteItem(KFileItem*)'</span>:
genericmediadevice.cpp:<span style="color: #000000;">845</span>: error: <span style="color: #ff0000;">'const class KURL'</span> has no member named <span style="color: #ff0000;">'pathOrURL'</span></pre></div></div>

<p>More ancient KDE 3.3 stuff &#8212; pathOrURL() doesn&#8217;t exist yet, so we use either url() or path().</p>
<p>
Last thing : doc/ was giving me issue, so I removed it from the Makefile under TOPSUBDIRS.</p>
<h1>Running</h1>
<p>I kept getting errors about &#8220;no sound-engine plugins found&#8221; until I added the two paths to $KDEDIRS as below :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">KDEDIRS</span>=<span style="color: #000000; font-weight: bold;">/</span>usr:<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>kde3:<span style="color: #007800;">$HOME</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> run_gapp amarok <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>
</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/05/ch0wned-building-amarok-1-4-10-in-home-on-redhat-el4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ch0wned &#8211; Installing TaskCoach and all its depenencies in $HOME for EL4</title>
		<link>http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/</link>
		<comments>http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 21:48:37 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=96</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a linux user and don't have root access. 
Installing TaskCoach and its dependencies in $HOME for EL4
This guide assumes you&#8217;re leaving off from my previous post : http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/  where you&#8217;ve setup a script called config_gapp.
Requirements

Python-2.5.5.tar.bz2

wxPython-src-2.8.10.1.tar.bz2

TaskCoach-1.0.1.tar.gz


Directions

Python
Install it like normal unless you have a modern distro that [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a linux user and don't have root access. </tt></p>
<h1>Installing TaskCoach and its dependencies in $HOME for EL4</h1>
<p>This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.</p>
<h2>Requirements</h2>
<ul>
<li>Python-2.5.5.tar.bz2
</li>
<li>wxPython-src-2.8.10.1.tar.bz2
</li>
<li>TaskCoach-1.0.1.tar.gz
</li>
</ul>
<h2>Directions</h2>
<ol>
<li>Python
<p>Install it like normal unless you have a modern distro that has a decent install of Python 2.5, in which case you will need to install the following things into $HOME.  Not sure how to do that in Python, so you might as well have your own local version.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp
<span style="color: #c20cb9; font-weight: bold;">make</span> 
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<li>wxWidgets (included w/ wxPython)<br />
Install the following patch from <a href="http://groups.google.com/group/wxPython-users/browse_thread/thread/129ba27e2f868c3c?pli=1">This Thread</a> :</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">--- wxPython/src/gtk/_gdi_wrap.cpp.orig <span style="">2009</span>-08-08 <span style="">16</span>:<span style="">26</span>:<span style="">48.000000000</span> +0200
<span style="color: #888822;">+++ wxPython/src/gtk/_gdi_wrap.cpp      <span style="">2009</span>-08-08 <span style="">16</span>:<span style="">32</span>:<span style="">50.000000000</span> +0200</span>
<span style="color: #440088;">@@ -<span style="">4195</span>,<span style="">6</span> +<span style="">4195</span>,<span style="">10</span> @@</span>
     virtual wxGraphicsBrush CreateRadialGradientBrush<span style="">&#40;</span>wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ,
                                                       const wxColour &amp;, const wxColour &amp;<span style="">&#41;</span>  <span style="">&#123;</span> return wxNullGraphicsBrush; <span style="">&#125;</span>
     virtual wxGraphicsFont CreateFont<span style="">&#40;</span> const wxFont &amp; , const wxColour &amp; <span style="">&#41;</span> <span style="">&#123;</span> return wxNullGraphicsFont; <span style="">&#125;</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+    // patch required as explained in</span>
<span style="color: #00b000;">+    // http://groups.google.com/group/wxPython-users/browse_thread/thread/129ba27e2f<span style="color: #440088;">868c3</span>c?pli=1</span>
<span style="color: #00b000;">+    wxGraphicsBitmap CreateBitmap<span style="">&#40;</span> const wxBitmap &amp;bitmap <span style="">&#41;</span> const <span style="">&#123;</span> return wxNullGraphicsBitmap; <span style="">&#125;</span> </span>
 <span style="">&#125;</span>;</pre></div></div>

<p>Then run :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp <span style="color: #660033;">--enable-unicode</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> contrib<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>gizmos <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>wxPython

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> wxPython
<span style="color: #c20cb9; font-weight: bold;">vim</span> config.py
   <span style="color: #666666; font-style: italic;"># Turn off all the contrib features except gizmos</span>
run_gapp python2.5 setup.py build_ext
run_gapp python2.5 setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>TaskCoach

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">run_gapp python2.5 setup.py build
run_gapp python2.5 setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Accents / UTF8 in Mutt using Xterm with TrueType</title>
		<link>http://warped.org/blog/2009/06/08/getting-accents-utf8-in-mutt-using-xterm-with-truetype/</link>
		<comments>http://warped.org/blog/2009/06/08/getting-accents-utf8-in-mutt-using-xterm-with-truetype/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 21:43:16 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[perl6]]></category>
		<category><![CDATA[truetype]]></category>
		<category><![CDATA[utf8]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[xterm]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=68</guid>
		<description><![CDATA[Overview
I&#8217;m starting to adopt Unicode/UTF-8 into my world to allow for more internationalization in my projects.  Someday I might play with Perl6&#8217;s UTF-8 stuff too.  I also want to be able have different charactersets render correctly while using Mutt.  I often get email from people in Western Europe, Eastern Europe, and SouthEast [...]]]></description>
			<content:encoded><![CDATA[<h1>Overview</h1>
<p>I&#8217;m starting to adopt Unicode/UTF-8 into my world to allow for more internationalization in my projects.  Someday I might play with Perl6&#8217;s UTF-8 stuff too.  I also want to be able have different charactersets render correctly while using Mutt.  I often get email from people in Western Europe, Eastern Europe, and SouthEast Asia, and they are all using different character sets.  UTF-8 is the &#8220;universal&#8221; one.</p>
<div id="attachment_73" class="wp-caption alignnone" style="width: 509px"><a href="http://warped.org/blog/wp-content/uploads/2009/06/mutt_utf8.png"><img src="http://warped.org/blog/wp-content/uploads/2009/06/mutt_utf8.png" alt="Shows Hebrew, Chinese and Western European characters all at the same time." title="Mutt in UTF-8 Mode" width="499" height="388" class="size-full wp-image-73" /></a><p class="wp-caption-text">Shows Hebrew, Chinese and Western European characters all at the same time.</p></div>
<h1>The Components</h1>
<h2>Xterm</h2>
<p>In order to have a nice playing Xterm with UTF-8, 256-colors and TrueType, I have to roll my own.</p>
<ol>
<li>Download the latest one from <a href="ftp://invisible-island.net/xterm/xterm.tar.gz">ftp://invisible-island.net/xterm/xterm.tar.gz</a>.
</li>
<li>Compile it

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure \
     <span style="color: #660033;">--disable-desktop</span> \
     <span style="color: #660033;">--with-x</span> \
     <span style="color: #660033;">--enable-<span style="color: #000000;">256</span>-color</span> \
     <span style="color: #660033;">--enable-load-vt-fonts</span> \
     <span style="color: #660033;">--enable-paste64</span> \
     <span style="color: #660033;">--enable-readline-mouse</span> \
     <span style="color: #660033;">--enable-tcap-fkeys</span> \
     <span style="color: #660033;">--enable-tcap-query</span> \
     <span style="color: #660033;">--enable-wide-chars</span> \
     <span style="color: #660033;">--with-Xaw3d</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Note the crucial <b>&#8211;enable-wide-chars</b> needed for UTF-8.  Your xterm may already be compiled with some or all of these options.
</li>
</ol>
<p>Once I have that, I create a small shell script that I call <b>xt</b> that launches it for me :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;"># None of these have extended charsets :-(</span>
<span style="color: #007800;">font</span>=<span style="color: #ff0000;">&quot;Consolas&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;DejaVu Sans Mono&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;Bitstream Vera Sans Mono&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;luxi mono&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;Andale Mono&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;courier&quot;</span>
<span style="color: #007800;">font_size</span>=<span style="color: #000000;">12</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> xterm <span style="color: #660033;">-bg</span> black <span style="color: #660033;">-fg</span> white \
    <span style="color: #660033;">-fa</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$font</span>&quot;</span> \
    <span style="color: #660033;">-fd</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$font</span>&quot;</span> \
    <span style="color: #660033;">-fs</span> <span style="color: #007800;">$font_size</span> \
    <span style="color: #660033;">-j</span> <span style="color: #660033;">-s</span> \
    <span style="color: #660033;">-sb</span> <span style="color: #660033;">-si</span> <span style="color: #660033;">-sk</span> <span style="color: #660033;">-vb</span> <span style="color: #660033;">-sl</span> <span style="color: #000000;">1024</span> <span style="color: #660033;">-rightbar</span> \
    +sf +<span style="color: #c20cb9; font-weight: bold;">dc</span> <span style="color: #660033;">-cr</span> darkgreen  \
    <span style="color: #660033;">-u8</span> <span style="color: #660033;">-geometry</span> 100x40 \
    $<span style="color: #000000; font-weight: bold;">@</span> <span style="color: #000000; font-weight: bold;">&amp;</span> 
<span style="color: #7a0874; font-weight: bold;">exit</span></pre></div></div>

<p>The important options here are <b>-u8</b>, <b>-fa</b> and <b>-fd</b>.   This would be perfect, except that I can&#8217;t find a good mono-spaced TrueType font that has all of the character sets.  More on that in the font section.</p>
<p>If you want support for all character sets, you can use the &#8220;fixed&#8221; font built in to X, which has a very<br />
complete character set.  I use this script inspired by <a href="http://www.maruko.ca/i18n/">Marjan Parsa</a> instead :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> xterm <span style="color: #660033;">-bg</span> black <span style="color: #660033;">-fg</span> white \
    <span style="color: #660033;">-j</span> <span style="color: #660033;">-s</span> \
    <span style="color: #660033;">-sb</span> <span style="color: #660033;">-si</span> <span style="color: #660033;">-sk</span> <span style="color: #660033;">-vb</span> <span style="color: #660033;">-sl</span> <span style="color: #000000;">1024</span> <span style="color: #660033;">-rightbar</span> \
    +sf +<span style="color: #c20cb9; font-weight: bold;">dc</span> <span style="color: #660033;">-cr</span> darkgreen  \
    <span style="color: #660033;">-u8</span> <span style="color: #660033;">-geometry</span> 100x40 \
    <span style="color: #660033;">-xrm</span> <span style="color: #ff0000;">&quot;xterm*font:-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1&quot;</span>  \
    <span style="color: #660033;">-xrm</span> <span style="color: #ff0000;">&quot;xterm*wideFont:-misc-fixed-medium-r-normal-ja-18-120-100-100-c-180-iso10646-1&quot;</span>  \
    $<span style="color: #000000; font-weight: bold;">@</span> <span style="color: #000000; font-weight: bold;">&amp;</span> 
<span style="color: #7a0874; font-weight: bold;">exit</span></pre></div></div>

<h2>Fonts</h2>
<p>You have two choices here : Fixed fonts and TrueType fonts.    In my experience, the TrueType fonts look better, and the Fixed fonts have more characters supported.</p>
<h3>TrueType</h3>
<p>I can&#8217;t seem to find a perfect TrueType &#8220;Console&#8221; font that is fixed-width, looks great, and supports all the Unicode (UTF-8) character sets like Europe, Hebrew, Japanese, Chinese, etc.    So I compromise the character set support and just get the pretty one.   So far I am most happy with Microsoft&#8217;s &#8220;Consolas&#8221;.  Yes, Microsoft!</p>
<p>Here are some good ones to check out:</p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&#038;displaylang=en">Consolas</a>
</li>
<li><a href="http://dejavu-fonts.org/wiki/index.php?title=Download">DejaVu Sans Mono</a>
</li>
<li>luxi mono
</li>
</ul>
<p>If you would like to add TrueType fonts to your account / home directory locally, just create a ~/.fonts directory and then copy the .ttf fonts into it.   Try these command to explore what fonts you have :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">fc-list                 <span style="color: #666666; font-style: italic;">#  see what fonts are loaded.</span>
xfd <span style="color: #660033;">-fa</span> <span style="color: #ff0000;">&quot;DejaVu Sans Mono&quot;</span>  <span style="color: #666666; font-style: italic;">#  explore a certain font</span></pre></div></div>

<h3>Fixed / System Fonts</h3>
<p>I use the following two options when launching Xterm to specify the system fonts :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #660033;">-xrm</span> <span style="color: #ff0000;">&quot;xterm*font:-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1&quot;</span>
<span style="color: #660033;">-xrm</span> <span style="color: #ff0000;">&quot;xterm*wideFont:-misc-fixed-medium-r-normal-ja-18-120-100-100-c-180-iso10646-1&quot;</span></pre></div></div>

<p>Try these commands to see what UTF-8 fonts you have and what&#8217;s in them :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">xlsfonts <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #000000;">10646</span>
xfd <span style="color: #660033;">-fn</span> <span style="color: #ff0000;">&quot;-ibm-courier-medium-r-normal--0-0-0-0-m-0-iso10646-1&quot;</span></pre></div></div>

<p>This is the settings / fonts I used for the above screen shot.  See also this <a href="http://www.yolinux.com/TUTORIALS/LinuxListOfFonts.html">Linux Font Tutorial</a>.</p>
<h2>Shell / Environment Variables</h2>
<p>Key to all of this is that you have your LANG environment variable set correctly</p>
<p>Edit ~/.bashrc and make sure this line is happening :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LANG</span>=en_US.utf8</pre></div></div>

<p>Remember, you will need this on two machines : the machine you are creating the X-Term window on, and the machine that you are launching mutt on.  These may be the same machine, maybe not.</p>
<p>To get a list of the locales available use this command :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">locale <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> utf</pre></div></div>

<p>Note that these are case-sensitive, so if you have it set to <b>en_US.UTF8</b> instead of <b>en_US.utf8</b> you will get some wanky errors.</p>
<h2>Mutt</h2>
<p>Mutt works pretty well out of the box w/ UTF8.   For reference see <a href="http://wiki.mutt.org/?MuttFaq/Charset">The Mutt FAQ</a>.</p>
<p>I used these options in my .muttrc:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">set</span> allow_8bit
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">allow_ansi</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>                  <span style="color: #666666; font-style: italic;"># in msgs</span>
charset-hook us-ascii iso-<span style="color: #000000;">8859</span>-<span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">send_charset</span>=<span style="color: #ff0000;">&quot;us-ascii:iso-8859-1&quot;</span></pre></div></div>

<p>So what this is doing is still using UTF-8 as my LANG setting and encoding for the terminal, but it&#8217;s sending my messages out as iso-8859-1.   It also is assuming that anything that comes in as &#8220;us-ascii&#8221; is actually iso-8859-1.</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/06/08/getting-accents-utf8-in-mutt-using-xterm-with-truetype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>chown3d Part 2 &#8211; GTK+ and GLIB in your own home directory</title>
		<link>http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</link>
		<comments>http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 19:44:16 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[chown3d]]></category>
		<category><![CDATA[glib]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=34</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a linux user and don't have root access. 
For today&#8217;s installment we go over getting some basic libraries up to shape.   If your Linux distro is old enough, you can&#8217;t use 3rd party binaries like Adobe Acrobat Reader (acroread), Firefox, and Flash because the [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a linux user and don't have root access. </tt></p>
<p>For today&#8217;s installment we go over getting some basic libraries up to shape.   If your Linux distro is old enough, you can&#8217;t use 3rd party binaries like Adobe Acrobat Reader (acroread), Firefox, and Flash because the GTI+ and GLIB libraries that they are compiled against are just too damned old.   So we have to both install local copies, and have the applications find those copies instead of the system ones. </p>
<h2>On Versions</h2>
<p>It&#8217;s good to note that you can upgrade a <i>newer</i> version of most things, but don&#8217;t expect to always get the <i>newest</i> version.  Instead you need to find the next newest version that still works on your old Linux distro while satisfying the prerequisites for your favorite applications.</p>
<h2>GTK+ and GLIB and RHEL4</h2>
<p>Here are the packages I installed in order to get GTK+ and GLIB up to date enough to use Firefox, Pidgin, Thunderbird, Acrobat, and some other goodies on Red Hat EL4 (Fedora 4 should be similar) :</p>
<ol>
<li>atk-1.25.2.tar.bz2 &#8211; Needed by Pidgin
</li>
<li>pixman-0.13.2.tar.gz
</li>
<li>libxml2-2.6.30.tar.bz2 &#8211; Needed by Pidgin, the EL4 version is horribly broken and Gtalk / Jabber end up w/ a very weird send-only behavior
</li>
<li>pkg-config-0.23.tar.gz &#8211; Needed by most everything.  You will have a new package repository in $HOME/lib/pkg-config for your new libraries.
</li>
<li>cairo-1.8.6.tar.gz
</li>
<li>dbus-1.2.12.tar.gz
</li>
<li>dbus-glib-0.78.tar.gz
</li>
<li>glib-2.19.5.tar.bz2
</li>
<li>pango-1.22.4.tar.bz2
</li>
<li>zlib-1.2.3.tar.bz2 &#8211; RHEL4 version is crap.
</li>
<li>gtk+-2.14.7.tar.bz2
</li>
</ol>
<p>Order does count, but I don&#8217;t remember what order I compiled and installed these in.  Trial and error will tell.  Use <a HREF="http://warped.org/blog/2009/03/04/chown3d-a-linux-distro-in-your-home-directory/">config_gapp from Part 1</a> to compile.</p>
<p> You will need to do this on each of the above :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xvfj gtk+-2.14.7.tar.bz2
$ <span style="color: #7a0874; font-weight: bold;">cd</span> gtk+-2.14.7
$ ..<span style="color: #000000; font-weight: bold;">/</span>config_gapp
$ <span style="color: #c20cb9; font-weight: bold;">make</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Remember this is installing these libraries into $HOME/lib using the config_gapp script. </p>
<p>Some of the libraries might take some extra args to make things happy.</p>
<ol>
<li>zlib &#8211; I need to add -fPIC to make mozilla happy

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #007800;">CFLAGS</span>=-fPIC ..<span style="color: #000000; font-weight: bold;">/</span>config_gapp</pre></div></div>

</li>
<li>gtk+-2.14.7 &#8211; I had to add &#8211;without-libjasper
<pre lang=bash>$ ../config_gapp --without-libjasper</pre>
</li>
</ol>
<p>Some blood sweat and tears later, and now you should be able to run a binary version of Firefox if you are on a 32-bit RHEL4 machine. </p>
<h2>Running Apps using the Libraries in your Home Directory</h2>
<p>In order to have applications grab the libraries in your home directory instead of the system ones, I use a wrapper script that sets up a bunch of needed environment variables.  I call this script &#8220;run_gapp&#8221; :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># install apps using local versions of libraries for this platform</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># This script is for an x86_64 machine</span>
<span style="color: #666666; font-style: italic;"># Remove 64 anywhere below if you are on a 32-bit build</span>
&nbsp;
<span style="color: #007800;">LOC_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>me
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">${LOC_HOME}</span>/include -I/usr/X11R6/include <span style="color: #007800;">$CPPFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">${LOC_HOME}</span>/include -I/usr/X11R6/include <span style="color: #007800;">$CFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CXXFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">${LOC_HOME}</span>/include -I/usr/X11R6/include <span style="color: #007800;">$CXXFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LDFLAGS</span>=<span style="color: #ff0000;">&quot;-L<span style="color: #007800;">${LOC_HOME}</span>/lib -L/usr/X11R6/lib -L/usr/lib64 <span style="color: #007800;">$LDFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${LOC_HOME}</span>/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/pkgconfig:<span style="color: #007800;">$PKG_CONFIG_PATH</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${LOC_HOME}</span>/lib:/usr/X11R6/lib64:/usr/lib64:<span style="color: #007800;">$LD_LIBRARY_PATH</span>&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>

<p>Now to run a binary we just use the wrapper</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">run_gapp <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>firefox</pre></div></div>

<p>Next up we&#8217;ll explore building some applications like pidign, firefox, amarok, xine-lib and more.</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>chown3d &#8211; A Linux distro in your home directory</title>
		<link>http://warped.org/blog/2009/03/04/chown3d-a-linux-distro-in-your-home-directory/</link>
		<comments>http://warped.org/blog/2009/03/04/chown3d-a-linux-distro-in-your-home-directory/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 19:18:55 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[chown3d]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=29</guid>
		<description><![CDATA[I&#8217;m coining a new term here : chown3d (or ch0wn3d depending on how l33t you are).    
ch0wned. adj. This is the state when you are a linux user and don't have root access. 
This is the case for a lot of people working Corporate jobs as engineers, including me.   I realized chr00ted is a more appropriate [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m coining a new term here : <b>chown3d</b> (or ch0wn3d depending on how l33t you are).    </p>
<p><tt>ch0wned. adj. This is the state when you are a linux user and don't have root access. </tt></p>
<p>This is the case for a lot of people working Corporate jobs as engineers, including me.   I realized chr00ted is a more appropriate term, but then I couldn&#8217;t work 0wned into it.</p>
<p>So this post is the first in a serious of HOWTOs about maintaining a Linux distro out of your home directory.  This allows you to download, compile, and use the latest software while being restricted to god-awful old version of Linux.   When I say old, I&#8217;m talking about my company just &#8220;upgraded&#8221; me from Red Hat Enterprise 3 (RHEL 3), circa 2003 to Red Hat Enterprise 4 (RHEL 4) circa 2006.   If I want to use a browser or e-mail client that has the latest security patches, forget it!</p>
<h2>Compiling</h2>
<p>About 90% of the open source apps out there use autoconf to setup compilation using gmake.   The first thing we need to do is tell it that we are going to install this directory into our home directory.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>me</pre></div></div>

<p>However, if you happen to have a lot of dependency libraries installed in your home directory we will need to setup a few environment variables too.   So instead I setup a shell script that sets-up the environment and calls configure.   I call this script &#8220;config_gapp&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># install apps using local versions of glib</span>
<span style="color: #666666; font-style: italic;"># into home directory</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># This version setup for x86_64 full 64-bit</span>
<span style="color: #666666; font-style: italic;"># Remove &quot;64&quot; anywhere below for a 32-bit build.</span>
&nbsp;
<span style="color: #007800;">LOCAL_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>me
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># I try not to maintain my own gcc, but sometimes you gotta :</span>
<span style="color: #666666; font-style: italic;"># export CC=&quot;$LOCAL_HOME/bin/gcc&quot;</span>
<span style="color: #666666; font-style: italic;"># export GCC=$CC</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I/usr/X11R6/include <span style="color: #007800;">$CPPFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I/usr/X11R6/include <span style="color: #007800;">$CFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CXXFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I/usr/X11R6/include  <span style="color: #007800;">$CXXFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LDFLAGS</span>=<span style="color: #ff0000;">&quot;-L<span style="color: #007800;">$LOCAL_HOME</span>/lib -L/usr/lib64 -L/usr/X11R6/lib64 <span style="color: #007800;">$LDFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pkg-config
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib/pkgconfig:/usr/lib64/pkgconfig:<span style="color: #007800;">$PKG_CONFIG_PATH</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib:/usr/X11R6/lib64:/usr/lib64&quot;</span>
<span style="color: #666666; font-style: italic;">#export ACLOCAL_FLAGS=&quot;-I /home/maxb/share/aclocal&quot;</span>
&nbsp;
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #007800;">$LOCAL_HOME</span> \
  <span style="color: #660033;">--x-includes</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>X11R6<span style="color: #000000; font-weight: bold;">/</span>include \
  <span style="color: #660033;">--x-libraries</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>X11R6<span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>

<p>The astute reader will notice that I have already compiled and installed my own copy of pkg-config because the one on EL4 is too old for most things to use.   I&#8217;ll cover that in the next post where I go over getting a somewhat modern version of the GTK+ and Glib libraries installed.  These are required for most anything modern like firefox, thunderbird, acrobat, and flash.</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/03/04/chown3d-a-linux-distro-in-your-home-directory/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
