<?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>BenV&#039;s notes &#187; slackware</title>
	<atom:link href="http://notes.benv.junerules.com/tag/slackware/feed/" rel="self" type="application/rss+xml" />
	<link>http://notes.benv.junerules.com</link>
	<description>Rants and notes</description>
	<lastBuildDate>Wed, 28 Jul 2010 13:36:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Missing /dev/sd* in slackware 13</title>
		<link>http://notes.benv.junerules.com/all/software/missing-devsd-in-slackware-13/</link>
		<comments>http://notes.benv.junerules.com/all/software/missing-devsd-in-slackware-13/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 13:09:49 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[udev]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=825</guid>
		<description><![CDATA[I&#8217;ve bashed my head into this problem at least three times now, so after finally running to google &#8230;. it made me search more than I liked. The problem descriptions: * Your system boots fine (maybe because it&#8217;s running on software raid), but your /dev/sd* files are gone. * Your system doesn&#8217;t boot anymore, complaining [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve bashed my head into this problem at least three times now, so after finally running to google &#8230;. it made me search more than I liked.</p>
<p>The problem descriptions:<br />
 * Your system boots fine (maybe because it&#8217;s running on software raid), but your <span style="color:#F00">/dev/sd*</span> files are gone.<br />
 * Your system doesn&#8217;t boot anymore, complaining about not finding your boot device when booting your custom kernel, but the stock kernel does work.<br />
 * Mounting partitions doesn&#8217;t work anymore, saying stuff like <code class="codecolorer text vibrant"><span class="text">mount: special device /dev/sda does not exist</span></code></p>
<p>Reason:<br />
 * Your custom kernel has CONFIG_SYSFS_DEPRECATED enabled. To find out:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv@uil$ zcat /proc/config.gz | grep CONFIG_SYSFS_DEPRECATED<br />
CONFIG_SYSFS_DEPRECATED=y</div></div>
<p>Since udev version 151 (or something close to that) this will sparsely populate /dev. Yay.</p>
<p>If you don&#8217;t believe it, check out <span style="color:#FF0">/usr/share/doc/udev-*/README</span>:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; - Udev will not work with the CONFIG_SYSFS_DEPRECATED* option.</div></div>
<p>Another problem solved.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/missing-devsd-in-slackware-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome</title>
		<link>http://notes.benv.junerules.com/all/software/awesome/</link>
		<comments>http://notes.benv.junerules.com/all/software/awesome/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 15:27:57 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=725</guid>
		<description><![CDATA[So every once in a while you have to mess around a bit with new stuff. Window managers for example. I&#8217;m quite happy with Fluxbox (been using it since I started with linux), but it&#8217;s nice to see something new once in a while. Especially since development on Fluxbox is kind of &#8230;. dead. Well, [...]]]></description>
			<content:encoded><![CDATA[<p>So every once in a while you have to mess around a bit with new stuff. Window managers for example.<br />
I&#8217;m quite happy with <a href="http://www.fluxbox.org/">Fluxbox</a> (been using it since I started with linux), but it&#8217;s nice to see something new once in a while. Especially since development on Fluxbox is kind of &#8230;. dead. Well, not completely, but there&#8217;s just not much to be added without totally changing the thing.<br />
My brother mentioned <a href="http://awesome.naquadah.org">Awesome</a> a few weeks ago, and during <a href="https://har2009.org/">HAR</a> last year it was also mentioned as something that I might like.<br />
Which means it&#8217;s time to check it out! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-725"></span></p>
<h3>First stop: the installation on Slackware 64. (you may skip this if you run some flavor of Pokemon OS <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).</h3>
<p>As I mentioned in my previous rant, the developers of Awesome have decided that they&#8217;re complete and utter idiots. That is, they forced me through CMake, which usually fills me with anger. Fortunately they didn&#8217;t include Boost in the mix, so after some cursing it can be installed.<br />
In order to get Awesome 3.4.3 installed, I needed to:</p>
<ul>
<li>Upgrade my <span style="color:#FFFF00">xcb-proto</span> to version 1.6 ** (<a href="http://xcb.freedesktop.org/dist/xcb-proto-1.6.tar.gz">source</a>)</li>
<li>Upgrade my <span style="color:#FFFF00">libxcb</span> to version 1.5 ** (<a href="http://xcb.freedesktop.org/dist/libxcb-1.5.tar.bz2">source</a>)</li>
<li>Upgrade my <span style="color:#FFFF00">xcb-util</span> to version 0.3.6 ** (<a href="http://xcb.freedesktop.org/dist/xcb-util-0.3.6.tar.bz2">source</a>)</li>
<li>Install <span style="color:#FFFF00">libstartup-notification</span> version 0.10 or higher ** (<a href="http://www.freedesktop.org/software/startup-notification/releases/startup-notification-0.10.tar.gz">source</a>)</li>
<li>Install <span style="color:#FFFF00">libxdg-basedir</span> version 1.0.2 or higher ** (<a href="http://n.ethz.ch/~nevillm/download/libxdg-basedir/libxdg-basedir-latest.tar.gz">source</a>)</li>
<li>Install <span style="color:#FFFF00">libev</span> ** (<a href="http://dist.schmorp.de/libev/libev-3.9.tar.gz">source</a>)</li>
<li>** indicates that the whole &#8216;wget, tar, configure, make, makepkg&#8217; riddle works fine with my slackbuild.pl script</li>
</ul>
<p>That was pretty easy with slackbuild.pl. Note that you might have to recompile cairo to enable xcb support (it&#8217;s a configure flag that used to be disabled on Slackware). Mine didn&#8217;t need it though.<br />
Next is building Awesome. If you don&#8217;t want Awesome scattered all over /usr/local/share you might want to give CMake some hints. See my previous rant about setting this permanently.<br />
Today I used this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>awesome-3.4.2$ <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CMAKE_ARGS</span>=<span style="color: #ff0000;">&quot;-DCMAKE_INSTALL_PREFIX=/usr -DPREFIX=/usr -DAWESOME_DOC_PATH=/usr/share/doc/awesome -DAWESOME_MAN_PATH=/usr/share/man -DAWESOME_XSESSION_PATH=/usr/share/xsessions -DSYSCONFDIR=/etc -DXDG_CONFIG_HOME=/etc/xdg&quot;</span></div></div>
<p>After that, &#8216;make&#8217; should compile it properly, and you can use slackbuild.pl to make a package out of it. (or make DESTDIR=bla, makepkg yadieyada).</p>
<h3>Second stop: Testing Awesome</h3>
<p>I still like to type startx every time I booted my machine, so for me the thing to change was the file <span style="color:#FF00FF">~/.xinitrc</span>.<br />
Something like:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># No more fluxbox for now, we want to try Awesome!</span><br />
<span style="color: #666666; font-style: italic;"># exec /usr/bin/startfluxbox</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <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>awesome</div></div>
<p>Kill your X and startx, and voila! The first error.<br />
<div id="attachment_734" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/02/awesome-setbg-segfault.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/02/awesome-setbg-segfault-300x27.png" alt="Awesome&#039;s first error!" title="Awesome&#039;s first error!" width="300" height="27" class="size-medium wp-image-734" /></a><p class="wp-caption-text">Awesome's first error!</p></div><br />
Well, that&#8217;s off to a good start. Apparently the wmsetbg program segfaulted on that image. Don&#8217;t ask me why, it works fine on another PNG. Probably some transparency or layer issue, dunno. Not important for now.</p>
<p>First impression: looks clean.<br />
A tiny menu bar / panel / whatever you want to call it that shows the running programs and the date.<br />
The default shortcut to do everything seems to be the windows button, or mod4. I&#8217;m not sure if I like this, since alt was already cramping my thumb every now and then <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
However, this can be changed, so no big deal. mod4-enter starts a console. Good. It&#8217;s fast too!<br />
Hitting mod4-enter a few times looks like this:<br />
<div id="attachment_736" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2010/02/57.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/02/57-300x187.png" alt="Awesome after hitting mod4-enter a bunch of times" title="Awesome after hitting mod4-enter a bunch of times" width="300" height="187" class="size-medium wp-image-736" /></a><p class="wp-caption-text">Awesome after hitting mod4-enter a bunch of times</p></div><br />
As you might be able to see if you try, the terminal windows are all tiled next to each other. Resizing with mod4 and right mouse also works. Or mod4-f for fullscreen&#8230; or mod4-m for maximize. Yup, I like it so far.</p>
<p>Needless to say there are tons of things to try out and customize, but you might want to check out <a href="http://awesome.naquadah.org/wiki/My_first_awesome">this guide</a> for starting out with awesome. I did <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Maybe it will even replace Fluxbox&#8230;. we&#8217;ll see. Time to mess around with it some more.<br />
Keep up the good work Awesome developers&#8230;. and switch to autoconf!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Gears 64 bits for Firefox 3.6 (64 bits) on Slackware 64</title>
		<link>http://notes.benv.junerules.com/all/software/google-gears-64-bits-for-firefox-3-6-64-bits-on-slackware-64/</link>
		<comments>http://notes.benv.junerules.com/all/software/google-gears-64-bits-for-firefox-3-6-64-bits-on-slackware-64/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 14:32:42 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=718</guid>
		<description><![CDATA[Yesterday Slackware64-current gave me Firefox 3.6. So far I&#8217;m happy to note that this broke more than half my addons, but that&#8217;s to be expected with that addon-hell. Wonder when they clean up that act and start including required stuff like firebug. Anyway, a while ago I built google gears for firefox 3.5. Since Google [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday Slackware64-current gave me Firefox 3.6. So far I&#8217;m happy to note that this broke more than half my addons, but that&#8217;s to be expected with that addon-hell.<br />
Wonder when they clean up that act and start including required stuff like firebug. Anyway, a while ago I built <a href="http://notes.benv.junerules.com/all/software/google-gears-on-slackware-64-and-firefox/">google gears for firefox 3.5</a>. Since Google is too incompetent to provide a 64 bit linux version, you have to do it yourself, which I did. However, with the Firefox 3.6 upgrade this addon also broke. <span id="more-718"></span></p>
<p>Last time I explained in detail the steps needed to build it on slackware 64. So I&#8217;ll only summarize and tell you about the new problems I ran into.<br />
First, install libnotify. The new xpcom stuff seems to require it.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># slackbuild.pl http://galago-project.org/files/releases/source/libnotify/libnotify-0.4.5.tar.bz2</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">&lt;</span>smash enter a few <span style="color: #7a0874; font-weight: bold;">times</span><span style="color: #000000; font-weight: bold;">&gt;</span>:q<span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">more</span> enters<span style="color: #000000; font-weight: bold;">&gt;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #666666; font-style: italic;"># installpkg /usr/src/packages/libnotify-0.4.5-x86_64-1.tgz</span></div></div>
<p>How I love my <a href="http://notes.benv.junerules.com/slackbuild-pl/">slackbuild</a> sometimes <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Next, get the FF3.6 source and build the xpcom stuff:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src ; <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.mozilla.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>mozilla.org<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>releases<span style="color: #000000; font-weight: bold;">/</span>latest<span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>firefox-<span style="color: #000000;">3.6</span>.source.tar.bz2 ; <span style="color: #c20cb9; font-weight: bold;">tar</span> jxvf firefox-<span style="color: #000000;">3.6</span>.source.tar.bz2<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.2 &nbsp;<span style="color: #666666; font-style: italic;"># dir name differs from tarball, idiots.</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-application</span>=xpcom<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> config<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> nsprpub<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> xpcom<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> tools_tier_xpcom <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
<p>Finally, symlink the newly built xpcom tools over the google provided ones and build gears. I assume you can check out the google gears sources yourself, otherwise see my previous rant on this.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears<br />
<span style="color: #c20cb9; font-weight: bold;">svn</span> up<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> clean<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears<br />
<span style="color: #000000; font-weight: bold;">for</span> k <span style="color: #000000; font-weight: bold;">in</span> xpidl xpt_link xpt_dump regxpcom<br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span><br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.2<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span><br />
<span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #000000; font-weight: bold;">for</span> k <span style="color: #000000; font-weight: bold;">in</span> libxpcom.so libnspr4.so libxpcomglue_s.a<br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>lib64 <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null<br />
&nbsp; <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.2<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$k</span><br />
<span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #666666; font-style: italic;"># Xul is also needed</span><br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>firefox-<span style="color: #000000;">3.6</span><span style="color: #000000; font-weight: bold;">/</span>libxul.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.2<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>lib64<br />
<span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdio.h -include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h -include /usr/include/pthread.h -D_XOPEN_SOURCE=600&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF36</div></div>
<p>If you&#8217;re wondering about the CPPFLAGS, if you skip this the thing will break down completely. THAT&#8217;s why intelligent people use a configure script for that shit. Too difficult for google I suppose.</p>
<p>Anyhow, now we still want a nice .xpi installer.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdio.h -include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h -include /usr/include/pthread.h -D_XOPEN_SOURCE=600&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF36 installers</div></div>
<p>Which barfs because some slut thought it also needed ff3(1) junk. Which I don&#8217;t agree with. So note that this breaks the .xpi for firefox ancient edition.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> &nbsp;bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span> bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff36<span style="color: #000000; font-weight: bold;">/</span>libgears.so bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>libgears.so<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff36<span style="color: #000000; font-weight: bold;">/</span>libgears.so bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>libgears.so<br />
<span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdio.h -include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h -include /usr/include/pthread.h -D_XOPEN_SOURCE=600&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF36 installers</div></div>
<p>Tada. Installer at <span style="color:#FF00FF">bin-opt/installers/gears-linux-x86_64-opt-0.5.34.0.xpi</span>.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/google-gears-64-bits-for-firefox-3-6-64-bits-on-slackware-64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teamspeak 3 / epoll issue fixed</title>
		<link>http://notes.benv.junerules.com/all/software/teamspeak-3-epoll-issue-fixed/</link>
		<comments>http://notes.benv.junerules.com/all/software/teamspeak-3-epoll-issue-fixed/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 15:12:05 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[glibc]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[teamspeak]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=712</guid>
		<description><![CDATA[After a few days of waiting on a reply on the forums I got tired of waiting. So my possible solutions: Either switch to a newer glibc (which probably comes down to upgrading to slackware 13, not in the mood for that) or move the teamspeak server to a new domU. Since it couldn&#8217;t possible [...]]]></description>
			<content:encoded><![CDATA[<p>After a few days of waiting on a reply on the forums I got tired of waiting. So my possible solutions: Either switch to a newer glibc (which probably comes down to upgrading to slackware 13, not in the mood for that) or move the teamspeak server to a new domU. Since it couldn&#8217;t possible *cough* be kernel related, I figured the problem had to be in glibc somewhere.<span id="more-712"></span><br />
To remind you guys of the problem, check out this post: <a href="http://notes.benv.junerules.com/all/software/teamspeak-3/">Teamspeak 3</a>.<br />
Or summarized: starting Teamspeak 3 server beta 16 on Slackware 11 (32 bit) fails with:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000;">2010</span>-01-<span style="color: #000000;">22</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">16</span>:<span style="color: #000000;">12.282194</span><span style="color: #000000; font-weight: bold;">|</span>WARNING <span style="color: #000000; font-weight: bold;">|</span>VirtualServer <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #660033;">--------------------------------------------------------</span><br />
terminate called after throwing an instance of <span style="color: #ff0000;">'boost::exception_detail::clone_impl&lt;boost::except ion_detail::error_info_injector&lt;boost::system::sys tem_error&gt; &gt;'</span><br />
what<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: epoll: Function not implemented<br />
Aborted</div></div>
<p>So I wondered how to figure out the problem. Digging around in libc gave some insight:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">strings</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libc.so.6 <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> epoll <br />
epoll_wait<br />
epoll_ctl<br />
epoll_create<br />
warning: epoll_create is not implemented and will always fail<br />
warning: epoll_ctl is not implemented and will always fail<br />
warning: epoll_wait is not implemented and will always fail</div></div>
<p>Say what? Will always fail? That explains&#8230;. but why?!<br />
Apparently there is another libc library that normally gets used that DOES have the proper epoll support, it is in /lib/tls . Weren&#8217;t it that the tls dir was renamed because Xen complained about it, so it doesn&#8217;t get used.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ &nbsp;<span style="color: #c20cb9; font-weight: bold;">strings</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>tls.disabled<span style="color: #000000; font-weight: bold;">/</span>libc.so.6 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> epol <br />
epoll_wait<br />
epoll_ctl<br />
epoll_create<br />
__GI_epoll_ctl<br />
__GI_epoll_wait<br />
__GI_epoll_create<br />
epoll_wait<br />
epoll_ctl<br />
epoll_create</div></div>
<p>No warnings. However, a quick workaround to test this conclusion with LD_PRELOAD:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>teamspeak<span style="color: #000000; font-weight: bold;">/</span>teamspeak_server-b16<span style="color: #666666; font-style: italic;"># LD_PRELOAD=&quot;/lib/tls.disabled/libc.so.6 &nbsp;/lib/tls.disabled/libpthread-2.3.6.so&quot; setuidgid teamspeak ./ts3server_linux_x86</span><br />
TeamSpeak Server 3.0.0-beta16 <span style="color: #7a0874; font-weight: bold;">&#91;</span>Build: <span style="color: #000000;">9929</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span>TeamSpeak Systems GmbH<br />
<br />
Logging started<br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.448370</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>ServerLibPriv <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Server Version: 3.0.0-beta16 <span style="color: #7a0874; font-weight: bold;">&#91;</span>Build: <span style="color: #000000;">9929</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.448993</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>DatabaseQuery <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> dbPlugin name: &nbsp; &nbsp;SQLite3 plugin, <span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span>TeamSpeak Systems GmbH<br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.449415</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>DatabaseQuery <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> dbPlugin version: 3.6.21<br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.449913</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>DatabaseQuery <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> checking database integrity<br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.605166</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Licensing Information<br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.606004</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">type</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Non-profit<br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.606884</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> starting <span style="color: #c20cb9; font-weight: bold;">date</span> &nbsp; &nbsp; : Mon Jan <span style="color: #000000;">11</span> 00:00:00 <span style="color: #000000;">2010</span><br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.607657</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> ending <span style="color: #c20cb9; font-weight: bold;">date</span> &nbsp; &nbsp; &nbsp; : Tue Jan <span style="color: #000000;">11</span> 00:00:00 <span style="color: #000000;">2011</span><br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.608393</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> max virtualservers: <span style="color: #000000;">10</span><br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.608856</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Accounting &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> max slots &nbsp; &nbsp; &nbsp; &nbsp; : <span style="color: #000000;">512</span><br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.639110</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>FileManager &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">bind</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> failed: <span style="color: #000000;">98</span><br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.639691</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>FileManager &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">bind</span> failed on 0.0.0.0:<span style="color: #000000;">30033</span><br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.690035</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>VirtualServer <span style="color: #000000; font-weight: bold;">|</span> &nbsp;<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">bind</span> failed on 0.0.0.0:<span style="color: #000000;">9987</span><br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.690658</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>VirtualSvrMgr <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> loading VirtualServer<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> failed to start, error: unable to <span style="color: #7a0874; font-weight: bold;">bind</span> network port<br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.764504</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>VirtualServer <span style="color: #000000; font-weight: bold;">|</span> &nbsp;<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">|</span> stopped<br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.765957</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>Query &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> 0.0.0.0:<span style="color: #000000;">10011</span> unable to <span style="color: #7a0874; font-weight: bold;">bind</span> error: <span style="color: #000000;">98</span>:Address already <span style="color: #000000; font-weight: bold;">in</span> use<br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.766585</span><span style="color: #000000; font-weight: bold;">|</span>ERROR &nbsp; <span style="color: #000000; font-weight: bold;">|</span>Query &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #7a0874; font-weight: bold;">bind</span> failed on 0.0.0.0:<span style="color: #000000;">10011</span><br />
<span style="color: #000000;">2010</span>-01-<span style="color: #000000;">25</span> 09:<span style="color: #000000;">34</span>:<span style="color: #000000;">17.864334</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>Query &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> whitelist ips: 127.0.0.1,</div></div>
<p>Ha, that&#8217;s more like it. Yeah, it fails to start because I still have the beta 12 running in another dir, but it doesn&#8217;t give the error anymore.</p>
<p>Googling a bit to find some details on Slackware 11 and glibc gave me a discussion somewhere on a mailinglist that mentioned that the glibc in /lib was compiled against<br />
2.4 headers, while the /lib/tls version was compiled against 2.6 headers. That explains!<br />
In other words, time to recompile glibc against the proper headers.<br />
However, that task is a bit too cumbersome to post here. Long story short: it took me half the day to meddle with the glibc.Slackbuild script (and get the right kernel headers installed, etc) and I finally have a new glibc which works.</p>
<p>So, if you&#8217;re looking for a quick fix: use the LD_PRELOAD trick. For the more daring amongst you: upgrade your glibc &#8212; but beware that this is a DANGEROUS thing to do since it will break many things. Of course you could also upgrade to Slackware 13 and be done with it <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/teamspeak-3-epoll-issue-fixed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Teamspeak 3</title>
		<link>http://notes.benv.junerules.com/all/software/teamspeak-3/</link>
		<comments>http://notes.benv.junerules.com/all/software/teamspeak-3/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 16:09:51 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[teamspeak]]></category>
		<category><![CDATA[ventrilo]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=705</guid>
		<description><![CDATA[A week or two ago I installed the latest teamspeak 3 beta on our server to check out how well it works these days. I was impressed by how far they have come. Back when I still played WoW we always used Ventrilo version 2. We never ugpraded to the new 3 version (even though [...]]]></description>
			<content:encoded><![CDATA[<p>A week or two ago I installed the latest teamspeak 3 beta on our server to check out how well it works these days.<br />
I was impressed by how far they have come. Back when I still played WoW we always used Ventrilo version 2. We never ugpraded to the new 3 version (even though thats illegal according to them&#8230;.) because version 3 had a 10 slot limitation on the free server version. Of course they don&#8217;t tell you how much a license for version 3 costs, unless you want to host more than 1000 slots. Paying for Ventrilo would be fine, but paying for 1000 slots? Ha. And yeah, there are hosts that specialize in that (and make you pay through the nose for it), but we wanted to host it ourselves.</p>
<p>Anyway, Teamspeak 3 has a much better view of the world. They offer a -free- personal (that means non commercial!) non-profit license. This means if you&#8217;re a guild you can obtain a license<br />
from them for free <a href="http://npl.tritoncia.com/ts3npl.php">over here</a> which allows you to host your own Teamspeak 3 server with 10 virtual servers and 512 slots. That&#8217;s more like it!<br />
And if you ARE commercial, their licenses are well defined and very affordable. For instance a 1 year license for 25 slots is only $25. Compare that to Ventrilo 2 providers that ask you E10,- per month. Ha.<br />
Oh, did I mention that they DO have a linux client? And windows and mac of course&#8230;. including the 64 bit versions. Lovely <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2010/01/ts3-beta-linux-client.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2010/01/ts3-beta-linux-client-300x290.png" alt="" title="ts3-beta-linux-client" width="300" height="290" class="alignnone size-medium wp-image-706" /></a></p>
<p>However, as it&#8217;s still in beta I run into some problems every now and then. Today I was asked to upgade the b12 server to the latest. So I tried.<br />
Result:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000;">2010</span>-01-<span style="color: #000000;">22</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">16</span>:<span style="color: #000000;">11.447045</span><span style="color: #000000; font-weight: bold;">|</span>INFO &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span>ServerLibPriv <span style="color: #000000; font-weight: bold;">|</span> &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Server Version: 3.0.0-beta16 <span style="color: #7a0874; font-weight: bold;">&#91;</span>Build: <span style="color: #000000;">9929</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> blabla <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
terminate called after throwing an instance of <span style="color: #ff0000;">'boost::exception_detail::clone_impl&lt;boost::exception_detail::error_info_injector&lt;boost::system::system_error&gt; &gt;'</span><br />
&nbsp; what<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: &nbsp;epoll: Function not implemented<br />
Aborted</div></div>
<p>&#8230;. welcome back my friend&#8230;. <span style="color:#FF0000"><strong>BOOST</strong></span> &#8230;. always the fucking same with that piece of rubbish.<br />
However, to be fair this could very well be a &#8220;learn to code&#8221; problem by teamspeak, but still&#8230; it&#8217;s always boost the brings the curses.<br />
So what is it complaining now? I don&#8217;t have epoll? Seriously? Let&#8217;s see about that.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># uname -a</span><br />
Linux blue 2.6.32.2-xenU <span style="color: #666666; font-style: italic;">#1 SMP Thu Dec 24 15:55:52 CET 2009 i686 athlon-4 i386 GNU/Linux</span><br />
<span style="color: #666666; font-style: italic;"># zcat /proc/config.gz &nbsp;| grep -i epol</span><br />
<span style="color: #007800;">CONFIG_EPOLL</span>=y</div></div>
<p>So that&#8217;s not it.<br />
The forum has <a href="http://forum.teamspeak.com/showthread.php?t=50088">this thread</a> suggesting it might be glibc that&#8217;s too old.<br />
However, this particular slackware 11 server has glibc version 2.3.6, which should be old enough (according to that forum thread at least). Just in case it&#8217;s not I&#8217;ll try upgrading that later.<br />
In the meanwhile <a href="http://forum.teamspeak.com/showthread.php?t=50376">I created a thread on this problem on the forums</a>, let&#8217;s see what they suggest. I&#8217;ll put updates here.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/teamspeak-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Deluge issue</title>
		<link>http://notes.benv.junerules.com/all/software/deluge-issue/</link>
		<comments>http://notes.benv.junerules.com/all/software/deluge-issue/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 11:52:39 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[deluge]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=689</guid>
		<description><![CDATA[This morning I noticed my torrent daemon (aka Deluge) was down. Checking the logs revealed this: &#91;ERROR &#160; &#93; 12:22:01 main:216 libboost_filesystem-mt.so: cannot open shared object file: No such file or directory Traceback &#40;most recent call last&#41;: &#160; File &#34;/usr/lib/python2.6/site-packages/deluge/main.py&#34;, line 209, in start_daemon &#160; &#160; Daemon&#40;options, args&#41; &#160; File &#34;/usr/lib/python2.6/site-packages/deluge/core/daemon.py&#34;, line 134, in __init__ [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I noticed my torrent daemon (aka <a href="http://deluge-torrent.org/">Deluge</a>) was down. <span id="more-689"></span><br />
Checking the logs revealed this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ERROR &nbsp; <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000;">12</span>:<span style="color: #000000;">22</span>:01 main:<span style="color: #000000;">216</span> libboost_filesystem-mt.so: cannot open shared object <span style="color: #c20cb9; font-weight: bold;">file</span>: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory<br />
Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:<br />
&nbsp; File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/main.py&quot;</span>, line <span style="color: #000000;">209</span>, <span style="color: #000000; font-weight: bold;">in</span> start_daemon<br />
&nbsp; &nbsp; Daemon<span style="color: #7a0874; font-weight: bold;">&#40;</span>options, args<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/core/daemon.py&quot;</span>, line <span style="color: #000000;">134</span>, <span style="color: #000000; font-weight: bold;">in</span> __init__<br />
&nbsp; &nbsp; from deluge.core.core import Core<br />
&nbsp; File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/core/core.py&quot;</span>, line <span style="color: #000000;">36</span>, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; from deluge._libtorrent import lt<br />
&nbsp; File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/_libtorrent.py&quot;</span>, line <span style="color: #000000;">59</span>, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; import libtorrent <span style="color: #c20cb9; font-weight: bold;">as</span> lt<br />
ImportError: libboost_filesystem-mt.so: cannot open shared object <span style="color: #c20cb9; font-weight: bold;">file</span>: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory</div></div>
<p>Interesting. Suddenly I reminded myself of some Slackware updates that probably installed a new version of boost yesterday, replacing my own version.</p>
<p>Oh well, since it seems to be the libtorrent part that&#8217;s bugging, I might as well upgrade it:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>project<span style="color: #000000; font-weight: bold;">/</span>libtorrent<span style="color: #000000; font-weight: bold;">/</span>libtorrent<span style="color: #000000; font-weight: bold;">/</span>libtorrent-0.14.7<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7.tar.gz?<span style="color: #007800;">use_mirror</span>=freefr<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Leech leech</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxf libtorrent-rasterbar-0.14.7.tar.gz<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Kaboom, in your /usr/src</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> libtorrent-rasterbar-0.14.7<br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-dependency-tracking</span> <span style="color: #660033;">--enable-shared</span> <span style="color: #660033;">--enable-static</span> <span style="color: #660033;">--enable-python-binding</span> <span style="color: #660033;">--with-boost</span> <span style="color: #660033;">--with-libgeoip</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># lalala, junk</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7$ <span style="color: #c20cb9; font-weight: bold;">make</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># See you in an hour</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> pkg ; <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">DESTDIR</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #000000; font-weight: bold;">`/</span>pkg <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> pkg<br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7<span style="color: #000000; font-weight: bold;">/</span>pkg$ makepkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7-i386-<span style="color: #000000;">1</span>.tgz<br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7<span style="color: #000000; font-weight: bold;">/</span>pkg$ upgradepkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>libtorrent-rasterbar-0.14.7-i386-<span style="color: #000000;">1</span>.tgz</div></div>
<p>(or you could have used slackbuild.pl, it&#8217;s easier <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<p>After upgrading the package, deluge starts again. Wheee.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/deluge-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 2.2 and PHP configuration fun on Slackware 13</title>
		<link>http://notes.benv.junerules.com/all/software/apache-2-2-and-php-configuration-fun-on-slackware-13/</link>
		<comments>http://notes.benv.junerules.com/all/software/apache-2-2-and-php-configuration-fun-on-slackware-13/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:49:30 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=669</guid>
		<description><![CDATA[As I love to tinker around with apache/php installations to get them to work as fast as possible while still keeping some security in tact, I found myself messing around with FastCGI today. But why?! Here&#8217;s why: On this machine I previously installed suPhP to get php scripts to run as a normal unix user [...]]]></description>
			<content:encoded><![CDATA[<p>As I love to tinker around with apache/php installations to get them to work as fast as possible while still keeping some security in tact, I found myself messing around with <a href="http://www.fastcgi.com/">FastCGI</a> today. But why?! Here&#8217;s why:<br />
On this machine I previously installed <a href="http://www.suphp.org/">suPhP</a> to get php scripts to run as a normal unix user instead of user apache (so users have the ability to completely lock out their database settings etc for other users on that machine). However, to speed stuff up on a <a href="http://www.magentocommerce.com/">magento</a> webshop I wanted to have a PHP opcode cache running (I tried out <a href="http://pecl.php.net/package/APC">APC</a>).<span id="more-669"></span><br />
Those opcode caches don&#8217;t work very well (read: they only slow things down) if you run php the way it&#8217;s supposed to run under suPHP though, because suPHP needs to be run using php&#8217;s CGI mode. This means no mod_php, but instead starting a new php instance for every request. Not only is this expensive in terms of startup costs, but it also makes those caches completely useless. (since they can&#8217;t share any memory without resorting to state files or some sort of uglyness).</p>
<p>Anyway, suphp is still nice to have for simple sites that don&#8217;t get many hits or don&#8217;t need to be very fast. Therefore I wanted to have both options available. Here&#8217;s how.<br />
I started out with the Slackware packages for php and apache, but soon found both to be inadequate. Php lacked some modules that some site wanted, and apache didn&#8217;t even bring suexec along.<br />
However, the slackware layout is good enough so I altered the slackbuild script a bit and built my own apache. You might need to install some packages as dependencies though. For instance I didn&#8217;t have &#8216;expat&#8217; and &#8216;db44&#8242; installed.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>it:~$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span> ; <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources$ lftp <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.nluug.nl<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-<span style="color: #000000;">13.0</span><span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ok, <span style="color: #007800;">cwd</span>=<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-<span style="color: #000000;">13.0</span><span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n<br />
lftp ftp.nluug.nl:<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-<span style="color: #000000;">13.0</span><span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #000000; font-weight: bold;">&gt;</span> mirror httpd<br />
&nbsp;<span style="color: #666666; font-style: italic;"># takes a while...</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources$ <span style="color: #7a0874; font-weight: bold;">cd</span> httpd<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.apache-mirror.com<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>httpd-2.2.14.tar.bz2<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd$ <span style="color: #c20cb9; font-weight: bold;">vim</span> httpd.SlackBuild</div></div>
<p>Now edit the slackbuild file so it compiles with your compile flags. My changes were:<br />
1. Changed VERSION to 2.2.14 (was 2.2.13)<br />
2. Added these to the configure flags (to enable suexec) around line 103:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #660033;">--enable-suexec</span> \<br />
&nbsp; <span style="color: #660033;">--with-suexec-bin</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>suexec \<br />
&nbsp; <span style="color: #660033;">--with-suexec-docroot</span>=<span style="color: #000000; font-weight: bold;">/</span>www \<br />
&nbsp; <span style="color: #660033;">--with-suexec-caller</span>=apache \<br />
&nbsp; <span style="color: #660033;">--with-suexec-uidmin</span>=<span style="color: #000000;">1000</span> \<br />
&nbsp; <span style="color: #660033;">--with-suexec-gidmin</span>=<span style="color: #000000;">100</span> \<br />
&nbsp; <span style="color: #660033;">--without-suexec-userdir</span> \</div></div>
<p>Compile and install it. Note that the suexec part requires root permissions, so I did this as root.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #666666; font-style: italic;"># bash httpd.SlackBuild</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># takes a while</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #666666; font-style: italic;"># mv /tmp/httpd-2.2.14-i386-1.txz /usr/src/packages</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #666666; font-style: italic;"># installpkg /usr/src/packages/httpd-2.2.14-i386-1.txz</span></div></div>
<h3>PHP and suPHP</h3>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>nl3.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>php-5.2.12.tar.bz2<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>nl.php.net<span style="color: #000000; font-weight: bold;">/</span>mirror<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Leech leech... and tomorrow there will be a new version since you're compiling it today. That's my luck ;)</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> jxf php-5.2.12.tar.bz2<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> php-5.2.12<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Pick your own configure string, but note that we don't build mod_php, so no --with-apxs!</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>php-5.2.12$ &nbsp;.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-fastcgi</span> <span style="color: #660033;">--enable-force-cgi-redirect</span> <span style="color: #660033;">--with-config-file-path</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php <span style="color: #660033;">--with-openssl</span> <span style="color: #660033;">--with-zlib</span> <span style="color: #660033;">--enable-bcmath</span> <span style="color: #660033;">--with-bz2</span> <span style="color: #660033;">--enable-calendar</span> <span style="color: #660033;">--with-curl</span> <span style="color: #660033;">--enable-dba</span>=shared <span style="color: #660033;">--enable-exif</span> <span style="color: #660033;">--enable-ftp</span> <span style="color: #660033;">--with-gd</span> <span style="color: #660033;">--with-ttf</span> <span style="color: #660033;">--with-t1lib</span> <span style="color: #660033;">--enable-gd-native-ttf</span> <span style="color: #660033;">--enable-gd-jis-conv</span> <span style="color: #660033;">--with-gettext</span> <span style="color: #660033;">--with-gmp</span> <span style="color: #660033;">--with-imap</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>c-client <span style="color: #660033;">--with-imap-ssl</span> <span style="color: #660033;">--enable-mbstring</span> <span style="color: #660033;">--with-mcrypt</span> <span style="color: #660033;">--with-mhash</span> <span style="color: #660033;">--with-mysql</span> <span style="color: #660033;">--with-mysqli</span> <span style="color: #660033;">--with-ncurses</span> <span style="color: #660033;">--with-pspell</span> <span style="color: #660033;">--with-mm</span> <span style="color: #660033;">--enable-shmop</span> <span style="color: #660033;">--enable-soap</span> <span style="color: #660033;">--enable-sockets</span> <span style="color: #660033;">--enable-sqlite-utf8</span> <span style="color: #660033;">--enable-sysvmsg</span> <span style="color: #660033;">--enable-sysvsem</span> <span style="color: #660033;">--enable-sysvshm</span> <span style="color: #660033;">--with-tidy</span> <span style="color: #660033;">--with-xsl</span> <span style="color: #660033;">--enable-zip</span> <span style="color: #660033;">--with-tsrm-pthreads</span> <span style="color: #660033;">--enable-shared</span> <span style="color: #660033;">--enable-static</span> <span style="color: #660033;">--without-ldap</span> <span style="color: #660033;">--without-ldap-sasl</span> <span style="color: #660033;">--with-jpeg-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-freetype-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-xpm-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-pdo-mysql</span> <span style="color: #660033;">--with-png-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<br />
&nbsp;<span style="color: #666666; font-style: italic;"># barf barf</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>php-5.2.12$ &nbsp;<span style="color: #c20cb9; font-weight: bold;">make</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># see you tomorrow</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>php-5.2.12$ &nbsp;<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
<p>Note that since php is a pleuris product it will ignore the DESTDIR variable that usually works for creating a package. If you want a nice package for php, consider using the slackware build script instead. (I was too lazy for it this time). Next suPHP:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.suphp.org<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxf suphp-0.7.1.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> suphp-0.7.1<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-checkpath</span> <span style="color: #660033;">--with-min-uid</span>=<span style="color: #000000;">1000</span> <span style="color: #660033;">--with-apache-user</span>=apache <span style="color: #660033;">--with-logfile</span>=<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>suphp_log <span style="color: #660033;">--with-apr</span>=<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>apr-<span style="color: #000000;">1</span>-config<br />
&nbsp;<span style="color: #666666; font-style: italic;"># lala</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">make</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> pkg<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">DESTDIR</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #000000; font-weight: bold;">`/</span>pkg <span style="color: #c20cb9; font-weight: bold;">install</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #7a0874; font-weight: bold;">cd</span> pkg <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> makepkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1-i386-<span style="color: #000000;">1</span>.tgz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> installpkg <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1-i386-<span style="color: #000000;">1</span>.tgz</div></div>
<p>That went smooth. PHP could learn something from this. Now we still need to configure suphp. To do this we create 2 files and alter <span style="color:#FF00FF">httpd.conf</span> a little.<br />
First suphp.conf:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>suphp.conf-example <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>suphp.conf<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>suphp-0.7.1$ <span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>suphp.conf</div></div>
<p>Personally I left most to default, but I did change the log path and the docroot.<br />
Next we need to enable it in apache, but to keep module stuff in their own section we put this in mod_suphp.conf which we include in the httpd.conf.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&gt;</span> mod_suphp.conf<br />
LoadModule suphp_module &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>mod_suphp.so<br />
<span style="color: #666666; font-style: italic;"># AddModule mod_suphp.c</span><br />
AddType application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php .php<br />
suPHP_AddHandler application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php<br />
&nbsp;<span style="color: #666666; font-style: italic;"># hit ctrl-d here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'Include /etc/httpd/mod_suphp.conf'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> httpd.conf</div></div>
<p>That should be enough. Now for sites that you want to enable suphp, simply add a few lines to their vhost config like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; suPHP_Engine on<br />
&nbsp; &nbsp; &nbsp; &nbsp; suPHP_ConfigPath <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php<br />
&nbsp; &nbsp; &nbsp; &nbsp; suPHP_UserGroup jemoeder <span style="color: #c20cb9; font-weight: bold;">users</span></div></div>
<p>Now you should have a working suPHP installation (provided that you restarted apache etc).<br />
If something fails, check the logs, especially <span style="color:#FFFF00">suphp.log</span> and of course the apache error_log.</p>
<h3>FastCGI</h3>
<p>To get this running I loosely followed <a href="http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/">this blog post</a>. It pretty much worked like Brandon explained, after I recompiled my apache for suexec support that is. Thus a summary:</p>
<h4>Install FastCGI</h4>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.fastcgi.com<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi-current.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xvf mod_fastcgi-current.tar.gz<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> mod_fastcgi-2.4.6<br />
benv<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi-2.4.6$ apxs <span style="color: #660033;">-o</span> mod_fastcgi.so <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">*</span>.c<br />
&nbsp;<span style="color: #666666; font-style: italic;"># This as root</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi-2.4.6$ <span style="color: #c20cb9; font-weight: bold;">cp</span> .libs<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>modules<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Now to enable it in apache</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi.conf<br />
LoadModule fastcgi_module <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>mod_fastcgi.so<br />
<br />
FastCgiConfig <span style="color: #660033;">-idle-timeout</span> <span style="color: #000000;">20</span> <span style="color: #660033;">-maxClassProcesses</span> <span style="color: #000000;">1</span><br />
FastCgiWrapper <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>suexec<br />
<span style="color: #000000; font-weight: bold;">&lt;</span>Location <span style="color: #ff0000;">&quot;/cgi-bin/php-fastcgi&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Order Deny,Allow<br />
&nbsp; &nbsp; &nbsp; &nbsp; Deny from All<br />
&nbsp; &nbsp; &nbsp; &nbsp; Allow from <span style="color: #007800;">env</span>=REDIRECT_STATUS<br />
&nbsp; &nbsp; &nbsp; &nbsp; Options ExecCGI<br />
&nbsp; &nbsp; &nbsp; &nbsp; SetHandler fastcgi-script<br />
<span style="color: #000000; font-weight: bold;">&lt;/</span>Location<span style="color: #000000; font-weight: bold;">&gt;</span><br />
<span style="color: #666666; font-style: italic;"># ctrl-d here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'Include /etc/httpd/mod_fastcgi.conf'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</div></div>
<p>Now for the magic part, enabling it in a vhost.<br />
First we need a php wrapper script:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>fastcgi-wrappers<span style="color: #000000; font-weight: bold;">/</span>somevhost.com<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>fastcgi-wrappers<span style="color: #000000; font-weight: bold;">/</span>somevhost.com<span style="color: #000000; font-weight: bold;">/</span>php-fastcgi<br />
<span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PHP_FCGI_CHILDREN</span>=<span style="color: #000000;">5</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PHP_FCGI_MAX_REQUESTS</span>=<span style="color: #000000;">500</span><br />
<span style="color: #7a0874; font-weight: bold;">umask</span> 0022<br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <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>php <span style="color: #660033;">-d</span> apc.shm_size=<span style="color: #000000;">64</span><br />
<span style="color: #666666; font-style: italic;"># ctrl-d here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> vhostuser:<span style="color: #c20cb9; font-weight: bold;">users</span> <span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>fastcgi-wrappers<span style="color: #000000; font-weight: bold;">/</span>somevhost.com</div></div>
<p>Note the <span style="color:#00FFFF">-d apc.shm_size=64</span> option. This specific option is to set the cache size for APC, but this way you can give php custom settings per vhost. Neat huh? If you want to give this vhost its own php.ini you can add this to the script:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PHPRC</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>vhosts<span style="color: #000000; font-weight: bold;">/</span>somevhost</div></div>
<p>PHP will check for a php.ini in that dir. Make sure to check the permissions on these dirs though, especially on the wrapper script. Your users might do stuff you don&#8217;t want if you let them alter these things.<br />
Finally to enable FastCGI per vhost, add something to the vhost configuration like this (make sure to disable suphp on that vhost!):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; SuexecUserGroup jemoeder <span style="color: #c20cb9; font-weight: bold;">users</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Alias <span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>fastcgi-wrappers<span style="color: #000000; font-weight: bold;">/</span>somevhost.com<span style="color: #000000; font-weight: bold;">/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; AddHandler php5-fcgi .php<br />
&nbsp; &nbsp; &nbsp; &nbsp; Action php5-fcgi <span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>php-fastcgi</div></div>
<p>Restart apache and you should see stuff like this in the process list:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>$ <span style="color: #c20cb9; font-weight: bold;">ps</span> auwx <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> jemoeder<br />
jemoeder &nbsp;<span style="color: #000000;">5789</span> &nbsp;<span style="color: #000000;">0.1</span> &nbsp;<span style="color: #000000;">4.3</span> <span style="color: #000000;">131388</span> <span style="color: #000000;">44940</span> ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;<span style="color: #000000;">16</span>:<span style="color: #000000;">46</span> &nbsp; <span style="color: #000000;">0</span>:07 <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>php <span style="color: #660033;">-d</span> apc.shm_size=<span style="color: #000000;">64</span><br />
jemoeder &nbsp;<span style="color: #000000;">5790</span> &nbsp;<span style="color: #000000;">0.1</span> &nbsp;<span style="color: #000000;">3.0</span> <span style="color: #000000;">130804</span> <span style="color: #000000;">31888</span> ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;<span style="color: #000000;">16</span>:<span style="color: #000000;">46</span> &nbsp; <span style="color: #000000;">0</span>:06 <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>php <span style="color: #660033;">-d</span> apc.shm_size=<span style="color: #000000;">64</span><br />
jemoeder &nbsp;<span style="color: #000000;">5791</span> &nbsp;<span style="color: #000000;">0.1</span> &nbsp;<span style="color: #000000;">4.3</span> <span style="color: #000000;">131644</span> <span style="color: #000000;">44948</span> ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;<span style="color: #000000;">16</span>:<span style="color: #000000;">46</span> &nbsp; <span style="color: #000000;">0</span>:06 <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>php <span style="color: #660033;">-d</span> apc.shm_size=<span style="color: #000000;">64</span><br />
jemoeder &nbsp;<span style="color: #000000;">5792</span> &nbsp;<span style="color: #000000;">0.1</span> &nbsp;<span style="color: #000000;">3.3</span> <span style="color: #000000;">131620</span> <span style="color: #000000;">34160</span> ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;<span style="color: #000000;">16</span>:<span style="color: #000000;">46</span> &nbsp; <span style="color: #000000;">0</span>:06 <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>php <span style="color: #660033;">-d</span> apc.shm_size=<span style="color: #000000;">64</span><br />
jemoeder &nbsp;<span style="color: #000000;">5793</span> &nbsp;<span style="color: #000000;">0.0</span> &nbsp;<span style="color: #000000;">2.5</span> <span style="color: #000000;">126872</span> <span style="color: #000000;">26672</span> ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;<span style="color: #000000;">16</span>:<span style="color: #000000;">46</span> &nbsp; <span style="color: #000000;">0</span>:05 <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>php <span style="color: #660033;">-d</span> apc.shm_size=<span style="color: #000000;">64</span></div></div>
<h3>APC</h3>
<p>Now for some speedup. Let&#8217;s see apachebench on that magento vhost without APC and FastCGI:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>mybrik:~$ ab <span style="color: #660033;">-n</span> <span style="color: #000000;">50</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">3</span> <span style="color: #660033;">-k</span> &nbsp;http:<span style="color: #000000; font-weight: bold;">//</span>www.somevhost.com<span style="color: #000000; font-weight: bold;">/</span><br />
This is ApacheBench, Version <span style="color: #000000;">2.3</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #007800;">$Revision</span>: <span style="color: #000000;">655654</span> $<span style="color: #000000; font-weight: bold;">&gt;</span><br />
Copyright <span style="color: #000000;">1996</span> Adam Twiss, Zeus Technology Ltd, http:<span style="color: #000000; font-weight: bold;">//</span>www.zeustech.net<span style="color: #000000; font-weight: bold;">/</span><br />
Licensed to The Apache Software Foundation, http:<span style="color: #000000; font-weight: bold;">//</span>www.apache.org<span style="color: #000000; font-weight: bold;">/</span><br />
<br />
Benchmarking www.somevhost.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>be patient<span style="color: #7a0874; font-weight: bold;">&#41;</span>.....done<br />
<br />
<br />
Server Software: &nbsp; &nbsp; &nbsp; &nbsp;Apache<span style="color: #000000; font-weight: bold;">/</span>2.2.14<br />
Server Hostname: &nbsp; &nbsp; &nbsp; &nbsp;www.somevhost.com<br />
Server Port: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">80</span><br />
<br />
Document Path: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span><br />
Document Length: &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">21590</span> bytes<br />
<br />
Concurrency Level: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">3</span><br />
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests: &nbsp; <span style="color: #000000;">43.056</span> seconds<br />
Complete requests: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">50</span><br />
Failed requests: &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span><br />
Write errors: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
Keep-Alive requests: &nbsp; &nbsp;<span style="color: #000000;">0</span><br />
Total transferred: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">1104350</span> bytes<br />
HTML transferred: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1079500</span> bytes<br />
Requests per second: &nbsp; &nbsp;<span style="color: #000000;">1.16</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span><br />
Time per request: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">2583.342</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Time per request: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">861.114</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Transfer rate: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">25.05</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received<br />
<br />
Connection Times <span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min &nbsp;mean<span style="color: #7a0874; font-weight: bold;">&#91;</span>+<span style="color: #000000; font-weight: bold;">/</span>-sd<span style="color: #7a0874; font-weight: bold;">&#93;</span> median &nbsp; max<br />
Connect: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">10</span> &nbsp; <span style="color: #000000;">12</span> &nbsp; <span style="color: #000000;">3.5</span> &nbsp; &nbsp; <span style="color: #000000;">11</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">29</span><br />
Processing: &nbsp;<span style="color: #000000;">2077</span> <span style="color: #000000;">2560</span> <span style="color: #000000;">221.6</span> &nbsp; <span style="color: #000000;">2489</span> &nbsp; &nbsp;<span style="color: #000000;">3083</span><br />
Waiting: &nbsp; &nbsp; <span style="color: #000000;">1741</span> <span style="color: #000000;">2015</span> <span style="color: #000000;">116.6</span> &nbsp; <span style="color: #000000;">2033</span> &nbsp; &nbsp;<span style="color: #000000;">2266</span><br />
Total: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">2093</span> <span style="color: #000000;">2572</span> <span style="color: #000000;">222.5</span> &nbsp; <span style="color: #000000;">2499</span> &nbsp; &nbsp;<span style="color: #000000;">3094</span><br />
<br />
Percentage of the requests served within a certain <span style="color: #000000; font-weight: bold;">time</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; <span style="color: #000000;">50</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">2499</span><br />
&nbsp; <span style="color: #000000;">66</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">2577</span><br />
&nbsp; <span style="color: #000000;">75</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">2648</span><br />
&nbsp; <span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">2777</span><br />
&nbsp; <span style="color: #000000;">90</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3002</span><br />
&nbsp; <span style="color: #000000;">95</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3064</span><br />
&nbsp; <span style="color: #000000;">98</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3094</span><br />
&nbsp; <span style="color: #000000;">99</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3094</span><br />
&nbsp;<span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; <span style="color: #000000;">3094</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>longest request<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>As you can see it takes more than a second to get the page to load. Well, 0.8s mean across all, but 2.5s per request.<br />
Let&#8217;s install APC:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>pecl.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>APC-3.0.19.tgz<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zvf APC-3.0.19.tgz<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> APC-3.0.19<br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>APC-3.0.19$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-apc</span> <span style="color: #660033;">--enable-apc-filehits</span> <span style="color: #660033;">--enable-apc-sem</span> &nbsp;<span style="color: #660033;">--enable-apc-mmap</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>APC-3.0.19$ <span style="color: #c20cb9; font-weight: bold;">make</span> <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> <span style="color: #666666; font-style: italic;"># Or create a package if you're up to it.</span><br />
<span style="color: #666666; font-style: italic;"># Now to enable it in php, assuming php.ini is /etc/php/php.ini</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>it:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>APC-3.0.19$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>php.ini<br />
<span style="color: #007800;">extension</span>=<span style="color: #ff0000;">&quot;apc.so&quot;</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>APC<span style="color: #7a0874; font-weight: bold;">&#93;</span> <br />
apc.enabled = <span style="color: #000000;">1</span> <br />
apc.enable_cli = <span style="color: #000000;">1</span><br />
apc.shm_segments = <span style="color: #000000;">1</span> <br />
apc.max_file_size = 10M <br />
apc.stat = <span style="color: #000000;">1</span><br />
<span style="color: #666666; font-style: italic;"># Ctrl-D here</span></div></div>
<p>Restart apache and voila. Time for a new benchmark.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>mybrik:~$ ab <span style="color: #660033;">-n</span> <span style="color: #000000;">50</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">3</span> <span style="color: #660033;">-k</span> &nbsp;http:<span style="color: #000000; font-weight: bold;">//</span>www.somevhost.com<span style="color: #000000; font-weight: bold;">/</span><br />
This is ApacheBench, Version <span style="color: #000000;">2.3</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #007800;">$Revision</span>: <span style="color: #000000;">655654</span> $<span style="color: #000000; font-weight: bold;">&gt;</span><br />
Copyright <span style="color: #000000;">1996</span> Adam Twiss, Zeus Technology Ltd, http:<span style="color: #000000; font-weight: bold;">//</span>www.zeustech.net<span style="color: #000000; font-weight: bold;">/</span><br />
Licensed to The Apache Software Foundation, http:<span style="color: #000000; font-weight: bold;">//</span>www.apache.org<span style="color: #000000; font-weight: bold;">/</span><br />
<br />
Benchmarking www.somevhost.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>be patient<span style="color: #7a0874; font-weight: bold;">&#41;</span>.....done<br />
<br />
<br />
Server Software: &nbsp; &nbsp; &nbsp; &nbsp;Apache<span style="color: #000000; font-weight: bold;">/</span>2.2.14<br />
Server Hostname: &nbsp; &nbsp; &nbsp; &nbsp;www.somevhost.com<br />
Server Port: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">80</span><br />
<br />
Document Path: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span><br />
Document Length: &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">23337</span> bytes<br />
<br />
Concurrency Level: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">3</span><br />
Time taken <span style="color: #000000; font-weight: bold;">for</span> tests: &nbsp; <span style="color: #000000;">10.963</span> seconds<br />
Complete requests: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">50</span><br />
Failed requests: &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span><br />
Write errors: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
Keep-Alive requests: &nbsp; &nbsp;<span style="color: #000000;">0</span><br />
Total transferred: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">1192600</span> bytes<br />
HTML transferred: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1166850</span> bytes<br />
Requests per second: &nbsp; &nbsp;<span style="color: #000000;">4.56</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#/sec] (mean)</span><br />
Time per request: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">657.787</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Time per request: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">219.262</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ms<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>mean, across all concurrent requests<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Transfer rate: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">106.23</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Kbytes<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #7a0874; font-weight: bold;">&#93;</span> received<br />
<br />
Connection Times <span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; min &nbsp;mean<span style="color: #7a0874; font-weight: bold;">&#91;</span>+<span style="color: #000000; font-weight: bold;">/</span>-sd<span style="color: #7a0874; font-weight: bold;">&#93;</span> median &nbsp; max<br />
Connect: &nbsp; &nbsp; &nbsp; <span style="color: #000000;">10</span> &nbsp; <span style="color: #000000;">22</span> &nbsp;<span style="color: #000000;">15.9</span> &nbsp; &nbsp; <span style="color: #000000;">16</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">76</span><br />
Processing: &nbsp; <span style="color: #000000;">477</span> &nbsp;<span style="color: #000000;">630</span> &nbsp;<span style="color: #000000;">71.8</span> &nbsp; &nbsp;<span style="color: #000000;">618</span> &nbsp; &nbsp; <span style="color: #000000;">844</span><br />
Waiting: &nbsp; &nbsp; &nbsp;<span style="color: #000000;">409</span> &nbsp;<span style="color: #000000;">549</span> &nbsp;<span style="color: #000000;">54.4</span> &nbsp; &nbsp;<span style="color: #000000;">551</span> &nbsp; &nbsp; <span style="color: #000000;">708</span><br />
Total: &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">493</span> &nbsp;<span style="color: #000000;">652</span> &nbsp;<span style="color: #000000;">74.8</span> &nbsp; &nbsp;<span style="color: #000000;">640</span> &nbsp; &nbsp; <span style="color: #000000;">858</span><br />
<br />
Percentage of the requests served within a certain <span style="color: #000000; font-weight: bold;">time</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>ms<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; <span style="color: #000000;">50</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">640</span><br />
&nbsp; <span style="color: #000000;">66</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">654</span><br />
&nbsp; <span style="color: #000000;">75</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">679</span><br />
&nbsp; <span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">692</span><br />
&nbsp; <span style="color: #000000;">90</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">764</span><br />
&nbsp; <span style="color: #000000;">95</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">811</span><br />
&nbsp; <span style="color: #000000;">98</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">858</span><br />
&nbsp; <span style="color: #000000;">99</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">858</span><br />
&nbsp;<span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%</span> &nbsp; &nbsp;<span style="color: #000000;">858</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>longest request<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>W000t&#8230;. that&#8217;s a lot quicker, almost 4 times as fast. Nice <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/apache-2-2-and-php-configuration-fun-on-slackware-13/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Gears on Slackware 64 and firefox</title>
		<link>http://notes.benv.junerules.com/all/software/google-gears-on-slackware-64-and-firefox/</link>
		<comments>http://notes.benv.junerules.com/all/software/google-gears-on-slackware-64-and-firefox/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 21:05:41 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=646</guid>
		<description><![CDATA[Don&#8217;t ask me why, but for some greasemonkey script that I wanted to run in Firefox I needed Google Gears. So I went to the gears site with Firefox, and it told me that it needed to install some plugin. Yeah, whatever. I hit the big Install Gears button, completely ignoring the tiny and almost [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t ask me why, but for some greasemonkey script that I wanted to run in Firefox I needed <a href="http://gears.google.com/">Google Gears</a>.<br />
So I went to the gears site with Firefox, and it told me that it needed to install some plugin. Yeah, whatever.<br />
I hit the big <span style="color:#3333FF">Install Gears</span> button, completely ignoring the tiny and almost invisible for my eyes <span style="font-size: 1px; color:#333333">32-bit OS (64-bit not supported)</span> notice below it.<br />
Needless to say it went on to download a 3.5Mb package, started some popups and other junk after which it notified me of my grave mistake.<br />
Aha. So for some reason Google is too incompetent to work with 64 bits software&#8230;. even microsoft can deal with that these days guys, geesh.<span id="more-646"></span></p>
<p>So not wanting to give up immediately I decided to google for it a bit, and noticed that the Pokemon OS guys do have a gears version for their 64 bit <a href="http://packages.ubuntu.com/karmic/gears">Karmic</a> and <a href="http://packages.ubuntu.com/lucid/gears">Lucid</a> releases. Well, that must mean it&#8217;s possible! I took a quick look at their .deb file and didn&#8217;t see anything shocking, so I decided to try and build gears from svn.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">svn</span> checkout http:<span style="color: #000000; font-weight: bold;">//</span>gears.googlecode.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span> google-gears-svn<br />
&nbsp;<span style="color: #666666; font-style: italic;"># A bunch of files get leeched here... Note that this was revision 3414.</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">make</span><br />
&nbsp;<span style="color: #666666; font-style: italic;"># blabalbla until we hit:</span><br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl <span style="color: #660033;">-I</span> ..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>idl <span style="color: #660033;">-I</span> ..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9 <span style="color: #660033;">-m</span> header <span style="color: #660033;">-o</span> bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces base<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>interfaces.idl<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: ..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl: Command not found<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</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>bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">127</span><br />
<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>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>Command not found? huh?</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-la</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl<br />
<span style="color: #660033;">-rwxr-xr-x</span> <span style="color: #000000;">1</span> benv <span style="color: #c20cb9; font-weight: bold;">users</span> <span style="color: #000000;">80542</span> <span style="color: #000000;">2009</span>-<span style="color: #000000;">12</span>-<span style="color: #000000;">14</span> <span style="color: #000000;">17</span>:<span style="color: #000000;">26</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>It&#8217;s right there&#8230;. ohhh, probably a 32 bit issue.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl: ELF <span style="color: #000000;">32</span>-bit LSB executable, Intel <span style="color: #000000;">80386</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, dynamically linked <span style="color: #7a0874; font-weight: bold;">&#40;</span>uses shared libs<span style="color: #7a0874; font-weight: bold;">&#41;</span>, not stripped</div></div>
<p>So maybe THAT&#8217;s why they&#8217;re incompetent (read: lazy). Let&#8217;s see if we can get xipdl in a way that doesn&#8217;t need ancient 32 bit rubbish <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Mozilla has some stuff about that tool <a href="https://developer.mozilla.org/en/XPIDL/xpidl">here</a>. However, actually finding the download link for the source of that tool is challenging.<br />
I&#8217;ll save you the trouble, you can get it here: <a href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source">ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source/</a>. Be aware, it&#8217;s a whopping 45MB download. That&#8217;s right, in the firefox sources.<br />
Let&#8217;s see if it compiles:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #c20cb9; font-weight: bold;">tar</span> jxvf firefox-3.5.5.source.tar.bz2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp;<span style="color: #666666; font-style: italic;"># loads of mozilla</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src$ <span style="color: #7a0874; font-weight: bold;">cd</span> mozilla-1.9.1 <span style="color: #666666; font-style: italic;"># What the heck, either rename your tarball or your dir... oh well</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-application</span>=xpcom<br />
&nbsp;<span style="color: #666666; font-style: italic;"># heaps of output</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> config<br />
&nbsp;<span style="color: #666666; font-style: italic;"># junk junk</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> nsprpub<br />
&nbsp;<span style="color: #666666; font-style: italic;"># even more landfill</span><br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<br />
&nbsp;<span style="color: #666666; font-style: italic;"># finally something useful</span></div></div>
<p>After this we finally have a working xpidl executable that is actually 64 bits.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1$ <span style="color: #c20cb9; font-weight: bold;">file</span> xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpidl<span style="color: #000000; font-weight: bold;">/</span>xpidl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpidl<span style="color: #000000; font-weight: bold;">/</span>xpidl: ELF <span style="color: #000000;">64</span>-bit LSB executable, x86-<span style="color: #000000;">64</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, dynamically linked <span style="color: #7a0874; font-weight: bold;">&#40;</span>uses shared libs<span style="color: #7a0874; font-weight: bold;">&#41;</span>, not stripped</div></div>
<p>Back to GEARS! The easiest way I could determine to get it to work was replacing their xipdl with our new version. I&#8217;m sure there&#8217;s an easier way through setting an environment variable or something, but I got tired of their Makefile includes and third party libraries before I could work that out. The easy way:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1<span style="color: #000000; font-weight: bold;">/</span>xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpidl<span style="color: #000000; font-weight: bold;">/</span>xpidl <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.1<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpidl<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1<span style="color: #000000; font-weight: bold;">/</span>xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpt<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>xpt_link <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.1<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpt_link<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mozilla-1.9.1<span style="color: #000000; font-weight: bold;">/</span>xpcom<span style="color: #000000; font-weight: bold;">/</span>typelib<span style="color: #000000; font-weight: bold;">/</span>xpt<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>xpt_dump <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9.1<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>xpt_dump<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Make now passes the xipdl test. Next error:</span><br />
<span style="color: #c20cb9; font-weight: bold;">g++</span> -I.. -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31 -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>npapi -I..<span style="color: #000000; font-weight: bold;">/</span>third_party -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>icu38<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>common -DPNG_USER_CONFIG -DCHROME_PNG_WRITE_SUPPORT -DGEARS_PNG_BUILD &nbsp;-I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>zlib -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>core -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>images -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>utils -DNO_GZIP -DNO_GZCOMPRESS <span style="color: #660033;">-DLINUX</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>gtk-<span style="color: #000000;">2.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>atk-<span style="color: #000000;">1.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>glib-<span style="color: #000000;">2.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>pango-<span style="color: #000000;">1.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>cairo -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gtk-<span style="color: #000000;">2.0</span><span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>glib-<span style="color: #000000;">2.0</span><span style="color: #000000; font-weight: bold;">/</span>include &nbsp;<span style="color: #660033;">-DDEBUG</span>=<span style="color: #000000;">1</span> -DUSING_CCTESTS=<span style="color: #000000;">1</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest<span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest <span style="color: #660033;">-c</span> <span style="color: #660033;">-o</span> bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>url_parse.o <span style="color: #660033;">-fPIC</span> <span style="color: #660033;">-fmessage-length</span>=<span style="color: #000000;">0</span> <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-Werror</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-O0</span> <span style="color: #660033;">-fshort-wchar</span> <span style="color: #660033;">-fno-exceptions</span> <span style="color: #660033;">-fno-rtti</span> <span style="color: #660033;">-Wno-non-virtual-dtor</span> <span style="color: #660033;">-Wno-ctor-dtor-privacy</span> <span style="color: #660033;">-funsigned-char</span> <span style="color: #660033;">-Wno-char-subscripts</span> &nbsp; ..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'int url_parse::&lt;unnamed&gt;::DoParsePort(const CHAR*, const url_parse::Component&amp;)'</span>:<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">479</span>: error: there are no arguments to <span style="color: #ff0000;">'atoi'</span> that depend on a template parameter, so a declaration of <span style="color: #ff0000;">'atoi'</span> must be available<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">479</span>: error: <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">if</span> you use <span style="color: #ff0000;">'-fpermissive'</span>, G++ will accept your code, but allowing the use of an undeclared name is deprecated<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'int url_parse::&lt;unnamed&gt;::DoParsePort(const CHAR*, const url_parse::Component&amp;) [with CHAR = char]'</span>:<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">674</span>: &nbsp; instantiated from here<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">479</span>: error: <span style="color: #ff0000;">'atoi'</span> was not declared <span style="color: #000000; font-weight: bold;">in</span> this scope<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'int url_parse::&lt;unnamed&gt;::DoParsePort(const CHAR*, const url_parse::Component&amp;) [with CHAR = url_parse::UTF16Char]'</span>:<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">678</span>: &nbsp; instantiated from here<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>url_parse.cc:<span style="color: #000000;">479</span>: error: <span style="color: #ff0000;">'atoi'</span> was not declared <span style="color: #000000; font-weight: bold;">in</span> this scope<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</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>bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>url_parse.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span><br />
<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>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>Ghoooh, idiots. Maybe they should invest in a configure script or something. After messing with environment variables for a while, I decided that their Makefiles are about as kanker as their effort of giving us a 64 bit package in the first place.  I would expect to be able to set <code class="codecolorer bash vibrant"><span class="bash"><span style="color: #007800;">CXXFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h&quot;</span></span></code>, but that was completely ignored. CPPFLAGS did seem to work however. Since another file missed another include, I added that as well.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Onto the next error</span><br />
<span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #660033;">-include</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>stdlib.h <span style="color: #660033;">-include</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>string.h <span style="color: #660033;">-include</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>limits.h -I.. <span style="color: #660033;">-I</span> -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>npapi -I..<span style="color: #000000; font-weight: bold;">/</span>third_party -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>icu38<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>common -DPNG_USER_CONFIG -DCHROME_PNG_WRITE_SUPPORT -DGEARS_PNG_BUILD &nbsp;-I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>zlib -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>core -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>images -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>utils -DNO_GZIP -DNO_GZCOMPRESS <span style="color: #660033;">-DLINUX</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>gtk-<span style="color: #000000;">2.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>atk-<span style="color: #000000;">1.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>glib-<span style="color: #000000;">2.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>pango-<span style="color: #000000;">1.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>cairo -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gtk-<span style="color: #000000;">2.0</span><span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>glib-<span style="color: #000000;">2.0</span><span style="color: #000000; font-weight: bold;">/</span>include &nbsp;<span style="color: #660033;">-DDEBUG</span>=<span style="color: #000000;">1</span> -DUSING_CCTESTS=<span style="color: #000000;">1</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest<span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest -I.. -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3 -Ibin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>npapi -I..<span style="color: #000000; font-weight: bold;">/</span>third_party -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>googleurl -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>icu38<span style="color: #000000; font-weight: bold;">/</span>public<span style="color: #000000; font-weight: bold;">/</span>common -DPNG_USER_CONFIG -DCHROME_PNG_WRITE_SUPPORT -DGEARS_PNG_BUILD &nbsp;-I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>zlib -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>core -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>images -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>skia<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>utils -DNO_GZIP -DNO_GZCOMPRESS <span style="color: #660033;">-DLINUX</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>gtk-<span style="color: #000000;">2.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>atk-<span style="color: #000000;">1.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>glib-<span style="color: #000000;">2.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>pango-<span style="color: #000000;">1.0</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>cairo -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gtk-<span style="color: #000000;">2.0</span><span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>glib-<span style="color: #000000;">2.0</span><span style="color: #000000; font-weight: bold;">/</span>include &nbsp;<span style="color: #660033;">-DDEBUG</span>=<span style="color: #000000;">1</span> -DUSING_CCTESTS=<span style="color: #000000;">1</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest<span style="color: #000000; font-weight: bold;">/</span>include -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gtest <span style="color: #660033;">-c</span> <span style="color: #660033;">-o</span> bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>module.o <span style="color: #660033;">-fPIC</span> <span style="color: #660033;">-fmessage-length</span>=<span style="color: #000000;">0</span> <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-Werror</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-O0</span> <span style="color: #660033;">-fshort-wchar</span> <span style="color: #660033;">-fno-exceptions</span> <span style="color: #660033;">-fno-rtti</span> <span style="color: #660033;">-Wno-non-virtual-dtor</span> <span style="color: #660033;">-Wno-ctor-dtor-privacy</span> <span style="color: #660033;">-funsigned-char</span> <span style="color: #660033;">-Wno-char-subscripts</span> -DBROWSER_FF3=<span style="color: #000000;">1</span> -DJS_THREADSAFE -DBROWSER_FF=<span style="color: #000000;">1</span> -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9 -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux -I..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>gecko_1.9<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>gecko_sdk<span style="color: #000000; font-weight: bold;">/</span>include -DMOZILLA_STRICT_API &nbsp;base<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>module.cc<br />
In <span style="color: #c20cb9; font-weight: bold;">file</span> included from ..<span style="color: #000000; font-weight: bold;">/</span>gears<span style="color: #000000; font-weight: bold;">/</span>factory<span style="color: #000000; font-weight: bold;">/</span>factory_ff.h:<span style="color: #000000;">29</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from base<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>module.cc:<span style="color: #000000;">46</span>:<br />
bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h:<span style="color: #000000;">33</span>: error: expected <span style="color: #ff0000;">','</span> or <span style="color: #ff0000;">'...'</span> before <span style="color: #ff0000;">'NS_OUTPARAM'</span><br />
bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h:<span style="color: #000000;">106</span>: error: expected <span style="color: #ff0000;">','</span> or <span style="color: #ff0000;">'...'</span> before <span style="color: #ff0000;">'NS_OUTPARAM'</span><br />
bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h:<span style="color: #000000;">109</span>: error: expected <span style="color: #ff0000;">','</span> or <span style="color: #ff0000;">'...'</span> before <span style="color: #ff0000;">'NS_OUTPARAM'</span><br />
bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h:<span style="color: #000000;">112</span>: error: expected <span style="color: #ff0000;">','</span> or <span style="color: #ff0000;">'...'</span> before <span style="color: #ff0000;">'NS_OUTPARAM'</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</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>bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>module.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span><br />
<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>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>RAAAH, this keeps getting better and better. This fix was simple enough, simply edit that header file and remove all occurances of &#8216;NS_OUTPARAM&#8217;, whatever the heck that might be:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-ie</span> <span style="color: #ff0000;">'s/NS_OUTPARAM//g'</span> bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff3<span style="color: #000000; font-weight: bold;">/</span>genfiles<span style="color: #000000; font-weight: bold;">/</span>interfaces.h<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># And it goes on</span><br />
cc1plus: warnings being treated <span style="color: #c20cb9; font-weight: bold;">as</span> errors<br />
desktop<span style="color: #000000; font-weight: bold;">/</span>desktop.cc: In member <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'bool Desktop::ValidateShortcutInfo(Desktop::ShortcutInfo*, bool)'</span>:<br />
desktop<span style="color: #000000; font-weight: bold;">/</span>desktop.cc:<span style="color: #000000;">222</span>: error: suggest parentheses around <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> within <span style="color: #000000; font-weight: bold;">||</span><br />
desktop<span style="color: #000000; font-weight: bold;">/</span>desktop.cc:<span style="color: #000000;">224</span>: error: suggest parentheses around <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> within <span style="color: #000000; font-weight: bold;">||</span><br />
desktop<span style="color: #000000; font-weight: bold;">/</span>desktop.cc:<span style="color: #000000;">226</span>: error: suggest parentheses around <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> within <span style="color: #000000; font-weight: bold;">||</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</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>bin-dbg<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>ff31<span style="color: #000000; font-weight: bold;">/</span>desktop.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span></div></div>
<p>Aha, they request warnings to be error by default. Seems like running it with MODE=opt fixes this issue.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># Ha, but even this fails</span><br />
cc1: warnings being treated <span style="color: #c20cb9; font-weight: bold;">as</span> errors<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'pthreadMutexAlloc'</span>:<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c:<span style="color: #000000;">142</span>: error: implicit declaration of <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'pthread_mutexattr_settype'</span><br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c:<span style="color: #000000;">142</span>: error: <span style="color: #ff0000;">'PTHREAD_MUTEX_RECURSIVE'</span> undeclared <span style="color: #7a0874; font-weight: bold;">&#40;</span>first use <span style="color: #000000; font-weight: bold;">in</span> this <span style="color: #000000; font-weight: bold;">function</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c:<span style="color: #000000;">142</span>: error: <span style="color: #7a0874; font-weight: bold;">&#40;</span>Each undeclared identifier is reported only once<br />
..<span style="color: #000000; font-weight: bold;">/</span>third_party<span style="color: #000000; font-weight: bold;">/</span>sqlite_google<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.c:<span style="color: #000000;">142</span>: error: <span style="color: #000000; font-weight: bold;">for</span> each <span style="color: #000000; font-weight: bold;">function</span> it appears in.<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</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>bin-opt<span style="color: #000000; font-weight: bold;">/</span>linux-x86_64<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>sqlite<span style="color: #000000; font-weight: bold;">/</span>mutex_unix.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span><br />
<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>default<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>GODQ@#($*@#*^%^&#038; STUPID &#8230; *tries to contain the daemon within* &#8230; *RAAAGE*. Another missing include&#8230;. *sigh*</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-ie</span> <span style="color: #ff0000;">'s/-Wall//g'</span> tools<span style="color: #000000; font-weight: bold;">/</span>config.mk<br />
benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-include /usr/include/stdlib.h -include /usr/include/string.h -include /usr/include/limits.h -include /usr/include/pthread.h -D_XOPEN_SOURCE=600&quot;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF31</div></div>
<p>Needless to say building an optimized version goes to another directory, so now you need to do the above NS_OUTPARAM thing again on the interfaces.h file in the bin-opt dir.<br />
Anyway, finally it compiled after messing with it for hours. Hopefully this log contains some useful info for you <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Last but not least, we still need to make an installer for it:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>us<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>google-gears-svn<span style="color: #000000; font-weight: bold;">/</span>gears$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">MODE</span>=opt <span style="color: #007800;">BROWSER</span>=FF31<br />
&nbsp;<span style="color: #666666; font-style: italic;"># some output here, nothing weird</span></div></div>
<p>Finally we end up with a <span style="color:#FF00FF">bin-opt/installers/gears-linux-x86_64-opt-0.5.34.0.xpi</span> that we can install in firefox. Phew.</p>
<p>Now what was I doing that needed gears anyway? &#8230; can&#8217;t remember. Feh.<br />
<div id="attachment_663" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/12/gears-working.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/12/gears-working-300x147.png" alt="Gears and Firefox 3.5.5 on Slackware 64" title="Gears and Firefox 3.5.5 on Slackware 64" width="300" height="147" class="size-medium wp-image-663" /></a><p class="wp-caption-text">Gears and Firefox 3.5.5 on Slackware 64</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/google-gears-on-slackware-64-and-firefox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Torrent stuff</title>
		<link>http://notes.benv.junerules.com/all/software/torrent-stuff/</link>
		<comments>http://notes.benv.junerules.com/all/software/torrent-stuff/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 16:10:04 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[bittorrent]]></category>
		<category><![CDATA[deluge]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=549</guid>
		<description><![CDATA[Every now and then I like to leech something, and it happens to be that using bittorrent has a lot to offer in terms of availability and usability. However, as usual I have my demands. My demands for a torrent program are basically: It has to run on Slackware It has to run as a [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then I like to leech something, and it happens to be that using bittorrent has a lot to offer in terms of availability and usability. However, as usual I have my demands. My demands for a torrent program are basically:</p>
<ul>
<li>It has to run on Slackware</li>
<li>It has to run as a daemon (in daemontools if possible)</li>
<li>There has to be an easy way to control and view the status, like a web based GUI.</li>
</ul>
<p><span id="more-549"></span><br />
A few years ago I used <span style="color:#FF00FF">mldonkey</span> for it. Worked fine, but their torrent support was getting worse and worse. (basically they didn&#8217;t update their product for ages, and when they did it didn&#8217;t improve much). It had a web interface that worked nicely though, and it was easy to control. Another cute thing was that it also supported other protocols that I still used back then like Edonkey.</p>
<p>However, at some point I got fed up with it and searched for a better product. Especially since I didn&#8217;t care about the other protocols anymore I could search for a pure torrent client. Many of them only support running as a client with some kind of fancy GUI&#8230; not good for running on our server. But then I found <a href="http://libtorrent.rakshasa.no/" title="Rtorrent">Rtorrent</a>.<br />
While it was a bitch to run on my server since it demanded to run in a terminal (and therefore refused to run under daemontools) &#8212; a problem I made bearable by running it in screen under a new user that was accessible through ssh keys &#8212; it worked very nicely. I had it running with a web interface called <a href="http://www.wtorrent-project.org/trac/">wtorrent</a>.<br />
But then yesterday I got very needy and demanded that it used IPv6 to connect to others. Sadly it fails to do that. Don&#8217;t know if it&#8217;s a configuration problem or simply <a href="http://libtorrent.rakshasa.no/ticket/1111">because the author doesn&#8217;t have enough time to fix it</a>. I tried the latest development builds and compiling it with <span style="color:#FFFF00">&#8211;enable-ipv6</span>, but it doesn&#8217;t seem to listen. In other words: time for a new client.</p>
<p>So after some searching I ran into <a href="http://dev.deluge-torrent.org/wiki/Screenshots" title="Deluge">Deluge</a>. It seems to fulfill all my requirements, so I decided to give it a shot. A few bonus points are immediately earned because Deluge uses the more commonly used <a href="http://www.rasterbar.com/products/libtorrent/">libtorrent</a>, not to be confused by the other libtorrent that rtorrent uses. The bonus points are because the rasterbar libtorrent has plugin support among things and in general is a bit more up to date on the whole torrent protocol as far as I can tell. (makes you wonder why rtorrent doesn&#8217;t use it).<br />
Time for installation!<br />
Slackbuild had no problems chewing through libtorrent and spitting out a nice slackware package. However, Deluge is built in python so some manual work to get a package from it. (I seriously need to get some time to work on slackbuild to support this stuff).</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>deluge-1.2.0_rc3<span style="color: #666666; font-style: italic;"># mkdir pkg</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>deluge-1.2.0_rc3<span style="color: #666666; font-style: italic;"># python setup.py install --root `pwd`/pkg -O2</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>blabla compile blabla<span style="color: #000000; font-weight: bold;">*</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>deluge-1.2.0_rc3<span style="color: #666666; font-style: italic;"># cd pkg/ &amp;&amp; makepkg /usr/src/packages/deluge-1.2.0rc3-i386-1.tgz</span></div></div>
<p>Voila, a nice package. After installing it, and creating a new user for it, it was time to see if it would work in daemontools.<br />
However, I didn&#8217;t check any dependencies so trying to run the deluge program failed:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:<br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/bin/deluged&quot;</span>, line <span style="color: #000000;">8</span>, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;load_entry_point<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'deluge==1.2.0-rc3'</span>, <span style="color: #ff0000;">'console_scripts'</span>, <span style="color: #ff0000;">'deluged'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/pkg_resources.py&quot;</span>, line <span style="color: #000000;">277</span>, <span style="color: #000000; font-weight: bold;">in</span> load_entry_point<br />
&nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">return</span> get_distribution<span style="color: #7a0874; font-weight: bold;">&#40;</span>dist<span style="color: #7a0874; font-weight: bold;">&#41;</span>.load_entry_point<span style="color: #7a0874; font-weight: bold;">&#40;</span>group, name<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/pkg_resources.py&quot;</span>, line <span style="color: #000000;">2180</span>, <span style="color: #000000; font-weight: bold;">in</span> load_entry_point<br />
&nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">return</span> ep.load<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/pkg_resources.py&quot;</span>, line <span style="color: #000000;">1913</span>, <span style="color: #000000; font-weight: bold;">in</span> load<br />
&nbsp; &nbsp; &nbsp;entry = __import__<span style="color: #7a0874; font-weight: bold;">&#40;</span>self.module_name, globals<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>,globals<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;">&#91;</span><span style="color: #ff0000;">'__name__'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/main.py&quot;</span>, line <span style="color: #000000;">47</span>, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;import deluge.common<br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/common.py&quot;</span>, line <span style="color: #000000;">66</span>, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;import xdg, xdg.BaseDirectory<br />
&nbsp;ImportError: No module named xdg</div></div>
<p>Meh, xdg&#8230; fine. Fortunately python has <span style="color:#00FFFF">easy_install</span> as perl has cpan, so I installed a bunch of required things for it (like twisted, pyopenssl, chardet, mako). For xdg easy_install didn&#8217;t work though, so I handed it to easy_install using <a href="http://www.freedesktop.org/~lanius/pyxdg-0.18.tar.gz">this url</a>. After this it started up, even in daemontools! Another success.<br />
For those who are interested, my daemontools <span style="color:#00FF00">run</span> file looks like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span><br />
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1</span><br />
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>deluge<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> setuidgid deluge <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>deluged <span style="color: #660033;">-d</span> <span style="color: #660033;">-c</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>etc <span style="color: #660033;">-i</span> eth_local <span style="color: #660033;">-L</span> info</div></div>
<p>You obviously need to adjust the paths and interface and whatnot to your own ideals <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
After starting it for the first time it created some configuration and state files and is now waiting for connections. Woohoo.</p>
<p>So now, how do we connect to it? Seems like the web interface isn&#8217;t running yet. This is because deluge uses a client/server model where the daemon does<br />
all the work, but it doesn&#8217;t deal with the interface side. So to run the web interface we have to start a separate deluge process. Let&#8217;s also put that in daemontools:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span><br />
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1</span><br />
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>deluge<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> setuidgid deluge <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>deluge <span style="color: #660033;">-c</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>etc <span style="color: #660033;">-L</span> info <span style="color: #660033;">-u</span> web</div></div>
<p>After firing this one up you can connect using your browser on port 8112. Default password is <span style="color:#FFFF00">deluge</span>. After logging in you get the connection manager which shows the running daemon that you started up earlier. (or at least, that&#8217;s what it did here):<br />
<div id="attachment_553" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-connection-manager.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-connection-manager.png" alt="Deluge Connection Manager" title="deluge connection manager" width="300" height="291" class="size-full wp-image-553" /></a><p class="wp-caption-text">Deluge Connection Manager</p></div><br />
So have fun! Don&#8217;t forget to check out the plugins:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-plugins.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-plugins-300x291.png" alt="deluge-plugins" title="deluge-plugins" width="300" height="291" class="alignnone size-medium wp-image-554" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/torrent-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Produces Horrible Problems</title>
		<link>http://notes.benv.junerules.com/all/software/php-produces-horrible-problems/</link>
		<comments>http://notes.benv.junerules.com/all/software/php-produces-horrible-problems/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 14:11:21 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=530</guid>
		<description><![CDATA[That IS what it stands for, right? Or maybe the last P is for Programs&#8230;.. oh no, silly me. It&#8217;s for PEOPLE. Now I get it. Anyway, the quote of the day: configure: error: There is something wrong. Please check config.log for more information. Gee, that&#8217;s really&#8230;. helpful. OF COURSE THERE&#8217;S SOMETHING WRONG, I&#8217;M TRYING [...]]]></description>
			<content:encoded><![CDATA[<p>That IS what it stands for, right?<br />
Or maybe the last P is for Programs&#8230;.. oh no, silly me. It&#8217;s for <b>PEOPLE</b>. Now I get it.<br />
Anyway, the quote of the day:</p>
<blockquote><p>configure: error: There is something wrong. Please check config.log for more information.</p></blockquote>
<p><span id="more-530"></span><br />
Gee, that&#8217;s really&#8230;. helpful. <span style="color:#FF0000">OF COURSE THERE&#8217;S SOMETHING WRONG, I&#8217;M TRYING TO INSTALL PHP!!!!</span><br />
But let&#8217;s not get angry yet, I&#8217;m sure it&#8217;ll throw more tantrums at us while we try to chunk it together.<br />
In case you&#8217;re wondering, I&#8217;m trying to configure php so it has curl support. Apparently php&#8217;s configure has decided for me that in order to have curl support, it also requires ldap.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">configure:<span style="color: #000000;">26607</span>: checking <span style="color: #000000; font-weight: bold;">for</span> curl_easy_perform <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #660033;">-lcurl</span><br />
configure:<span style="color: #000000;">26626</span>: <span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-o</span> conftest <span style="color: #660033;">-g</span> <span style="color: #660033;">-O2</span> &nbsp; <span style="color: #660033;">-lcurl</span> <span style="color: #660033;">-lidn</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-lldap</span> <span style="color: #660033;">-lrt</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-ldl</span> <span style="color: #660033;">-lz</span> conftest.c <span style="color: #660033;">-lcurl</span> &nbsp;<span style="color: #660033;">-lcurl</span> <span style="color: #660033;">-lbz2</span> <span style="color: #660033;">-lz</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-lresolv</span> <span style="color: #660033;">-lm</span> <span style="color: #660033;">-ldl</span> <span style="color: #660033;">-lnsl</span> &nbsp;<span style="color: #660033;">-lxm</span><br />
l2 <span style="color: #660033;">-lz</span> <span style="color: #660033;">-lm</span> <span style="color: #660033;">-lcurl</span> <span style="color: #660033;">-lidn</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-lldap</span> <span style="color: #660033;">-lrt</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-ldl</span> <span style="color: #660033;">-lz</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">5</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<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>: cannot <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #660033;">-lldap</span><br />
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</div></div>
<p>&#8220;<span style="color:#FF0066">Then don&#8217;t configure it with ldap support!</span>&#8221;<br />
I didn&#8217;t. In fact, I explicity told it NOT to support ldap. <span style="color:#FF00FF">&#8211;without-ldap</span>. Doesn&#8217;t matter. Somehow it picked up the requirement to include ldap in the tests. After some searching I found out that the real source for this problem is the <span style="color:#00FFFF">curl-config</span> script:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># /usr/bin/curl-config --libs &nbsp; &nbsp; &nbsp;</span><br />
<span style="color: #660033;">-lcurl</span> <span style="color: #660033;">-lidn</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-lldap</span> <span style="color: #660033;">-lrt</span> <span style="color: #660033;">-lssl</span> <span style="color: #660033;">-lcrypto</span> <span style="color: #660033;">-ldl</span> <span style="color: #660033;">-lz</span></div></div>
<p>Note the <span style="color:#FF6600">-lldap</span> there. So basically this is Slackware&#8217;s fault. Meh.</p>
<p><em>Solution 1:</em><br />
 * Get rid of ldap in curl. This involves recompiling curl from source.<br />
<em>Solution 2:</em> Probably the easiest way is to hack curl-config</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-ie</span> <span style="color: #ff0000;">'s/-lldap//'</span> <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>curl-config</div></div>
<p><em>Solution 3:</em><br />
 * Install the openldap-client package. However, now you have ldap on your system which you probably don&#8217;t use on a webserver.</p>
<p>I went for solution 1, recompiling it myself from the slackware sources:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># cd /usr/src</span><br />
<span style="color: #666666; font-style: italic;"># lftp ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-13.0/source/n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ok, <span style="color: #007800;">cwd</span>=<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-<span style="color: #000000;">13.0</span><span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
lftp ftp.nluug.nl:<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>os<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">/</span>distr<span style="color: #000000; font-weight: bold;">/</span>slackware<span style="color: #000000; font-weight: bold;">/</span>slackware-<span style="color: #000000;">13.0</span><span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #000000; font-weight: bold;">&gt;</span> mirror curl<br />
<span style="color: #666666; font-style: italic;"># cd curl</span><br />
<span style="color: #666666; font-style: italic;"># sed -ie 's/configure/configure --disable-ldap --disable-ldaps/' curl.SlackBuild</span><br />
<span style="color: #666666; font-style: italic;"># bash curl.Slackbuild</span></div></div>
<p>After upgrading the curl package with this build it worked for me without the ldap nonsense.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/php-produces-horrible-problems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C compiler cannot create executables</title>
		<link>http://notes.benv.junerules.com/all/software/c-compiler-cannot-create-executables/</link>
		<comments>http://notes.benv.junerules.com/all/software/c-compiler-cannot-create-executables/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 14:16:09 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=524</guid>
		<description><![CDATA[Yeah, I bet you didn&#8217;t know that. You&#8217;re so stupid. Anyway, this isn&#8217;t the first time I run into this, so I figured it would be good to &#8220;jot this down&#8221; as Choco Billy would say. I got this error while trying to configure apache on a new domU (which has almost no packages installed, [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, I bet you didn&#8217;t know that. You&#8217;re so stupid.<span id="more-524"></span><br />
Anyway, this isn&#8217;t the first time I run into this, so I figured it would be good to &#8220;<span style="color:#00FFFF">jot this down</span>&#8221; as Choco Billy would say.<br />
I got this error while trying to configure <span style="color:#FFFF00">apache</span> on a new domU (which has almost no packages installed, which is why I ran into this):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>jemoeder:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>apache<span style="color: #000000; font-weight: bold;">/</span>httpd-2.2.14<span style="color: #666666; font-style: italic;"># ./configure $TEN_MILLION_OPTIONS_HERE</span><br />
checking <span style="color: #000000; font-weight: bold;">for</span> chosen layout... Apache<br />
<br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>blablabla I<span style="color: #ff0000;">'m a dumbass yadieya*<br />
<br />
checking for C compiler default output file name... <br />
configure: error: in `/usr/src/apache/httpd-2.2.14/srclib/apr'</span>:<br />
configure: error: C compiler cannot create executables<br />
See <span style="color: #000000; font-weight: bold;">`</span>config.log<span style="color: #ff0000;">' for more details.</span></div></div>
<p>Well, I&#8217;ll give you the details: <span style="color:#FF00FF">it&#8217;s missing an assembler</span>. You can find out about this if you actually bother to read the <span style="color:#F00FF0">config.log</span> file in the <span style="color:#00FF00">srclib/apr</span> dir:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">gcc</span>: error trying to <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #ff0000;">'as'</span>: execvp: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory</div></div>
<p>The simple fix: install an assembler. Slackware has the <b><span style="color:#1100FF">binutils</span></b> package for that.<br />
<code class="codecolorer bash vibrant"><span class="bash">slackpkg <span style="color: #c20cb9; font-weight: bold;">install</span> binutils</span></code>, done.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/c-compiler-cannot-create-executables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 5.0 -&gt; 5.1 on Slackware current</title>
		<link>http://notes.benv.junerules.com/all/software/mysql-5-0-5-1-on-slackware-current/</link>
		<comments>http://notes.benv.junerules.com/all/software/mysql-5-0-5-1-on-slackware-current/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:00:47 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=490</guid>
		<description><![CDATA[Slackware recently upgraded the MySQL version from 5.0 to 5.1, from the Changelog: Sun Oct 4 00:17:50 CDT 2009 ap/mysql-5.1.39-x86_64-1.txz: Upgraded. This bumps the version of the shared libraries to .so.16.0.0. Yeah, that&#8217;s all great, but for me this broke on several of my machines. Not because of the expected recompiles (after all, a new [...]]]></description>
			<content:encoded><![CDATA[<p>Slackware recently upgraded the MySQL version from 5.0 to 5.1, from the Changelog:</p>
<blockquote><p>Sun Oct  4 00:17:50 CDT 2009<br />
ap/mysql-5.1.39-x86_64-1.txz:  Upgraded.<br />
  This bumps the version of the shared libraries to .so.16.0.0.</p></blockquote>
<p>Yeah, that&#8217;s all great, but for me this broke on several of my machines. <span id="more-490"></span>Not because of the expected recompiles (after all, a new library, so stuff like vpopmail might need a recompile, I&#8217;m fine with that), but because MySQL failed to handle my configuration files on those machines. You see, I like my data more than I like MySQL, and prefer their <span style="color:#FF0055">InnoDB</span> tables above <span style="color:#FFFF00">MyISAM</span> for that matter (yeah yeah, it&#8217;s still MySQL, whatever). Means I have some configuration lines about InnoDB in my <span style="color:#FF00FF">/etc/my.cnf</span>, like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>mysqld<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
skip-networking<br />
innodb_data_home_dir = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span><br />
innodb_data_file_path = ibdata1:10M:autoextend<br />
innodb_log_group_home_dir = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span><br />
innodb_log_arch_dir = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span><br />
innodb_buffer_pool_size = 64M<br />
innodb_additional_mem_pool_size = 8M</div></div>
<p>So after the upgrade of the package, mysql came down as fast as it came up:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">091005 <span style="color: #000000;">23</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">14</span> mysqld_safe Starting mysqld daemon with databases from <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>mysqld: Table <span style="color: #ff0000;">'mysql.plugin'</span> doesn<span style="color: #ff0000;">'t exist<br />
091005 23:40:14 [ERROR] Can'</span>t open the mysql.plugin table. Please run mysql_upgrade to create it.<br />
091005 <span style="color: #000000;">23</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">14</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ERROR<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>mysqld: unknown variable <span style="color: #ff0000;">'innodb_data_file_path=ibdata1:10M:autoextend'</span><br />
091005 <span style="color: #000000;">23</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">14</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>ERROR<span style="color: #7a0874; font-weight: bold;">&#93;</span> Aborting</div></div>
<p>Aha&#8230; so, I need to run some kind of upgrade tool called <span style="color:#FF00FF">mysql_upgrade</span>, good that they told me about that in advance. (Thanks Slackware guys <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  )<br />
So we try running the upgrade tool:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman:~:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&gt;</span>mysql_upgrade &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
Looking <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #ff0000;">'mysql'</span> <span style="color: #c20cb9; font-weight: bold;">as</span>: mysql<br />
Looking <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #ff0000;">'mysqlcheck'</span> <span style="color: #c20cb9; font-weight: bold;">as</span>: mysqlcheck<br />
Running <span style="color: #ff0000;">'mysqlcheck with default connection arguments<br />
mysqlcheck: Got error: 2002: Can'</span>t connect to <span style="color: #7a0874; font-weight: bold;">local</span> MySQL server through socket <span style="color: #ff0000;">'/var/run/mysql/mysql.sock'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> when trying to connect<br />
FATAL ERROR: Upgrade failed</div></div>
<p>Yeah&#8230; mysql didn&#8217;t quite come up because of the configuration issues, right. You&#8217;d hope an upgrade tool would fix that too, but oh well, guess we&#8217;ll have to do that ourselves.<br />
In fact, let&#8217;s read what they have to say about it themselves. <a href="http://dev.mysql.com/doc/refman/5.1/en/upgrade.html">Upgrading from MySQL 5.0 to 5.1</a>.<br />
Let&#8217;s see&#8230;. backup, check&#8230; read this document&#8230; (gee, wonder what we&#8217;re doing now)&#8230; read about changes&#8230; yeah yeah, cute, plugin api, whatever&#8230; run the upgrade tool&#8230; yeah that failed. If this bla, if that bla&#8230; and then the magic:</p>
<blockquote><p>If problems occur, such as that the new mysqld server does not start or that you cannot connect without a password, verify that you do not have an old my.cnf file from your previous installation. </p></blockquote>
<p>Guess I do huh. So yeah, obviously MySQL starts fine whenever you empty the config file. But what about my old config settings? Are they still needed?<br />
Apparently you can now choose betwen running InnoDB native or as a plugin. Guess I&#8217;ll stick to native.<br />
Now for the fun part. <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html">Checking the options to put in the my.cnf file</a>. Huh, the option that it barfed about still exists&#8230; how can this be? <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-configuration.html">This document tells us how to set up InnoDB</a>&#8230; nothing new in there. <span style="color:#00FFFF">Conclusion: Slackware fucked up.</span> (that is, you can probably run it as a plugin, but I don&#8217;t want it as a plugin! At least tell me about this in the Changelog guys!)<br />
In case -you- want to run it as a plugin, the page I linked describes it. Basically you have to put this in your <span style="color:#FFFF00">/etc/my.cnf</span>:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>mysqld<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
ignore-builtin-innodb<br />
plugin-load=<span style="color: #007800;">innodb</span>=ha_innodb_plugin.so</div></div>
<p>Checking the mysql.Slackbuild script from slackware64-current confirms my suspicions:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">checking whether to use InnoDB Storage Engine... plugin<br />
checking whether to use InnoDB Storage Engine... plugin</div></div>
<p>Fine. So I change the mysql.Slackbuild:</p>
<div class="codecolorer-container diff vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #888822;">--- mysql.SlackBuild&nbsp; &nbsp; 2009-09-28 21:42:00.000000000 +0200</span><br />
<span style="color: #888822;">+++ mysql.SlackBuild-BenV &nbsp; 2009-10-07 17:37:54.747337800 +0200</span><br />
<span style="color: #440088;">@@ -76,6 +76,7 @@</span><br />
&nbsp; &nbsp;--with-ssl=/usr \<br />
&nbsp; &nbsp;--enable-largefile \<br />
&nbsp; &nbsp;--with-readline \<br />
<span style="color: #00b000;">+ &nbsp;--with-plugin-innobase=&quot;yes&quot; \</span><br />
&nbsp; &nbsp;--build=$ARCH-slackware-linux<br />
&nbsp;#<br />
&nbsp;# --without-readline</div></div>
<p>Ironically, running the patched <span style="color:#FF0000">mysql.Slackbuild</span> killed my running mysqld because of the famous OOM killer. Guess 1GB of memory isn&#8217;t enough for both compiling AND running MySQL these days :p<br />
Anyway, it gave my a package, and after upgrading to it I finally had InnoDB back the way I wanted. Yeah, my old configuration file works fine again too.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Welcome to the MySQL monitor. &nbsp;Commands end with ; or \g.<br />
Your MySQL connection <span style="color: #c20cb9; font-weight: bold;">id</span> is <span style="color: #000000;">1</span><br />
Server version: 5.1.39 Source distribution<br />
<br />
Type <span style="color: #ff0000;">'help;'</span> or <span style="color: #ff0000;">'\h'</span> <span style="color: #000000; font-weight: bold;">for</span> help. Type <span style="color: #ff0000;">'\c'</span> to <span style="color: #c20cb9; font-weight: bold;">clear</span> the current input statement.<br />
<br />
mysql<span style="color: #000000; font-weight: bold;">&gt;</span> show storage engines;<br />
+------------+---------+------------------------------------------------------------+--------------+------+------------+<br />
<span style="color: #000000; font-weight: bold;">|</span> Engine &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Support <span style="color: #000000; font-weight: bold;">|</span> Comment &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> Transactions <span style="color: #000000; font-weight: bold;">|</span> XA &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Savepoints <span style="color: #000000; font-weight: bold;">|</span><br />
+------------+---------+------------------------------------------------------------+--------------+------+------------+<br />
<span style="color: #000000; font-weight: bold;">|</span> CSV &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> CSV storage engine &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span><br />
<span style="color: #000000; font-weight: bold;">|</span> MRG_MYISAM <span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Collection of identical MyISAM tables &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span><br />
<span style="color: #000000; font-weight: bold;">|</span> MEMORY &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Hash based, stored <span style="color: #000000; font-weight: bold;">in</span> memory, useful <span style="color: #000000; font-weight: bold;">for</span> temporary tables &nbsp;<span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span><br />
<span style="color: #000000; font-weight: bold;">|</span> InnoDB &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> Supports transactions, row-level locking, and foreign keys <span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span> YES &nbsp;<span style="color: #000000; font-weight: bold;">|</span> YES &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">|</span><br />
<span style="color: #000000; font-weight: bold;">|</span> MyISAM &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> DEFAULT <span style="color: #000000; font-weight: bold;">|</span> Default engine <span style="color: #c20cb9; font-weight: bold;">as</span> of MySQL <span style="color: #000000;">3.23</span> with great performance &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; <span style="color: #000000; font-weight: bold;">|</span> NO &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">|</span><br />
+------------+---------+------------------------------------------------------------+--------------+------+------------+<br />
<span style="color: #000000;">5</span> rows <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.00</span> sec<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>****UPDATE****<br />
Seems like the guys at slackware fixed it, from their Changelog:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Sat Oct <span style="color: #000000;">17</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">56</span>:<span style="color: #000000;">15</span> UTC <span style="color: #000000;">2009</span><br />
ap<span style="color: #000000; font-weight: bold;">/</span>mysql-5.1.39-x86_64-<span style="color: #000000;">2</span>.txz: &nbsp;Rebuilt.<br />
&nbsp; Added <span style="color: #660033;">--with-innodb</span> option. &nbsp;This was omitted from the <span style="color: #c20cb9; font-weight: bold;">last</span> package version<br />
&nbsp; since .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--help</span> no longer lists <span style="color: #660033;">--with-innodb</span> or --without-innodb,<br />
&nbsp; but evidently the option is still supported <span style="color: #7a0874; font-weight: bold;">&#40;</span>and needed<span style="color: #7a0874; font-weight: bold;">&#41;</span>.<br />
&nbsp; Thanks to Amritpal Bath.</div></div>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/mysql-5-0-5-1-on-slackware-current/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slackware(64), Qmail and IPv6</title>
		<link>http://notes.benv.junerules.com/all/software/slackware64-qmail-and-ipv6/</link>
		<comments>http://notes.benv.junerules.com/all/software/slackware64-qmail-and-ipv6/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 13:34:46 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[djbdns]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=485</guid>
		<description><![CDATA[Now that we have Xenbro up and running with a domain attached to it and a bunch of toy domU&#8217;s running, we soon ran into the need for a dns server and mailer. Needless to say I don&#8217;t like the default Sendmail and Bind junk very much (wonder why Slackware still ships it&#8230;), and my [...]]]></description>
			<content:encoded><![CDATA[<p>Now that we have Xenbro up and running with a domain attached to it and a bunch of toy domU&#8217;s running, we soon ran into the need for a dns server and mailer.<br />
Needless to say I don&#8217;t like the default Sendmail and Bind junk very much (wonder why Slackware still ships it&#8230;), and my experiences with Exim and Postfix aren&#8217;t all too great either.<br />
Sure, they work, but they&#8217;re too complex for my liking. I like to know what&#8217;s going on, so I still use my trusty old <a href="http://cr.yp.to/qmail.html">Qmail</a> and <a href="http://cr.yp.to/djbdns.html">Djbdns</a> for mail and dns.<br />
However, since those packages haven&#8217;t been updated in years, some newer features are missing. So I patch them 4 times over and stab them a bit so they work the way I like <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <span id="more-485"></span></p>
<p>So what things are missing in the vanilla Qmail 1.03 package?</p>
<ul>
<li>IPv6 support</li>
<li>A ton of antispam features like SPF, DomainKeys, MFCHECK, etc</li>
<li>Authentication support</li>
<li>Filter support for stuff like Spamassassin, ClamAV, /dev/null</li>
<li>Virtual domains</li>
</ul>
<p>Probably more, but these are things I care about. Some of these points are not entirely true, for instance you could add filter support by mangling the <span style="color:#FF00FF">.qmail</span> files for all users, but these are things you want centralized so all things have to pass the filter, not for only a few accounts.<br />
In order to fix the missing features I use a few things.<br />
First of all: <a href="http://qmail.jms1.net/patches/combined-details.shtml">John M. Simpson&#8217;s combined patch</a>. This patch fixes more than half of the list. It&#8217;s a collection of smaller patches all rolled together in a nice patch that cleanly applies to qmail 1.0.3 as supplied by D.J. Bernstein. Thanks a lot to Mr Simpson! His pages also have a lot of notes and scripts on how to get qmail up and running, and how to run the services from daemontools. You might want to <a href="http://qmail.jms1.net/scripts/">check them out</a>.<br />
Next, I use <a href="http://www.inter7.com/index.php?page=vpopmail">vpopmail</a> to handle the virtual domains problem. Together with <a href="http://www.inter7.com/index.php?page=qmailadmin">qmailadmin</a> they make the virtual domains thing very easy.</p>
<p>Anyway, that is all old stuff. New stuff is having Qmail working correctly using <span style="color:#FFFF00">IPv6</span>.<br />
It&#8217;s easy to get it up and running, basically just compile qmail as usual and patch <a href="http://cr.yp.to/ucspi-tcp.html">ucspi-tcp</a> using <a href="http://www.fefe.de/ucspi/">Fefe&#8217;s IPv6 patch</a>. Make a few new qmail-smtp services for the IPv6 enabled addressses and go!<br />
While this does work for receiving mail, it fails for a few things in the combined patch &#8211; like SPF checking.<br />
You will run into stuff like:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">@</span>400000004acb39440ca58a8c qmail-smtpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">28952</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Received-SPF: unknown <span style="color: #7a0874; font-weight: bold;">&#40;</span>service.xenbro.nl: No IP address <span style="color: #000000; font-weight: bold;">in</span> conversation<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Obviously this is a lie, but at least it&#8217;s dealt with gracefully. However, you want SPF checking for the IPv6 address!<br />
Fortunately, <a href="http://www.brandonturner.net/blog/2009/08/qmail-ipv6-jms1/">Brandon Turner</a> has patched this with a patch that applies to Qmail 1.0.3 when already patched with John&#8217;s patch. Enough patches for you? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
After recompiling and restarting your services you will see that it works now. Thanks Brandon! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">@</span>400000004acb4025340a0b5c qmail-smtpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">31526</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Received-SPF: none <span style="color: #7a0874; font-weight: bold;">&#40;</span>service.xenbro.nl: domain at je.moeder.com does not designate permitted sender hosts<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>What does Slackware have to do with this?<br />
Nothing, I just like the way it runs the qmail services :-p</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/slackware64-qmail-and-ipv6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slackware and dial-up through a mobile phone</title>
		<link>http://notes.benv.junerules.com/all/software/slackware-and-dial-up-through-a-mobile-phone/</link>
		<comments>http://notes.benv.junerules.com/all/software/slackware-and-dial-up-through-a-mobile-phone/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 18:28:07 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[dial-up]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[wvdial]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=470</guid>
		<description><![CDATA[This weekend we&#8217;ll be going to some abandoned part of the country because we&#8217;re &#8220;celebrating&#8221; the 50th birthday of Lotjuh&#8217;s mom. (celebrating the fact that someone is a year closer to death&#8230;. weird rituals people engage in&#8230;). Anyway, since it&#8217;s in the middle of nowhere (&#8220;Limburg&#8221;, might as well be germany or belgium as far [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend we&#8217;ll be going to some abandoned part of the country because we&#8217;re &#8220;celebrating&#8221; the 50th birthday of Lotjuh&#8217;s mom. (celebrating the fact that someone is a year closer to death&#8230;. weird rituals people engage in&#8230;). Anyway, since it&#8217;s in the middle of nowhere (&#8220;Limburg&#8221;, might as well be germany or belgium as far as I&#8217;m concerned) and the information page of the abandoned place we&#8217;re staying at didn&#8217;t hint anything about internet, I&#8217;m assuming the worst. Which means no wireless, no wired, only mobile phones. (and singing people *sigh*).<br />
However, there is still hope to <a href="http://www.animecubed.com/billy/?91818" title="Billy vs Snakeman!">play Billy vs Snakeman</a> this weekend.</p>
<p>Through a mobile phone!<span id="more-470"></span></p>
<p>Lotjuh has an LG Chocolate (of which the battery is dying), and with it came a little cable that connects the device to a USB port. So hopefully I plugged it into my laptop. The one that runs pokemon os. <code class="codecolorer text vibrant"><span class="text">dmesg</span></code> showed some gibberish, but it was only about some kind of mass storage device it found. Bah.<br />
The phone showed a screen with:<br />
<blockquote>If you use modem, select &#8220;Connectivity-modem&#8221;</p></blockquote>
<p>However, it didn&#8217;t respond to any keypresses. After disconnecting it again and going through the menu I finally found the holy grail that I was looking for. It was filled with candy. And modem. It was hidden at Menu -> Settings -> Connectivity -> Modem -> YES YES YES!!!<br />
Connecting it again now gave <code class="codecolorer bash vibrant"><span class="bash">cdc_acm <span style="color: #000000;">3</span>-<span style="color: #000000;">1</span>:<span style="color: #000000;">1.0</span>: ttyACM0: USB ACM device</span></code>. Woohoo!<br />
But how do we use such a thing? And since I&#8217;m not bringing this laptop, how do we use it on slackware?</p>
<p>Google was more helpful this time and showed me <a href="http://alumnit.ca/wiki/index.php?page=DownloadReleases">wvdial</a>. Sounds easy, so I got the <span style="color:#FF00FF">wvstreams</span> library and ran it through slackbuild. However, it complained about not finding Qt and readline. Qt was fixed by installing the official qt3 package and sourcing <span style="color:#FF00FF">/etc/profile.d/qt.sh</span>, but readline failed because of this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">configure:<span style="color: #000000;">8916</span>: checking <span style="color: #000000; font-weight: bold;">for</span> readline <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #660033;">-lreadline</span><br />
configure:<span style="color: #000000;">8951</span>: <span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #660033;">-o</span> conftest &nbsp;-I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>dbus-<span style="color: #000000;">1.0</span> -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>dbus-<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>include &nbsp; -Iyes<span style="color: #000000; font-weight: bold;">/</span>include <span style="color: #660033;">-ldbus-1</span> &nbsp; <span style="color: #660033;">-Lyes</span> conftest.cpp <span style="color: #660033;">-lreadline</span> &nbsp; <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">5</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>PC<span style="color: #ff0000;">'<br />
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tgetflag'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>tgetent<span style="color: #ff0000;">'<br />
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `UP'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>tputs<span style="color: #ff0000;">'<br />
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `tgoto'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>tgetnum<span style="color: #ff0000;">'<br />
/usr/lib/gcc/i486-slackware-linux/4.3.3/../../../libreadline.so: undefined reference to `BC'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gcc<span style="color: #000000; font-weight: bold;">/</span>i486-slackware-linux<span style="color: #000000; font-weight: bold;">/</span>4.3.3<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>libreadline.so: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>tgetstr<span style="color: #ff0000;">'</span></div></div>
<p>This problem was quickly fixed by adding the ncurses library to the LIBS environment variable like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>error:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>wvstreams-<span style="color: #000000;">4.6</span><span style="color: #666666; font-style: italic;"># export LIBS=&quot; -lncurses&quot;</span></div></div>
<p>This time around configure didn&#8217;t complain anymore and we continued to build the package.<br />
That also failed:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">linking libwvdbus.so...<br />
<span style="color: #c20cb9; font-weight: bold;">g++</span>: <span style="color: #000000; font-weight: bold;">/</span>libdbus-<span style="color: #000000;">1</span>.a: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory<br />
<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>libwvdbus.so<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span></div></div>
<p>No surprise that it couldn&#8217;t find libdus there. Not only that, it&#8217;s the wrong library, I don&#8217;t have the thing statically linked.<br />
Here&#8217;s a patch that suppsedly fixes it:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=wvstreams-4.6-dbus.patch" title="Downloaded 41 times">wvstreams 4.6 dbus patch</a> - Version  - SHA: d64703eb27da74348ac0e745c498138c78650f5c<br />
You&#8217;d expect it to work now, but ha! It doesn&#8217;t. Somehow it fails to set <span style="color:#FFFF00">DBUS_LIBDIR</span> to <span style="color:#FF00FF">/usr/lib</span> (or <span style="color:#FF00FF">/usr/lib64</span> if you have a 64 bit version of slackware), so help him with it and it&#8217;ll work:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>error:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>wvstreams-<span style="color: #000000;">4.6</span><span style="color: #666666; font-style: italic;"># export DBUS_LIBDIR=/usr/lib</span></div></div>
<p>Now it should compile fine after you run configure again (I used slackbuild of course) and you&#8217;ll have the wvstreams package. (it even worked on 64 bit!)</p>
<p>Next the <span style="color:#FF00FF">wvdial</span> tool was pulled through slackbuild.<br />
However, this thing doesn&#8217;t even include configure, only a Makefile. So edit the Makefile to change the paths and use make to compile.<br />
Or take my packages if you trust me for not formatting your harddisk and rootkitting your mom:<br />
32 bit slackware 13 package:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=wvdial-1.60-i386-1.txz" title="Downloaded 42 times">wvdial 32 bit slackware 13 package</a> - Version  - SHA: c19693808861373fa403ea5e9caf427c2cc64924<br />
64 bit slackware 13 package:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=wvdial-1.60-x86_64-1.txz" title="Downloaded 41 times">wvdial slackware 13 (i386) package</a> - Version 1.60 - SHA: 19d67b45ca26542adc7967725483266415710ff6</p>
<p>Then finally, time to test the mobile connection!<br />
First for the configuration of the modem, run <span style="color:#FFFF33">wvdialconf</span> and it will write a config file for you to <span style="color:#00FFFF">/etc/wvdial.conf</span>.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>error:~<span style="color: #666666; font-style: italic;"># wvdialconf </span><br />
Editing <span style="color: #000000; font-weight: bold;">`/</span>etc<span style="color: #000000; font-weight: bold;">/</span>wvdial.conf<span style="color: #ff0000;">'.<br />
<br />
Scanning your serial ports for a modem.<br />
<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 Z -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 -- OK<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0 -- OK<br />
ttyACM0&lt;*1&gt;: Modem Identifier: ATI -- LG Electronics Inc.<br />
ttyACM0&lt;*1&gt;: Speed 4800: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 9600: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 19200: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 38400: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 57600: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 115200: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 230400: AT -- OK<br />
ttyACM0&lt;*1&gt;: Speed 460800: AT -- OK<br />
ttyACM0&lt;*1&gt;: Max speed is 460800; that should be safe.<br />
ttyACM0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0 -- OK<br />
<br />
Found an USB modem on /dev/ttyACM0.<br />
/etc/wvdial.conf&lt;Warn&gt;: Can'</span>t open <span style="color: #ff0000;">'/etc/wvdial.conf'</span> <span style="color: #000000; font-weight: bold;">for</span> reading: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory<br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>wvdial.conf<span style="color: #000000; font-weight: bold;">&lt;</span>Warn<span style="color: #000000; font-weight: bold;">&gt;</span>: ...starting with blank configuration.<br />
Modem configuration written to <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>wvdial.conf.<br />
ttyACM0<span style="color: #000000; font-weight: bold;">&lt;</span>Info<span style="color: #000000; font-weight: bold;">&gt;</span>: Speed <span style="color: #000000;">460800</span>; init <span style="color: #ff0000;">&quot;ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0&quot;</span></div></div>
<p>Next, edit the configuration file and change the <span style="color:#33FF33">Phone</span>, <span style="color:#33FF33">User</span>, and <span style="color:#33FF33">Password</span> line to reflect your account that you got from your ISP. When that&#8217;s done you can finally try to dial up!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>error:~<span style="color: #666666; font-style: italic;"># wvdial</span><br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> WvDial: Internet dialer version <span style="color: #000000;">1.60</span><br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Initializing modem.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATZ<br />
ATZ<br />
OK<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATQ0 V1 E1 <span style="color: #007800;">S0</span>=<span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">&amp;</span>C1 <span style="color: #000000; font-weight: bold;">&amp;</span>D2 +<span style="color: #007800;">FCLASS</span>=<span style="color: #000000;">0</span><br />
ATQ0 V1 E1 <span style="color: #007800;">S0</span>=<span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">&amp;</span>C1 <span style="color: #000000; font-weight: bold;">&amp;</span>D2 +<span style="color: #007800;">FCLASS</span>=<span style="color: #000000;">0</span><br />
OK<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Modem initialized.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATDT01234567JEMOEDER<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Waiting <span style="color: #000000; font-weight: bold;">for</span> carrier.<br />
ATDT01234567JEMOEDER<br />
CONNECT <span style="color: #000000;">9600</span><br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Carrier detected. &nbsp;Waiting <span style="color: #000000; font-weight: bold;">for</span> prompt.<br />
<span style="color: #000000;">1</span>: Welcome to XS4ALL, <span style="color: #000000; font-weight: bold;">for</span> UUCP or terminal <span style="color: #c20cb9; font-weight: bold;">login</span>, please dial 01234-<span style="color: #000000;">56789</span><br />
<span style="color: #c20cb9; font-weight: bold;">login</span>: <br />
<span style="color: #c20cb9; font-weight: bold;">login</span>: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a <span style="color: #c20cb9; font-weight: bold;">login</span> prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: jemoeder<br />
<span style="color: #c20cb9; font-weight: bold;">login</span>: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a <span style="color: #c20cb9; font-weight: bold;">login</span> prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: jemoeder<br />
jemoeder<br />
Password: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a password prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: <span style="color: #7a0874; font-weight: bold;">&#40;</span>password<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #000000; font-weight: bold;">******</span><br />
Login incorrect <br />
<span style="color: #c20cb9; font-weight: bold;">login</span>: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a <span style="color: #c20cb9; font-weight: bold;">login</span> prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: jemoeder<br />
iseenhoer<br />
Password: <br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Looks like a password prompt.<br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: <span style="color: #7a0874; font-weight: bold;">&#40;</span>password<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
--<span style="color: #000000; font-weight: bold;">&gt;</span> Don<span style="color: #ff0000;">'t know what to do! &nbsp;Starting pppd and hoping for the best.<br />
--&gt; Starting pppd at Thu Sep 24 20:21:09 2009<br />
--&gt; Pid of pppd: 6602<br />
--&gt; Using interface ppp0<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; local &nbsp;IP address 30.152.326.815<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; remote IP address -6.234.56.89<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; primary &nbsp; DNS address 194.109.6.66<br />
--&gt; pppd: @?0[08]@?0[08]<br />
--&gt; secondary DNS address 194.109.104.104<br />
--&gt; pppd: @?0[08]@?0[08]</span></div></div>
<p>Woohoo, it logged in! At this point wvdial will be stuck until you want to disconnect (CTRL-C or kill).<br />
Have fun paying for your expensive slow as dirt dial-up internet. But hopefully it will be good enough for me to check mail and play <a href="http://www.animecubed.com/billy/?91818">Billy</a> this weekend <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/slackware-and-dial-up-through-a-mobile-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NFS issues</title>
		<link>http://notes.benv.junerules.com/all/software/nfs-issues/</link>
		<comments>http://notes.benv.junerules.com/all/software/nfs-issues/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 18:54:04 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=379</guid>
		<description><![CDATA[Yesterday evening after getting tired of playing the Aion open beta (it was the last night of the open beta, so we felt like at least reaching level 10, which we did&#8230; and then we could ~FLYYYY) we decided to go downstairs to watch some series on our beamer. So we fire up the machine [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday evening after getting tired of playing the Aion open beta (it was the last night of the open beta, so we felt like at least reaching level 10, which we did&#8230; and then we could ~FLYYYY) we decided to go downstairs to watch some series on our beamer. So we fire up the machine connected to it, which runs everything from <a href="http://nl.wikipedia.org/wiki/Network_File_System">NFS</a>. It didn&#8217;t take long for the boot screen to come up and after the default selection was made for us it ran through the boot process spewing out the usual kernel messages&#8230;..<span id="more-379"></span><br />
Until it ran into this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Looking up port of RPC <span style="color: #000000;">100003</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span> on 192.168.1.1<br />
Looking up port of RPC <span style="color: #000000;">100005</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span> on 192.168.1.1<br />
VFS: Mounted root <span style="color: #7a0874; font-weight: bold;">&#40;</span>nfs filesystem<span style="color: #7a0874; font-weight: bold;">&#41;</span> on device <span style="color: #000000;">0</span>:<span style="color: #000000;">14</span><br />
Freeing unused kernel memory: 412k freed<br />
INIT: version <span style="color: #000000;">2.86</span> booting<br />
nfs: server 192.168.1.1 not responding, still trying</div></div>
<p>&#8230; huh? What&#8217;s taking so long? Our server with issues? That&#8217;s unlikely since I still used it 5 minutes earlier. After checking out the NFS server and deciding nothing was wrong with it (or at least, it didn&#8217;t look like it) I got fed up with it and went to bed.<br />
Don&#8217;t you hate it when stuff stops working just when you&#8217;re tired and want to go to sleep? Fortunately for me this is our own internal problem so I could actually do so <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Today I decided to go find out what the hell was wrong with it. So again I booted the machine to find out the above kernel messages.<br />
Time for some tcpdump on the nfs server to see if that can shine some light on this situation. (needless to say there were no useful log entries anywhere).<br />
Tcpdump:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000;">18</span>:<span style="color: #000000;">27</span>:<span style="color: #000000;">51.931303</span> IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl <span style="color: #000000;">64</span>, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">132</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 193.168.1.9.1304809574 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">104</span> getattr fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004014D00460054C8D81757072101679D7E1B000000000000000000000000<br />
<span style="color: #000000;">18</span>:<span style="color: #000000;">27</span>:<span style="color: #000000;">51.931402</span> IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl <span style="color: #000000;">64</span>, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">124</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.1.2049 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.9.1304809574: reply ok <span style="color: #000000;">96</span> getattr DIR <span style="color: #000000;">40755</span> ids <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span> sz <span style="color: #000000;">69632</span><br />
<span style="color: #000000;">18</span>:<span style="color: #000000;">27</span>:<span style="color: #000000;">55.725726</span> IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl <span style="color: #000000;">64</span>, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
<span style="color: #000000;">18</span>:<span style="color: #000000;">27</span>:<span style="color: #000000;">56.825633</span> IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl <span style="color: #000000;">64</span>, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
<span style="color: #000000;">18</span>:<span style="color: #000000;">27</span>:<span style="color: #000000;">59.025453</span> IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl <span style="color: #000000;">64</span>, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
<span style="color: #000000;">18</span>:<span style="color: #000000;">28</span>:<span style="color: #000000;">03.425078</span> IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl <span style="color: #000000;">64</span>, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
<span style="color: #000000;">18</span>:<span style="color: #000000;">28</span>:<span style="color: #000000;">12.224347</span> IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl <span style="color: #000000;">64</span>, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
<span style="color: #000000;">18</span>:<span style="color: #000000;">28</span>:<span style="color: #000000;">13.324257</span> IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl <span style="color: #000000;">64</span>, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span><br />
<span style="color: #000000;">18</span>:<span style="color: #000000;">28</span>:<span style="color: #000000;">15.524071</span> IP <span style="color: #7a0874; font-weight: bold;">&#40;</span>tos 0x0, ttl <span style="color: #000000;">64</span>, <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #000000;">0</span>, offset <span style="color: #000000;">0</span>, flags <span style="color: #7a0874; font-weight: bold;">&#91;</span>DF<span style="color: #7a0874; font-weight: bold;">&#93;</span>, proto UDP <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, length <span style="color: #000000;">140</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp; 192.168.1.9.3787772006 <span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.1.1.2049: <span style="color: #000000;">112</span> lookup fh Unknown<span style="color: #000000; font-weight: bold;">/</span>010004004D00460054C8D8170000000000000000000000000000000000000000 <span style="color: #ff0000;">&quot;proc&quot;</span></div></div>
<p>Hmm, interesting. The first request seems to &#8220;work&#8221; (read: it receives an answer) while the rest of the messages are somehow ignored. Wonder why&#8230;<br />
Just to make sure I checked the firewall on the server, which should allow pretty much everything:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>uil<span style="color: #666666; font-style: italic;"># iptables -L -v -n</span><br />
Chain INPUT <span style="color: #7a0874; font-weight: bold;">&#40;</span>policy ACCEPT 198M packets, 89G bytes<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp;pkts bytes target &nbsp; &nbsp; prot opt <span style="color: #000000; font-weight: bold;">in</span> &nbsp; &nbsp; out &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">source</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination<br />
<br />
Chain FORWARD <span style="color: #7a0874; font-weight: bold;">&#40;</span>policy ACCEPT <span style="color: #000000;">0</span> packets, <span style="color: #000000;">0</span> bytes<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp;pkts bytes target &nbsp; &nbsp; prot opt <span style="color: #000000; font-weight: bold;">in</span> &nbsp; &nbsp; out &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">source</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination<br />
<br />
Chain OUTPUT <span style="color: #7a0874; font-weight: bold;">&#40;</span>policy ACCEPT 228M packets, 166G bytes<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp;pkts bytes target &nbsp; &nbsp; prot opt <span style="color: #000000; font-weight: bold;">in</span> &nbsp; &nbsp; out &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">source</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination</div></div>
<p>Well, that seems to be true. Maybe something weird in the mount options? Let&#8217;s see the <span style="color:#FF00FF">/etc/fstab</span> for the NFS client:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>teigetje<span style="color: #666666; font-style: italic;"># cat /etc/fstab</span><br />
192.168.1.1:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>teigetje &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">/</span> &nbsp; &nbsp; &nbsp; nfs &nbsp; &nbsp; <span style="color: #007800;">rsize</span>=<span style="color: #000000;">8192</span>,<span style="color: #007800;">wsize</span>=<span style="color: #000000;">8192</span>,<span style="color: #007800;">nfsvers</span>=<span style="color: #000000;">3</span> <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
proc &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span>proc &nbsp; proc &nbsp; &nbsp;defaults &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
tmpfs &nbsp; <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>shm &nbsp; &nbsp; &nbsp; &nbsp;tmpfs &nbsp; defaults &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br />
tmpfs &nbsp; <span style="color: #000000; font-weight: bold;">/</span>tmp &nbsp; &nbsp;tmpfs &nbsp; defaults &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span></div></div>
<p>Nothing weird&#8230; or is there? After messing around with it for a bit I decided it really wasn&#8217;t anything in there.<br />
Time to do a test on a different machine in the network. On my workstation I tried to mount the root path after giving myself permissions and re-exporting the nfs paths:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>mnt:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> <span style="color: #007800;">rsize</span>=<span style="color: #000000;">8192</span>,<span style="color: #007800;">wsize</span>=<span style="color: #000000;">8192</span>,<span style="color: #007800;">nfsvers</span>=<span style="color: #000000;">3</span> 192.168.1.1:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>teigetje tmp<br />
root<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>mnt:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-al</span> tmp<br />
<span style="color: #000000; font-weight: bold;">*</span>stuck<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>And there it was, being stuck for what seems to be forever. So in other words: the mount worked, but then it doesn&#8217;t respond for the ls command. What&#8230; the&#8230; fuck.<br />
Mind boggling, while the logs on the nfs server gave no hints at all. (as usual).<br />
To make this even more interesting, there is another export on that same nfs server that most workstation use, called <span style="color:#00FFFF">general_stores</span>. (to access the music collection etc).<br />
Can&#8217;t remember that being broken&#8230;. let&#8217;s test:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-lad</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores<span style="color: #000000; font-weight: bold;">/</span>.<br />
drwxr-xr-x <span style="color: #000000;">14</span> root root <span style="color: #000000;">4096</span> Aug <span style="color: #000000;">25</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">58</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">/</span></div></div>
<p>How can this be?! This mount works fine while the other doesn&#8217;t? What the hell is so special about that NFS client&#8217;s export?</p>
<p>And then it hit me.</p>
<p>*<span style="color:#FF0011">WHACK</span>*<br />
(ouch)</p>
<p>The window that I had open with the <span style="color:#FFF011">ls -al tmp</span> suddenly decided to work. It gave this listing:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ls</span>: cannot access tmp<span style="color: #000000; font-weight: bold;">/</span>proc: Input<span style="color: #000000; font-weight: bold;">/</span>output error<br />
total <span style="color: #000000;">164</span><br />
drwxr-xr-x <span style="color: #000000;">21</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">14</span> .<br />
drwxr-xr-x <span style="color: #000000;">12</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">26</span> &nbsp;<span style="color: #000000;">2006</span> ..<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">2</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">14</span> bin<br />
drwxr-xr-x <span style="color: #000000;">13</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:05 boot<br />
drwxr-xr-x <span style="color: #000000;">17</span> root root <span style="color: #000000;">69632</span> Oct &nbsp;<span style="color: #000000;">6</span> &nbsp;<span style="color: #000000;">1997</span> dev<br />
drwxr-xr-x <span style="color: #000000;">71</span> root root <span style="color: #000000;">12288</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">24</span> etc<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">5</span> root root &nbsp;<span style="color: #000000;">4096</span> Oct &nbsp;<span style="color: #000000;">6</span> &nbsp;<span style="color: #000000;">1997</span> home<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">6</span> root root <span style="color: #000000;">12288</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">11</span> lib<br />
drwxr-xr-x <span style="color: #000000;">16</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">47</span> media<br />
drwxr-xr-x <span style="color: #000000;">12</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">26</span> &nbsp;<span style="color: #000000;">2006</span> mnt<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">9</span> root root &nbsp;<span style="color: #000000;">4096</span> Jun <span style="color: #000000;">10</span> &nbsp;<span style="color: #000000;">2007</span> opt<br />
?????????? &nbsp;? ? &nbsp; &nbsp;? &nbsp; &nbsp; &nbsp; &nbsp;? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;? proc<br />
drwx--x--- <span style="color: #000000;">28</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">24</span> root<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">2</span> root root &nbsp;<span style="color: #000000;">4096</span> Jun <span style="color: #000000;">14</span> 05:<span style="color: #000000;">35</span> sbin<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">2</span> root root &nbsp;<span style="color: #000000;">4096</span> Apr &nbsp;<span style="color: #000000;">8</span> &nbsp;<span style="color: #000000;">2007</span> srv<br />
drwxr-xr-x &nbsp;<span style="color: #000000;">2</span> root root &nbsp;<span style="color: #000000;">4096</span> May <span style="color: #000000;">12</span> &nbsp;<span style="color: #000000;">2004</span> sys<br />
drwxrwxrwt &nbsp;<span style="color: #000000;">4</span> root root &nbsp;<span style="color: #000000;">4096</span> Sep <span style="color: #000000;">14</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">17</span> tmp<br />
drwxr-xr-x <span style="color: #000000;">19</span> root root &nbsp;<span style="color: #000000;">4096</span> Jul <span style="color: #000000;">16</span> 02:<span style="color: #000000;">22</span> usr<br />
drwxr-xr-x <span style="color: #000000;">19</span> root root &nbsp;<span style="color: #000000;">4096</span> Aug &nbsp;<span style="color: #000000;">4</span> 01:<span style="color: #000000;">52</span> var</div></div>
<p>Doh! /proc &#8230; of course that&#8217;s the problem! That&#8217;s why tcpdump showed the &#8220;proc&#8221; entries!</p>
<p>But why?</p>
<p>Well, recently I moved some disks around and added a &#8216;<span style="color:#F00FFF">crossmnt</span>&#8216; option in the <span style="color:#FF00FF">/etc/exports</span> file on the NFS server.<br />
This option gives the nfs clients the ability to cross mount borders, so for example if I have this on the nfs server:<br />
 * /mnt/disk with device /dev/sda1 mounted there<br />
 * /mnt/disk/stuff with device /dev/sdb1 mounted there<br />
And then export /mnt/disk and mount it on my nfs client, I can see /mnt/disk/stuff with its contents because of the crossmnt option. Without that option the directory would be empty on nfs clients.</p>
<p>So how does this relate to proc? Well, since proc is &#8220;special&#8221; it has a ton of special files that nfs can&#8217;t deal with and therefore can not export.<br />
Now normally this wouldn&#8217;t be an issue, since it shouldn&#8217;t be mounted in the first place (the nfs server has its own /proc, the nfs cilent mounts its own version so it only needs a  place to mount it on). However, a little earlier my girly friend mounted it &#8220;because she had to build <a href="http://www.enlightenment.org/">E</a>&#8220;. Don&#8217;t ask.<br />
E again&#8230;. always the same&#8230; <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
After unmounting the proc dir and rebooting the NFS client it had no more problems and booted fine.</p>
<p>Conclusion:<br />
NFS can&#8217;t deal with proc. Don&#8217;t hide a mounted procfs in your nfs exports.<br />
NFS sucks because of stuff like this, but I haven&#8217;t found anything better so far. Guess we&#8217;ll stick with it for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/nfs-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pulseaudio, slackware and udev</title>
		<link>http://notes.benv.junerules.com/all/software/pulseaudio-slackware-and-udev/</link>
		<comments>http://notes.benv.junerules.com/all/software/pulseaudio-slackware-and-udev/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 14:42:30 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[udev]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=367</guid>
		<description><![CDATA[Yesterday I found a release notice in the pulseaudio mailinglist announcing version 0.9.16. Today, I found another release note in the mailinglist that announced pulseaudio version 0.9.17. Gee, another fuckup? (but that&#8217;s part of the release process I guess ) Anyway, I decided to upgrade my 0.9.15 installation since it still glitches every now and [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I found a release notice in the <span style="color:#FF00FF">pulseaudio</span> mailinglist announcing version 0.9.16.<br />
Today, I found another release note in the mailinglist that announced pulseaudio version 0.9.17. Gee, another fuckup? (but that&#8217;s part of the release process I guess <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<p>Anyway, I decided to upgrade my 0.9.15 installation since it still glitches every now and then.<span id="more-367"></span><br />
With glitches I mean &#8220;The music played by mpd suddenly sounds as if you have quad damage in quake 3 arena and filter out most of the music frequencies&#8221;. You know, when you shoot a quad damage rocket through a hallway, that kind of sound. Restarting pulseaudio always fixes this. (I&#8217;ve been running into this glitch ever since I started using pulse). Seems to occur randomly though&#8230; sometimes when the server is busy, sometimes when switching from a .mod file to a .mp3 file, sometimes just when the lights turn on. You know the kind of glitch.<br />
Other than I kind of enjoy pulseaudio, even though it&#8217;s a struggle to get going. It does allow our server to stream to other servers and stuff like that, which is very cute. Oh, and per application volume levels and mixing etc&#8230; also good.<br />
This pulseaudio installation runs on our local server &#8212; in daemon/server mode &#8212; btw, on which we have connected our amplifier and speakers as to enlighten our office/game room/throne chamber.</p>
<p>So for compiling version 0.9.16 the first thing I ran into was <span style="color:#00FFFF">libsndfile</span> that was outdated. Version 1.0.17 was too old, so I ran slackbuild on the new <a href="http://www.mega-nerd.com/libsndfile/libsndfile-1.0.20.tar.gz">libsndfile v1.0.20.tar.gz</a>. Out came a package, upgrade, voila.<br />
Next, I noticed the pulseaudio configure output telling me:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; Enable udev: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; no<br />
&nbsp; &nbsp; Enable HAL-<span style="color: #000000; font-weight: bold;">&gt;</span>udev compat: &nbsp; &nbsp; &nbsp; no</div></div>
<p>I kinda wondered why, since my system definately runs udev. In <span style="color:#F00FFF">config.log</span> we find:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">configure:<span style="color: #000000;">26464</span>: checking <span style="color: #000000; font-weight: bold;">for</span> UDEV<br />
configure:<span style="color: #000000;">26471</span>: <span style="color: #007800;">$PKG_CONFIG</span> <span style="color: #660033;">--exists</span> <span style="color: #660033;">--print-errors</span> <span style="color: #ff0000;">&quot; libudev &gt;= 143 &quot;</span><br />
Requested <span style="color: #ff0000;">'libudev &gt;= 143'</span> but version of libudev is <span style="color: #000000;">141</span><br />
configure:<span style="color: #000000;">26474</span>: <span style="color: #007800;">$?</span> = <span style="color: #000000;">1</span><br />
configure:<span style="color: #000000;">26487</span>: <span style="color: #007800;">$PKG_CONFIG</span> <span style="color: #660033;">--exists</span> <span style="color: #660033;">--print-errors</span> <span style="color: #ff0000;">&quot; libudev &gt;= 143 &quot;</span><br />
Requested <span style="color: #ff0000;">'libudev &gt;= 143'</span> but version of libudev is <span style="color: #000000;">141</span><br />
configure:<span style="color: #000000;">26490</span>: <span style="color: #007800;">$?</span> = <span style="color: #000000;">1</span><br />
Requested <span style="color: #ff0000;">'libudev &gt;= 143'</span> but version of libudev is <span style="color: #000000;">141</span><br />
configure:<span style="color: #000000;">26517</span>: result: no</div></div>
<p>Aha.<br />
New challenge!<br />
Let&#8217;s see if we can grab the <a href="ftp://ftp.slackware.com:/pub/slackware/slackware-current/source/a/udev">official slackware udev sources</a> and get them to run a newer package! Today the latest udev is <a href="http://www.us.kernel.org/pub/linux/utils/kernel/hotplug/udev-146.tar.bz2">udev version 1.4.6</a>.<br />
So I changed the udev.Slackbuild to pick version 1.4.6</p>
<div class="codecolorer-container diff vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #888822;">--- udev.SlackBuild.org &nbsp; &nbsp; 2009-09-11 14:55:14.000000000 +0200</span><br />
<span style="color: #888822;">+++ udev.SlackBuild &nbsp; &nbsp;2009-07-15 06:08:30.000000000 +0200</span><br />
<span style="color: #440088;">@@ -21,9 +21,9 @@</span><br />
&nbsp;# &nbsp;ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br />
&nbsp;<br />
&nbsp;<br />
<span style="color: #991111;">-VERSION=$<span style="">&#123;</span>VERSION:-146<span style="">&#125;</span></span><br />
<span style="color: #00b000;">+VERSION=$<span style="">&#123;</span>VERSION:-141<span style="">&#125;</span></span><br />
&nbsp;ARCH=$<span style="">&#123;</span>ARCH:-i486<span style="">&#125;</span><br />
<span style="color: #991111;">-BUILD=$<span style="">&#123;</span>BUILD:-1<span style="">&#125;</span></span><br />
<span style="color: #00b000;">+BUILD=$<span style="">&#123;</span>BUILD:-3<span style="">&#125;</span></span><br />
&nbsp;<br />
&nbsp;NUMJOBS=$<span style="">&#123;</span>NUMJOBS:-&quot; -j7 &quot;<span style="">&#125;</span></div></div>
<p>Running udev.Slackbuild now soon brought another set of issues to my attention. The first being that the slackware patch for the rule generator breaks.<br />
Without looking too much at the script I simply manually patched it and created a new diff. Here it is:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=rule_generator.diff.gz" title="Downloaded 53 times">rule_generator.diff.gz</a> - Version 0.1 - SHA: cf73f104543ce989fd11b383c440405110e915a2</p>
<p>Running the slackbuild now gave me a new error:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">In <span style="color: #c20cb9; font-weight: bold;">file</span> included from extras<span style="color: #000000; font-weight: bold;">/</span>scsi_id<span style="color: #000000; font-weight: bold;">/</span>scsi_serial.c:<span style="color: #000000;">27</span>:<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>scsi<span style="color: #000000; font-weight: bold;">/</span>scsi.h:<span style="color: #000000;">145</span>: error: expected specifier-qualifier-list before <span style="color: #ff0000;">'u8'</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>scsi<span style="color: #000000; font-weight: bold;">/</span>scsi.h: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #ff0000;">'scsi_varlen_cdb_length'</span>:<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>scsi<span style="color: #000000; font-weight: bold;">/</span>scsi.h:<span style="color: #000000;">156</span>: error: <span style="color: #ff0000;">'struct scsi_varlen_cdb_hdr'</span> has no member named <span style="color: #ff0000;">'additional_cdb_length'</span><br />
<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>extras<span style="color: #000000; font-weight: bold;">/</span>scsi_id<span style="color: #000000; font-weight: bold;">/</span>scsi_serial.o<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span><br />
<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> Waiting <span style="color: #000000; font-weight: bold;">for</span> unfinished jobs....<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</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>all-recursive<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span><br />
<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>all<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></div></div>
<p>It never takes me long to realize that this error stems from the new kernel I installed earlier. (did I mention that <a href="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2">linux 2.6.31</a> is released? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br />
Google brought me <a href="http://patchwork.kernel.org/patch/38102/">this</a>, which informs us about something that should have been in 2.6.31 if you ask me. Fine, we&#8217;ll fix it ourselves.<br />
Another slackbuild run takes us past this error and gives us a new udev package. Inspecting the new package I noticed a <span style="color:#F00FFF">/libexec</span> directory that shouldn&#8217;t be in the root of the package. Meh, probably explains the <code class="codecolorer text vibrant"><span class="text">configure: WARNING: unrecognized options: --with-libdir-name</span></code>.<br />
So we change the <span style="color:#F00FFF">udev.Slackbuild</span> again with some new configure options (stolen from their own INSTALL file):</p>
<div class="codecolorer-container diff vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #888822;">--- udev.SlackBuild.org &nbsp; &nbsp;2009-07-15 06:08:30.000000000 +0200</span><br />
<span style="color: #888822;">+++ udev.SlackBuild &nbsp; &nbsp; 2009-09-11 16:07:19.000000000 +0200</span><br />
<span style="color: #440088;">@@ -55,9 +55,12 @@</span><br />
&nbsp;./configure \<br />
&nbsp; &nbsp;--prefix=/usr \<br />
&nbsp; &nbsp;--exec-prefix=/ \<br />
<span style="color: #00b000;">+ &nbsp;--sbindir=/sbin \</span><br />
<span style="color: #00b000;">+ &nbsp;--libdir=/lib$<span style="">&#123;</span>LIBDIRSUFFIX<span style="">&#125;</span> \</span><br />
<span style="color: #00b000;">+ &nbsp;--with-rootlibdir=/lib$<span style="">&#123;</span>LIBDIRSUFFIX<span style="">&#125;</span> \</span><br />
&nbsp; &nbsp;--sysconfdir=/etc \<br />
&nbsp; &nbsp;--mandir=/usr/man \<br />
<span style="color: #991111;">- &nbsp;--with-libdir-name=lib$<span style="">&#123;</span>LIBDIRSUFFIX<span style="">&#125;</span> \</span><br />
<span style="color: #00b000;">+ &nbsp;--libexecdir=/lib/udev \</span><br />
&nbsp; &nbsp;--build=$ARCH-slackware-linux<br />
&nbsp;<br />
&nbsp;make $NUMJOBS || make || exit <span style="">1</span></div></div>
<p>Btw, can someone explain to me why I always manage to fuck up the file order to diff? (my patches normally come out reversed <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )<br />
Here&#8217;s the complete file if you want it:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=udev.SlackBuild" title="Downloaded 97 times">udev.Slackbuild</a> - Version 1.4.6 - SHA: d550e146bdf34d1ad0e256936a94b7f9b7d62fd2</p>
<p>So after building and upgrading the package, it even restarted without glitches. Woei.<br />
Back to pulseaudio!</p>
<p>Running configure now correctly informs us about udev being YES. HAL->udev compat still said &#8220;no&#8221; though. I don&#8217;t care for now, let&#8217;s see if it works.<br />
My slackbuild.pl ran the make part and showed a ton of &#8220;leer coden, mongool&#8221; warnings (people should simply disable warnings if they don&#8217;t handle them if you ask me).<br />
Regardless of the warnings the compilation completed and I now have a shiny new package.<br />
After upgrading and restarting pulseaudio, there&#8217;s even sound coming out of my speakers when I hinted mpd to play. Woei.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/pulseaudio-slackware-and-udev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boost, qBitTorrent and lib64</title>
		<link>http://notes.benv.junerules.com/all/software/boost-qbittorrent-and-lib64/</link>
		<comments>http://notes.benv.junerules.com/all/software/boost-qbittorrent-and-lib64/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 16:13:06 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=354</guid>
		<description><![CDATA[After toying around a bit on the news sites I decided it would be interesting to see if qBitTorrent would run on slackware 64. So we go to the download site, copy the url, and see if Slackbuild likes it. Slackbuild leeches, untars, gives the configure options (which are a bit buggy, I know, will [...]]]></description>
			<content:encoded><![CDATA[<p>After toying around a bit on the news sites I decided it would be interesting to see if <a href="http://qbittorrent.sourceforge.net">qBitTorrent</a> would run on slackware 64.<br />
So we go to the download site, copy the url, and see if Slackbuild likes it. Slackbuild leeches, untars, gives the configure options (which are a bit buggy, I know, will be fixed next release), runs configure. Configure crashes out with &#8220;blabla boost blabla&#8221;.<span id="more-354"></span></p>
<p>Oh. <span style="color:#FF0000">Boost</span>&#8230;.. that time of the month. If there&#8217;s one piece of trash I&#8217;ve run into very often on my compilation expeditions&#8230;. it&#8217;s boost. What a cancer piece of trash that is. You wouldn&#8217;t believe the amount of cursing I&#8217;ve gone through on my trails through &#8220;build from source&#8221; land because of boost. It never works, and when it does it&#8217;s limping on. They should have called it &#8220;blast&#8221; instead.<br />
These days boost is in the official slackware repositories. You&#8217;d think that would help, since I can&#8217;t mess up the paths etc anymore. (compiling boost is another disaster btw, don&#8217;t go there unless you like torture). But noo, as usual the programs that use boost (&#8220;because we can&#8217;t code &#8482;&#8221;, or at least, that&#8217;s what I think) are so good at coding stuff themselves that they fail the autoconf for it as well. Prutsers. Well, to be honest, if they can&#8217;t code it themselves it&#8217;s probably smart to use a library that handles it for them&#8230;.. but boost? :/</p>
<p>Anyway, back to qBitTorrent. Actually, it&#8217;s <span style="color:#FF00FF">libtorrent-rasterbar</span> that&#8217;s failing. Attempt 1, configure with only a prefix and no other options:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~<span style="color: #000000; font-weight: bold;">/</span>tmp$ <span style="color: #666666; font-style: italic;"># ./configure --prefix=/usr</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>blabla<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
checking whether the Boost::System library is available... <span style="color: #c20cb9; font-weight: bold;">yes</span><br />
configure: error: unable to <span style="color: #c20cb9; font-weight: bold;">find</span> Boost.System library, currently this is required.</div></div>
<p>WHat?! Do you ahve Boost::System? Yes. I mean no!<br />
&#8230; seriously, who comes up with this shit&#8230;.<br />
So we dig into config.log and find:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">configure:<span style="color: #000000;">21533</span>: checking whether the Boost::System library is available<br />
configure:<span style="color: #000000;">21567</span>: <span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #660033;">-c</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-O2</span> &nbsp;-I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include conftest.cpp <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">5</span><br />
configure:<span style="color: #000000;">21574</span>: <span style="color: #007800;">$?</span> = <span style="color: #000000;">0</span><br />
configure:<span style="color: #000000;">21597</span>: result: <span style="color: #c20cb9; font-weight: bold;">yes</span><br />
configure:<span style="color: #000000;">21865</span>: error: unable to <span style="color: #c20cb9; font-weight: bold;">find</span> Boost.System library, currently this is required.</div></div>
<p>Or in other words: nothing we didn&#8217;t already know. FUCK.<br />
Time for a trace.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~<span style="color: #000000; font-weight: bold;">/</span>tmp$ <span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #660033;">-x</span> .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-ssl</span> <span style="color: #660033;">--with-boost-system</span>=boost_system <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">less</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> shift-g, <span style="color: #7a0874; font-weight: bold;">wait</span>, search <span style="color: #000000; font-weight: bold;">for</span> Boost::System <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
++ <span style="color: #7a0874; font-weight: bold;">echo</span> -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/[^\/]*//'</span><br />
+ <span style="color: #007800;">BOOSTLIBDIR</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<br />
+ <span style="color: #007800;">LDFLAGS_SAVE</span>=<span style="color: #ff0000;">' -L/usr/lib'</span><br />
+ <span style="color: #7a0874; font-weight: bold;">test</span> x = x<br />
++ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #ff0000;">'/usr/lib/libboost_system*.so*'</span> <span style="color: #ff0000;">'/usr/lib/libboost_system*.a*'</span><br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s,.*/,,'</span><br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s;^lib\(boost_system.*\)\.so.*$;\1;'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s;^lib\(boost_system.*\)\.a*$;\1;'</span><br />
+ <span style="color: #7a0874; font-weight: bold;">test</span> x <span style="color: #ff0000;">'!='</span> xyes<br />
++ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #ff0000;">'/usr/lib/boost_system*.dll*'</span> <span style="color: #ff0000;">'/usr/lib/boost_system*.a*'</span><br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s,.*/,,'</span><br />
++ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s;^\(boost_system.*\)\.dll.*$;\1;'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s;^\(boost_system.*\)\.a*$;\1;'</span><br />
+ <span style="color: #7a0874; font-weight: bold;">test</span> x = xno<br />
+ <span style="color: #007800;">CPPFLAGS</span>=<br />
+ <span style="color: #007800;">LDFLAGS</span>=<br />
+ <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">''</span><br />
+ <span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">'%s\n'</span> <span style="color: #ff0000;">'configure:21865: error: unable to find Boost.System library, currently this is required.'</span><br />
+ <span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">'%s\n'</span> <span style="color: #ff0000;">'configure: error: unable to find Boost.System library, currently this is required.'</span><br />
configure: error: unable to <span style="color: #c20cb9; font-weight: bold;">find</span> Boost.System library, currently this is required.</div></div>
<p>&#8230;. <span style="color:#FFFF00">/usr/lib</span>? Says who? Not me, that&#8217;s for sure. idiots.<br />
In fact, I&#8217;m quite sure that it&#8217;s in <span style="color:#FFFF00">/usr/lib64</span>.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~<span style="color: #000000; font-weight: bold;">/</span>tmp$ &nbsp;<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-la</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libboost_filesyste<span style="color: #000000; font-weight: bold;">*</span> <br />
<span style="color: #660033;">-rwxr-xr-x</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">83368</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">25</span> 04:<span style="color: #000000;">31</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libboost_filesystem-mt.so<span style="color: #000000; font-weight: bold;">*</span><br />
<span style="color: #660033;">-rwxr-xr-x</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">83336</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">25</span> 04:<span style="color: #000000;">31</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libboost_filesystem.so<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>Jup, as expected. Boost is kanker. Since boost doesn&#8217;t have the usual pkgconfig issues, we can only conclude that the reason is that either this configure.in was written by a moron, or that<br />
boost supplies invalid tests for finding itself through the autoconf system. I suspect the latter, but that&#8217;s just me <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>In this case the solution is simple, since the configure script has an override option. Wonder why&#8230; maybe they ran into boost idiocies before? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
The solution:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~<span style="color: #000000; font-weight: bold;">/</span>tmp$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-boost-libdir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64</div></div>
<p>This runs through configure, it finds the boost garbage and runs through. And guess what? It even compiles! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The gist of this rant: autoconf is pretty useless if you make assumptions that autoconf is supposed to detect. If you write software, don&#8217;t assume this stuff, try to detect it.<br />
Also: when it fails, give me an error message that is useful, not some generic error code. &#8220;Library not found&#8221; vs &#8220;library not found because libblabla.so doesn&#8217;t exist in /usr/lib&#8221;.</p>
<p>About qbittorrent: it&#8217;s a cute little torrent client for linux. Especially if you like faily lightweight stuff that does has a gui. The thing I like about those lightweight clients: they&#8217;re fast.<br />
This one even has an RSS reader these days&#8230;. cute.<br />
Here&#8217;s a screenie:<br />
<div id="attachment_355" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/09/qbittorrent-1.5.0.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/09/qbittorrent-1.5.0-300x184.png" alt="qbittorrent v1.5.0" title="qbittorrent-1.5.0" width="300" height="184" class="size-medium wp-image-355" /></a><p class="wp-caption-text">qbittorrent v1.5.0</p></div></p>
<p>So qBittorrent: keep up the good work, and get rid of boost <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/boost-qbittorrent-and-lib64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New server, day 2. DomU and networking.</title>
		<link>http://notes.benv.junerules.com/all/software/new-server-day-2-domu-and-networking/</link>
		<comments>http://notes.benv.junerules.com/all/software/new-server-day-2-domu-and-networking/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 14:54:01 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[domU]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xm]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=293</guid>
		<description><![CDATA[Another day, another time for fun! Since we got Xen up and running yesterday, it&#8217;s now time for actually having some fun with it. The goals are: Getting xend started automagically when booting without destroying my network connection Getting a domU up and running with a network connection Getting an internal network between the domUs [...]]]></description>
			<content:encoded><![CDATA[<p>Another day, another time for fun!</p>
<p>Since we got Xen up and running yesterday, it&#8217;s now time for actually having some fun with it.<br />
The goals are:</p>
<ol>
<li>Getting xend started automagically when booting without destroying my network connection</li>
<li>Getting a domU up and running with a network connection</li>
<li>Getting an internal network between the domUs and dom0, shielded from the big bad internet.</li>
</ol>
<p><span id="more-293"></span></p>
<p>First things first, yesterday we got xen installed and all, but that&#8217;s about as far as we got before the bed was required. Xend almost got it right when it put a startup script in <span style="color:#FF00FF">/etc/rc.d/init.d</span> called &#8216;xend&#8217;, but alas, slackware will ignore that file. Personally I simply add the thing to <span style="color:#00FFFF">/etc/rc.d/rc.local</span>:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting xend...&quot;</span><br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>xend start</div></div>
<p>This fixes issue #1, but only the first part.</p>
<p>Before you reboot you might want to alter some xend settings. The file to molest for this is <span style="color:#FFFF00">/etc/xend/xend-config.sxp</span>. Mine looks a bit like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># grep -ve '#' -e '^$' /etc/xen/xend-config.sxp</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>logfile <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>xend.log<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>loglevel DEBUG<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xen-api-server <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>unix<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-unix-xmlrpc-server <span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-relocation-server <span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-unix-path <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>xend<span style="color: #000000; font-weight: bold;">/</span>xend-socket<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-address localhost<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>xend-relocation-hosts-allow <span style="color: #ff0000;">'^localhost$ ^localhost\\.localdomain$'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>network-script <span style="color: #ff0000;">'bridge-wrapper-benv netdev=eth0 bridge=xenbr0'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>vif-script vif-bridge<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>dom0-min-mem <span style="color: #000000;">196</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>enable-dom0-ballooning <span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>dom0-cpus <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>vncpasswd <span style="color: #ff0000;">''</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Almost everything is set to the default value. However, you will want to pay attention to the <span style="color:#FFFF00">network-script</span> part at the very least. As you can see I changed this to a little wrapper script.<br />
I won&#8217;t go into detail about all the possible Xen networking stuff, see the mailing list and the Xen docs for that, but what we want is the external network bridged to all domU&#8217;s, so they can have their own network space there and their external IP address and whatever they want to do without having to mess around in the dom0. To get this working you could stick to the default <code class="codecolorer text vibrant"><span class="text">(network-script network-bridge)</span></code>. Back in the Xen 3.0.3 days this molested my default gateway because their bridge script sucked (it failed to parse some stuff if I remember correctly), but when I tested it today it simply worked.</p>
<p>We want to have an internal network though, so we have to create our own bridge wrapper script.The only thing this script wrapper does is<br />
1. call the network bridge script as the default would do.<br />
2. create a second xen bridge.<br />
Here we go:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>network-bridge <span style="color: #ff0000;">&quot;$@&quot;</span><br />
<br />
<span style="color: #007800;">bridge</span>=xenbr1<br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<br />
<span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">echo</span> Creating internal bridge <span style="color: #800000;">${bridge}</span>....<br />
&nbsp; &nbsp;brctl addbr <span style="color: #800000;">${bridge}</span><br />
&nbsp; &nbsp;brctl stp <span style="color: #800000;">${bridge}</span> off<br />
&nbsp; &nbsp;brctl setfd <span style="color: #800000;">${bridge}</span> <span style="color: #000000;">0</span><br />
&nbsp; &nbsp;ip <span style="color: #c20cb9; font-weight: bold;">link</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${bridge}</span> up &nbsp;<br />
<br />
&nbsp; &nbsp;<span style="color: #c20cb9; font-weight: bold;">ifconfig</span> <span style="color: #800000;">${bridge}</span> up &nbsp;10.0.0.1 netmask 255.255.255.0<br />
<span style="color: #000000; font-weight: bold;">fi</span></div></div>
<p>As you can see I also add an internal IP address to the bridge. You can make this bridge setup script as complex or as neat as you want, but I can&#8217;t be bothered to spend more time on it. It works for me &#8482; <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Now that all that is in place, let&#8217;s try out the creation of a domU. For testing purposes I steal my images from what used to be jailtime.org, these days it&#8217;s called <a href="http://stacklet.com/">Stacklet</a>. Too bad they don&#8217;t have a 64 bit slackware domU yet, but I guess I&#8217;ll create that myself a little later. Also, to keep stuff in a place where I can track it, I usually create a /xen directory where I store my host configurations and images.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># mkdir -p &nbsp;/xen/hosts/slackware12.2</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># cd /xen/hosts/slackware12.2</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>slackware12.2<span style="color: #666666; font-style: italic;"># wget http://stacklet.com/sites/default/files/slackware/slackware.12-2.x86.20090509.img.tar.bz2</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> ... <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>xenbro:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>slackware12.2<span style="color: #666666; font-style: italic;"># tar jxvf slackware.12-2.x86.20090509.img.tar.bz2</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">*</span>kaboom<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>Edit the slackware.12-2.x86.xen3.cfg file and fix the location of the image file and the kernel. I simply used the same kernel that I use to boot my dom0 for now. Now let&#8217;s try it! Try</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">xm create <span style="color: #660033;">-c</span> slackware.12-<span style="color: #000000;">2</span>.x86.xen3.cfg</div></div>
<p>and it should enter the console of the now booting domU. To get out of the console hit <span style="color:#FFFF00">CTRL-[</span>.</p>
<p>Over here I got a bunch of kernel warnings like these:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> ------------<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> here <span style="color: #7a0874; font-weight: bold;">&#93;</span>------------ <br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> WARNING: at drivers<span style="color: #000000; font-weight: bold;">/</span>firmware<span style="color: #000000; font-weight: bold;">/</span>dmi_scan.c:<span style="color: #000000;">425</span> dmi_matches+0x81<span style="color: #000000; font-weight: bold;">/</span>0x90<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> dmi check: not initialized yet. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Modules linked <span style="color: #000000; font-weight: bold;">in</span>: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Pid: <span style="color: #000000;">0</span>, <span style="color: #c20cb9; font-weight: bold;">comm</span>: swapper Not tainted 2.6.29.6-BenV <span style="color: #666666; font-style: italic;">#3</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Call Trace: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff802352aa<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> warn_slowpath+0xea<span style="color: #000000; font-weight: bold;">/</span>0x160<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff8078bfd4<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> printk+0x4e<span style="color: #000000; font-weight: bold;">/</span>0x56 &nbsp; &nbsp; &nbsp; &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a9b625<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> phys_pud_init+0x150<span style="color: #000000; font-weight: bold;">/</span>0x42b<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a77418<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> reserve_early+0x13<span style="color: #000000; font-weight: bold;">/</span>0x28 &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80771929<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> init_memory_mapping+0x559<span style="color: #000000; font-weight: bold;">/</span>0xd40<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff8063e671<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> dmi_matches+0x81<span style="color: #000000; font-weight: bold;">/</span>0x90 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff8063e6f0<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> dmi_check_system+0x20<span style="color: #000000; font-weight: bold;">/</span>0x60<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a7554a<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> setup_arch+0x2aa<span style="color: #000000; font-weight: bold;">/</span>0xf19 &nbsp; &nbsp;<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a6e7ac<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> start_kernel+0x81<span style="color: #000000; font-weight: bold;">/</span>0x483<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> &nbsp;<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>ffffffff80a6e1bd<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> x86_64_start_kernel+0xa9<span style="color: #000000; font-weight: bold;">/</span>0xbf<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span> &nbsp; &nbsp;<span style="color: #000000;">0.000000</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> ---<span style="color: #7a0874; font-weight: bold;">&#91;</span> end trace 4eaa2a86a8e2da22 <span style="color: #7a0874; font-weight: bold;">&#93;</span>---</div></div>
<p>While these are a nuisance in dmesg, they seem to be fairly harmless. Somewhere on the Xen mailing list someone claims that you can disable CONFIG_DMI in the kernel to get rid of these, which I tend to believe but can&#8217;t be bothered. If I&#8217;m going to build a new kernel for my domU, I will take the latest vanilla kernel and add Xen domU support in that. It&#8217;s a mainline kernel option these days, you can see my post about it here: <a href="http://notes.benv.junerules.com/software/xen-and-booting-domu-using-a-vanilla-kernel/">Xen and booting domU using a vanilla kernel</a><br />
Login on the domU using root/password, note that your networking actually works, but you still have to enter an IP for eth1 if you want the internal network.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>darkstar:~<span style="color: #666666; font-style: italic;"># ifconfig eth1 10.0.0.2/24</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>darkstar:~<span style="color: #666666; font-style: italic;"># ping 10.0.0.1</span><br />
PING 10.0.0.1 <span style="color: #7a0874; font-weight: bold;">&#40;</span>10.0.0.1<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">56</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">84</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> bytes of data.<br />
<span style="color: #000000;">64</span> bytes from 10.0.0.1: <span style="color: #007800;">icmp_seq</span>=<span style="color: #000000;">1</span> <span style="color: #007800;">ttl</span>=<span style="color: #000000;">64</span> <span style="color: #007800;">time</span>=<span style="color: #000000;">0.770</span> ms<br />
<span style="color: #000000;">64</span> bytes from 10.0.0.1: <span style="color: #007800;">icmp_seq</span>=<span style="color: #000000;">2</span> <span style="color: #007800;">ttl</span>=<span style="color: #000000;">64</span> <span style="color: #007800;">time</span>=<span style="color: #000000;">0.192</span> ms<br />
<span style="color: #000000;">64</span> bytes from 10.0.0.1: <span style="color: #007800;">icmp_seq</span>=<span style="color: #000000;">3</span> <span style="color: #007800;">ttl</span>=<span style="color: #000000;">64</span> <span style="color: #007800;">time</span>=<span style="color: #000000;">0.187</span> ms</div></div>
<p>Woohoo, it works! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For an overview of the currently running domains you can use</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>xenbro:~<span style="color: #666666; font-style: italic;"># xm list</span><br />
Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ID &nbsp; Mem VCPUs &nbsp; &nbsp; &nbsp;State &nbsp; Time<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Domain-<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> &nbsp;<span style="color: #000000;">7447</span> &nbsp; &nbsp; <span style="color: #000000;">4</span> &nbsp; &nbsp; r----- &nbsp; &nbsp; <span style="color: #000000;">16.0</span><br />
test1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">1</span> &nbsp; <span style="color: #000000;">512</span> &nbsp; &nbsp; <span style="color: #000000;">1</span> &nbsp; &nbsp; <span style="color: #660033;">-b----</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">5.9</span></div></div>
<p>The <span style="color:#00FFFF">xm</span> command has a ton of useful things, so check out the manpage/help for it.</p>
<p>For my real domU I will be using LVM partitions and install slackware 64 on it, but that&#8217;s fairly trivial to figure out once you&#8217;re this far. So have fun with your Xen install ^^</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/new-server-day-2-domu-and-networking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secret Maryo Chronicles</title>
		<link>http://notes.benv.junerules.com/all/daily/secret-maryo-chronicles/</link>
		<comments>http://notes.benv.junerules.com/all/daily/secret-maryo-chronicles/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 22:13:35 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Boring]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[emulators]]></category>
		<category><![CDATA[gamepad]]></category>
		<category><![CDATA[mario]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=261</guid>
		<description><![CDATA[So I was bored and went through the usual slashdot, kernel.org, freshmeat.net, etc. Once reading through the news on happypenguin.org I noticed it must be mario season or something. After checking the descriptions I decided to check out Super Mario^W^WSecret Maryo Chronicles. Needless to say I went for the source ball. Through my famous slackbuild [...]]]></description>
			<content:encoded><![CDATA[<p>So I was bored and went through the usual slashdot, kernel.org, freshmeat.net, etc.<br />
Once reading through the news on happypenguin.org I noticed it must be mario season or something.<br />
After checking the descriptions I decided to check out <a href="http://secretmaryo.org/" title="Secret Maryo Chronicles">Super Mario^W^WSecret Maryo Chronicles</a>.<br />
<span id="more-261"></span></p>
<p>Needless to say I went for the source ball. Through my famous <span style="color:#00FFFF">slackbuild script</span> of course!<br />
That went fine, until configure barfed about some <a href="http://www.cegui.org.uk/wiki/index.php/Main_Page">CEGUI</a> thing.<br />
<span style="color:#FF00FF">What&#8217;s a CEGUI thing?</span><br />
Apparently it&#8217;s some kind of windowing/widget library. Yeah, another one.<br />
So I ram it through slackbuild, which went fine as usual after I did a <code class="codecolorer text vibrant"><span class="text">make distclean</span></code> in the source dir. Some how the first build fucked up, don&#8217;t ask me why.<br />
Anyhow, I installed the <span style="color:#FF00FF">CEGUI</span> package and ran back to the smc source dir.<br />
Slackbuild had no other issues this time so out rolled a package. After installation I tried to run it.</p>
<p>Here&#8217;s what it said after my screen went black for about a second and came back:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:~:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&gt;</span>smc<br />
CEGUI Scheme Exception occurred : Imageset::xmlHandler::startElement - An unexpected error occurred <span style="color: #000000; font-weight: bold;">while</span> creating a Texture object from <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">'SMCLook512.png'</span></div></div>
<p>Yeah, that&#8217;s what I get for trusting yet another crap library with widgets. *<span style="color:#FF0033">sigh</span>*</p>
<p>However, I had just enough energy left to try one detour into bug/issue fixing land.<br />
Google came up with basically only 1 thing, so after trying my best to read some italian forum I trashed it back through google&#8217;s own translation service.<br />
Now that it was in dutch it was a bit more readable, it hinted about using the <span style="color:#00FF55">freeimage</span> library instead of the default TGA codec (which obviously failed).</p>
<p>Installing the <a href="http://freeimage.sourceforge.net/">freeimage library</a> was pretty trivial, although they don&#8217;t use autoconf so I had to go through their Makefiles manually.<br />
The first hint of trouble is usually when source packages come delivered in the famous <span style="color:#FF5500">.zip</span> format. Oh, sorry, I meant <b>.ZIP-EVERYTHING_IS_CAPS</b> format. Seriously, don&#8217;t get me started on how many times those kankerthings exploded in my /usr/src dir so far, completely splattering up everything there.<br />
Good thing I&#8217;m good with rm. Anyhow, this zip package was decent and created a dir (without version number though).<br />
After fiddling with the makefiles and building freeimage, I also build <span style="color:#FF5533">freeimage plus</span> and stashed it into a package with makepkg.<br />
Phew, sweat on my forehead. Hopefully slackbuild will be able to handle this some day&#8230;.. (dream on)</p>
<p>Back to <span style="color:#FF0000">CEGUI</span> &#8212; compiling it with the freeimage library went without problems, and after upgrading my previous CEGUI package it was finally time to retry SMC.<br />
By the way, did I note that all these packages compiled on x86_64? Good job on that one guys <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This time the screen actually came up with some mario^H^Hyo like stuff! Just like the good old days with the <span style="color:#5500FF">SNES</span>! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
It looked a bit like this:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/1.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/1-300x187.png" alt="1" title="1" width="300" height="187" class="aligncenter size-medium wp-image-262" /></a><br />
On the background the theme music played that reminded me quite a bit of the original snes game.</p>
<p>Messing around with it a bit I quickly got myself killed a few times and had some fun.<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/2.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/2-300x187.png" alt="Super Maryo Chronicles (2)" title="Super Maryo Chronicles (2)" width="300" height="187" class="aligncenter size-medium wp-image-263" /></a></p>
<p>I soon realized that the SNES version had better controls, but then again&#8230; playing on a keyboard is kinda cramped for platform games.<br />
So I reconnected my Logitech Rumblepad 2 to see if it would work. Well, if works great <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Not a snes pad (the thing is a lot like the original playstation controller), but it played a hell of a lot better.</p>
<p><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/3.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/3-300x187.png" alt="Super Maryo Chronicles (3)" title="Super Maryo Chronicles (3)" width="300" height="187" class="aligncenter size-medium wp-image-264" /></a></p>
<p>Conclusion: if you&#8217;re feeling bored, give it a shot. Good for a bit of fun, and it has a level editor as well!<br />
(which can be seen in this impressive edit I made here <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/08/4.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/08/4-300x187.png" alt="Super Maryo Chronicles (level edit)" title="Super Maryo Chronicles (level edit)" width="300" height="187" class="aligncenter size-medium wp-image-265" /></a></p>
<p>Keep up the good work, <a href="http://secretmaryo.org/index.php?page=contact&#038;sid=?sid=">guys from SMC</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/daily/secret-maryo-chronicles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDF printing and Cups (The Cups Drama &#8482; Part 2!)</title>
		<link>http://notes.benv.junerules.com/all/software/pdf-printing-and-cups-the-cups-drama-tm-part-2/</link>
		<comments>http://notes.benv.junerules.com/all/software/pdf-printing-and-cups-the-cups-drama-tm-part-2/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 14:01:54 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[xpdf]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=243</guid>
		<description><![CDATA[Here we are today, trying to do a very simple thing. Print a stupid little PDF document so our customers can pay their bills. Easy huh? Especially after the previous cups drama? So we fire up xpdf on the document, hit the print icon, lpr, GO! *time passes* Mhm, what is it now? *check http://localhost:631* [...]]]></description>
			<content:encoded><![CDATA[<p>Here we are today, trying to do a very simple thing. Print a stupid little PDF document so our customers can pay their bills.<br />
Easy huh? Especially after the <a href="http://notes.benv.junerules.com/software/printing-and-cups/" title="Printing and Cups">previous cups drama</a>?</p>
<p>So we fire up xpdf on the document, hit the print icon, lpr, GO!<br />
*time passes*<br />
Mhm, what is it now?<br />
*check <span style="color:#F00F00">http://localhost:631</span>*<br />
Nope, no document there, seems like it was handled by the printer.<br />
*check cups <span style="color:#F000F0">error_log</span>*<br />
Heaps of garbage there. </p>
<p>Remember that we had this issue left in our previous cups story? Something about PDF printing causing issues?<span id="more-243"></span><br />
Well, since then cups got upgraded to version 1.3.11 and some other stuff too, like ghostscript.<br />
This time the error log showed something like this (only the relevant part here):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">49</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> backendRunLoop<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">print_fd</span>=<span style="color: #000000;">0</span>, <span style="color: #007800;">device_fd</span>=<span style="color: #000000;">5</span>, <span style="color: #007800;">use_bc</span>=<span style="color: #000000;">0</span>, <span style="color: #007800;">side_cb</span>=0x804a23f<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">49</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Wrote <span style="color: #000000;">1</span> pages...<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">49</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> PID <span style="color: #000000;">26288</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cups<span style="color: #000000; font-weight: bold;">/</span>filter<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">pstops</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> exited with no errors.<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Error: error occurred at print phase <span style="color: #000000; font-weight: bold;">!!</span><br />
E <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> No pages found<span style="color: #000000; font-weight: bold;">!</span><br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> Discarding unused printer-state-changed event...<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> Discarding unused job-progress event...<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> GPL Ghostscript <span style="color: #000000;">8.70</span>: Unrecoverable error, <span style="color: #7a0874; font-weight: bold;">exit</span> code <span style="color: #000000;">1</span><br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">cat</span>: <span style="color: #c20cb9; font-weight: bold;">write</span> error: Broken pipe<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> PID <span style="color: #000000;">26289</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cups<span style="color: #000000; font-weight: bold;">/</span>filter<span style="color: #000000; font-weight: bold;">/</span>brlpdwrapperdcp135c<span style="color: #7a0874; font-weight: bold;">&#41;</span> exited with no errors.<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> PID <span style="color: #000000;">26299</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cups<span style="color: #000000; font-weight: bold;">/</span>backend<span style="color: #000000; font-weight: bold;">/</span>usb<span style="color: #7a0874; font-weight: bold;">&#41;</span> exited with no errors.<br />
D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> File <span style="color: #000000;">0</span> is complete.<br />
I <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">14</span>:<span style="color: #000000;">19</span>:<span style="color: #000000;">50</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">652</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Completed successfully.</div></div>
<p>Some weird definition of &#8216;successfully&#8217; you have there, cups.<br />
After a few hours of debugging through that error_log, fucking with filters in /usr/share/cups/filters (cursing at Brother for their half baked wrapper scripts), turning on and off debug and log options<br />
I was getting more and more annoyed with it. Considering on how to pick up the Brother DCP-135C and smashing it through the 2nd story window onto the pavement, but then not being<br />
sure if it really was the brother&#8217;s fault at all, I decided to make sure once and for all which one I had to throw through the window.</p>
<p>Time for a manual debug session with the filters again. If you are having trouble with stuff like this, I can commend it to you. The steps I took (after the usual turning on debug and log options etc):</p>
<ol>
<li>Grab your input file, in my case some PDF document which I ran through xpdf.</li>
<li>Instead of sending it to the printer, print using the &#8220;save to file&#8221; option so we have the source that cups has to deal with to work with.</li>
<li>Manually run this file through the filters as cups does. I curse on cups for not being more specific &#8212; EVEN WITH THE <code class="codecolorer bash vibrant"><span class="bash">LogLevel debug2</span></code> OPTION TURNED ON (it just becomes MORE unreadable, but without more information) &#8212; about how it runs these filters, but there are some shell scripts floating around that you can use. What I did was just use
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">strace</span> <span style="color: #660033;">-qfve</span> execve <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">pidof</span> cupsd<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #660033;">-s</span> <span style="color: #000000;">250</span></div></div>
<p>to figure out how my filters were called, but be ready to read tons of output on that one <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Anyhow, to save you some trouble, the call syntax seems to be</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">filterprogram PRINTER JobNum User title copies documentoptions <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>or a real example from my test case:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cups<span style="color: #000000; font-weight: bold;">/</span>filter<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">pstops</span> <span style="color: #ff0000;">&quot;DCP135C&quot;</span> <span style="color: #000000;">666</span> benv jemoeder <span style="color: #000000;">1</span> <span style="color: #ff0000;">&quot;document-name=4a93e8d852a17 number-up=1 job-uuid=urn:uuid:873e2907-cf50-35e2-5626-741377b394be&quot;</span> <span style="color: #ff0000;">&quot;/var/spool/cups/d00666-001&quot;</span></div></div>
</li>
<li>Find out which part fails. The pstops had some output that looked fine by me, as far as I can read postscript as it scrolls through my terminal.</li>
</ol>
<p>Funny thing is&#8230;. it seemed to me like pstops worked fine, as did the brother cups wrapper&#8230;.<br />
However, there was still this soab left:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">D <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000; font-weight: bold;">/</span>Aug<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2009</span>:<span style="color: #000000;">15</span>:<span style="color: #000000;">48</span>:<span style="color: #000000;">21</span> +0200<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Job <span style="color: #000000;">667</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> GPL Ghostscript <span style="color: #000000;">8.70</span>: Unrecoverable error, <span style="color: #7a0874; font-weight: bold;">exit</span> code <span style="color: #000000;">1</span></div></div>
<p>Execution of /usr/bin/gs showed up in strace as well btw, don&#8217;t worry <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
So now the big question was: when did ghostscript become retarded?</p>
<p>I took my &#8220;print to file&#8221; postscript document, and tried opening it in ghostview.<br />
It just looked at me like a cow looks at an oncoming train. Or in its own words:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Error: <span style="color: #000000; font-weight: bold;">/</span>undefined <span style="color: #000000; font-weight: bold;">in</span> ilQ2-amMq3gmMqGPL Ghostscript <span style="color: #000000;">8.70</span>: Unrecoverable error, <span style="color: #7a0874; font-weight: bold;">exit</span> code <span style="color: #000000;">1</span><br />
<br />
Operand stack:<br />
<br />
Execution stack:<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">%</span>interp_exit &nbsp; .runexec2 &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #000000;">2</span> &nbsp; <span style="color: #000000; font-weight: bold;">%</span>stopped_push &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #c20cb9; font-weight: bold;">false</span> &nbsp; <span style="color: #000000;">1</span> &nbsp; <span style="color: #000000; font-weight: bold;">%</span>stopped_push &nbsp; <span style="color: #000000;">1862</span> &nbsp; <span style="color: #000000;">1</span> &nbsp; <span style="color: #000000;">3</span> &nbsp; <span style="color: #000000; font-weight: bold;">%</span>oparray_pop &nbsp; <span style="color: #000000;">1861</span> &nbsp; <span style="color: #000000;">1</span> &nbsp; <span style="color: #000000;">3</span> &nbsp; <span style="color: #000000; font-weight: bold;">%</span>oparray_pop &nbsp; <span style="color: #000000;">1845</span> &nbsp; <span style="color: #000000;">1</span> &nbsp; <span style="color: #000000;">3</span> &nbsp; <span style="color: #000000; font-weight: bold;">%</span>oparray_pop &nbsp; <span style="color: #000000;">1739</span> &nbsp; <span style="color: #000000;">1</span> &nbsp; <span style="color: #000000;">3</span> &nbsp; <span style="color: #000000; font-weight: bold;">%</span>oparray_pop &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #000000; font-weight: bold;">%</span>errorexec_pop &nbsp; .runexec2 &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #660033;">--nostringval--</span> &nbsp; <span style="color: #000000;">2</span> &nbsp; <span style="color: #000000; font-weight: bold;">%</span>stopped_push &nbsp; <span style="color: #660033;">--nostringval--</span><br />
Dictionary stack:<br />
&nbsp; &nbsp;--dict:<span style="color: #000000;">1150</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1684</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>ro<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>G<span style="color: #7a0874; font-weight: bold;">&#41;</span>-- &nbsp; --dict:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">20</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>G<span style="color: #7a0874; font-weight: bold;">&#41;</span>-- &nbsp; --dict:<span style="color: #000000;">71</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">200</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>L<span style="color: #7a0874; font-weight: bold;">&#41;</span>-- &nbsp; --dict:<span style="color: #000000;">65</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">75</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>L<span style="color: #7a0874; font-weight: bold;">&#41;</span>-- &nbsp; --dict:<span style="color: #000000;">18</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">25</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>L<span style="color: #7a0874; font-weight: bold;">&#41;</span>--<br />
Current allocation mode is <span style="color: #7a0874; font-weight: bold;">local</span><br />
Last OS error: <span style="color: #000000;">11</span></div></div>
<p>Ah-HA!</p>
<p>&#8230;.</p>
<p>What?</p>
<p>Since I&#8217;m by no means an expert on postscript, I googled it. The search revealed that apparently this could be the result of an eps image conversion gone bad.<br />
Postscript doesn&#8217;t like to deal with binary data, so it&#8217;s not supposed to be there.<br />
<span style="color:#FFFF00">This can mean only one thing</span>!<br />
<span style="color:#FF0000">xpdf failed!!!!!!</span></p>
<p>Some testing revealed that xpdf on the old slackware32 chroot environment still does work, and printing the exact same PDF file there works fine, while printing that document from the 64 bit<br />
slackware envrionment fails with the above story. Fascinating. Seems like it isn&#8217;t a library issue though, unless it&#8217;s cleverly hidden in the X libraries. I hope they&#8217;ll fix this soon <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Just for reference, this is the <span style="color:#FF00FF">xpdf-3.02pl3-x86_64-1</span> package that fails.</p>
<p>Well, now that we all know the details we can go to bed.<br />
And if you need to print that pdf document: simply use <span style="color:#00FF00">pdf2ps</span>, it works. (and stay away from habbokrat reader)</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/pdf-printing-and-cups-the-cups-drama-tm-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing rrdtool 1.3 on slackware</title>
		<link>http://notes.benv.junerules.com/all/software/installing-rrdtool-1-3-on-slackware/</link>
		<comments>http://notes.benv.junerules.com/all/software/installing-rrdtool-1-3-on-slackware/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 16:04:46 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[rrdtool]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=234</guid>
		<description><![CDATA[This keeps bugging me. Configure fails to build rrdtool because xrender is referenced in the cairo.pc pkg-config file. However, it doesn&#8217;t need it at all. The doc/rrdbuild.txt describes this problem for Opensolaris, but it goes for Slackware as well. Solution: root@janeman# perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc Now it -will- run through configure. Thanks. (yeah [...]]]></description>
			<content:encoded><![CDATA[<p>This keeps bugging me.<br />
Configure fails to build rrdtool because xrender is referenced in the cairo.pc pkg-config file.<br />
However, it doesn&#8217;t need it at all. The doc/rrdbuild.txt describes this problem for Opensolaris, but it goes for Slackware as well.</p>
<p>Solution:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>janeman<span style="color: #666666; font-style: italic;"># perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc</span></div></div>
<p>Now it -will- run through configure. Thanks. (yeah yeah, it&#8217;s hidden in the docs somewhere).</p>
<p>*edit*<br />
This works for rrdtool 1.4 as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/installing-rrdtool-1-3-on-slackware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>configure/autoconf and paths</title>
		<link>http://notes.benv.junerules.com/all/software/configureautoconf-and-paths/</link>
		<comments>http://notes.benv.junerules.com/all/software/configureautoconf-and-paths/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 15:51:24 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[siteconfig]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=231</guid>
		<description><![CDATA[Of course you&#8217;re already thrilled by my slackbuild.pl script, but this one thing keeps popping up. &#8220;How do I get configure to get my system paths right without giving it a line that&#8217;s 2389472389 arguments long?&#8221; Simple, install a site config. &#8220;A what?!&#8221; It&#8217;s a tiny little shell script that takes the configure options and [...]]]></description>
			<content:encoded><![CDATA[<p>Of course you&#8217;re already thrilled by my slackbuild.pl script, but this one thing keeps popping up.<br />
&#8220;<span style="color:#00FF00">How do I get configure to get my system paths right without giving it a line that&#8217;s 2389472389 arguments long?</span>&#8221;<br />
Simple, install a site config.<br />
&#8220;<span style="color:#00FF00">A what?!</span>&#8221;</p>
<p>It&#8217;s a tiny little shell script that takes the configure options and barfs out some prefixes and stuff based on the options presented to it.<br />
So when I tell it <code class="codecolorer text vibrant"><span class="text">prefix=/usr</span></code>, it will decide that <code class="codecolorer text vibrant"><span class="text">sysconfdir=/etc</span></code> instead of <code class="codecolorer text vibrant"><span class="text">sysconfdir=/usr/etc</span></code>.</p>
<p>You can get my my version here:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=config.site" title="Downloaded 111 times">config.site</a> - Version 0.1 - SHA: </p>
<p>Now the important tidbit. In order for configure to automagically use this script, you wil need to set the environment variable <span style="color:#FF00FF">CONFIG_SITE</span>.<br />
Personally I do this through a profile file. Download the config.site script, put it in <span style="color:#FF4400">/etc</span> and put the profile file in <span style="color:#FF5511">/etc/profile.d</span>. Logout/login, done.<br />
Oh, here&#8217;s the profile file:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=config_site.sh" title="Downloaded 93 times">config_site.sh</a> - Version 0.1 - SHA: 3a6145987d03811f274ace34f5d08738f266f131</p>
<p>Now if everything worked out allright, running configure should start with something like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">benv<span style="color: #000000; font-weight: bold;">@</span>janeman:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>coolprogram-<span style="color: #000000;">1.0</span>$ .<span style="color: #000000; font-weight: bold;">/</span>configure<br />
configure: loading site script <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>config.site<br />
<span style="color: #007800;">prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<br />
<span style="color: #007800;">sysconfdir</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<br />
<span style="color: #007800;">bindir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<br />
<span style="color: #007800;">sbindir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<br />
<span style="color: #007800;">includedir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<br />
<span style="color: #007800;">libdir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<br />
<span style="color: #007800;">libexecdir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<br />
<span style="color: #007800;">datadir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<br />
<span style="color: #007800;">mandir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">man</span><br />
<span style="color: #007800;">infodir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>info<br />
<span style="color: #007800;">localstatedir</span>=<span style="color: #000000; font-weight: bold;">/</span>var<br />
<span style="color: #007800;">sharedstatedir</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<br />
<span style="color: #007800;">lispdir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>emacs<span style="color: #000000; font-weight: bold;">/</span>site-lisp</div></div>
<p>Wonderful isn&#8217;t it? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/configureautoconf-and-paths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xen and booting domU using a vanilla kernel</title>
		<link>http://notes.benv.junerules.com/all/software/xen-and-booting-domu-using-a-vanilla-kernel/</link>
		<comments>http://notes.benv.junerules.com/all/software/xen-and-booting-domu-using-a-vanilla-kernel/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 21:13:23 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xm]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=209</guid>
		<description><![CDATA[Our server in the datacenter is running slackware (duh) with a nice Xen installation on it. Still running with Xen 3 using PAE since the last time I updated/upgraded it without any major problems for over 2 years now (ignoring the time that the power supply let go of the the magic smoke) So after [...]]]></description>
			<content:encoded><![CDATA[<p>Our server in the datacenter is running slackware (duh) with a nice Xen installation on it.<br />
Still running with <a href="http://www.xen.org/">Xen 3</a> using PAE since the last time I updated/upgraded it without any major problems for over 2 years now <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
(ignoring the time that the power supply let go of the the magic smoke)</p>
<p>So after the latest local root exploit thing, and testing it on some machines during har2009, I figured it might be nice to get the <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e694958388c50148389b0e9b9e9e8945cf0f1b98">patch</a> into my kernels. Running a webserver usually means you&#8217;re at risk after all, especially when it&#8217;s running wordpress <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So I grabbed the latest kernel that had that patch and went for the usual <code class="codecolorer text vibrant"><span class="text">make menuconfig</span></code> ordeal. After half an hour of selecting &#8220;yes&#8221;, &#8220;maybe&#8221;, &#8220;I guess so&#8221;, and<br />
some XEN options (<span style="color: #FFFF00">CONFIG_PARAVIRT_GUEST=y, CONFIG_XEN=y, CONFIG_HVC_DRIVER=y, CONFIG_XEN_BLKDEV_FRONTEND=y, CONFIG_XEN_NETDEV_FRONTEND=y, CONFIG_XEN_KBDDEV_FRONTEND=y, CONFIG_HVC_XEN=y, CONFIG_XEN_BALLOON=y, CONFIG_XEN_SCRUB_PAGES=y, CONFIG_XENFS=y, CONFIG_XEN_COMPAT_XENFS=y</span>) I built the thing.<br />
As I usually build bzImages I also did so here. <code class="codecolorer text vibrant"><span class="text">make bzImage modules modules_install</span></code>.<br />
Half an hour later I had a shiny bzImage. Let&#8217;s try it on a test domain!</p>
<p>I copied the bzImage to /boot, changed the <code class="codecolorer text vibrant"><span class="text">kernel = &quot;/boot/vmlinuz-xen-old&quot;</span></code> option to the new place, and GO!<br />
This is what it told me:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>iejoor:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>purple<span style="color: #666666; font-style: italic;"># xm create -c purple.cfg-newkernel</span><br />
Using config <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;./purple.cfg-newkernel&quot;</span>.<br />
Started domain purple<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;root<span style="color: #000000; font-weight: bold;">@</span>iejoor:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>purple<span style="color: #666666; font-style: italic;">#</span></div></div>
<p>Huh, where&#8217;s my console?<br />
Checking <code class="codecolorer text vibrant"><span class="text">xm list</span></code> it seemed to be there&#8230; but paused&#8230; and with constantly increasing ids. Waaait a minute!<br />
Checking the log files (<span style="color: #00FF00">xend.log</span> in this case) revealed a secret:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices irq.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices vkbd.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices vfb.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices console.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:167) Waiting for 0.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices pci.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices ioports.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices tap.<br />
[2009-08-18 16:40:01 16116] DEBUG (DevController:162) Waiting for devices vtpm.<br />
[2009-08-18 16:40:01 16116] INFO (XendDomain:1165) Domain purple (35) unpaused.<br />
[2009-08-18 16:40:01 16116] WARNING (XendDomainInfo:1240) Domain has crashed: name=purple id=35.<br />
[2009-08-18 16:40:01 16116] DEBUG (XendDomainInfo:1879) XendDomainInfo.destroy: domid=35<br />
[2009-08-18 16:40:01 16116] DEBUG (XendDomainInfo:1896) XendDomainInfo.destroyDomain(35)</div></div>
<p>Note the &#8216;WARNING&#8217; line. Crashed?!<br />
Gee, that&#8217;s &#8230; interesting. Why? Took me 5 minutes to find the other log file, but <span style="color: #FF0000">xend-debug.log</span> had a magic line:<br />
<code class="codecolorer bash vibrant"><span class="bash">ERROR Invalid kernel: xc_dom_find_loader: no loader found</span></code><br />
&#8230; great. Another why.<br />
In case you&#8217;re wondering, the increasing status in &#8216;xm list&#8217; was caused by the <code class="codecolorer bash vibrant"><span class="bash">on_crash = <span style="color: #ff0000;">'reboot'</span></span></code> line in the xen host config.<br />
I quickly destroyed the doman and changed it to a oneshot try: <code class="codecolorer bash vibrant"><span class="bash">on_crash = <span style="color: #ff0000;">'destroy'</span></span></code></p>
<p>After some searching another hint presented itself. Aren&#8217;t they nice?<br />
This hint was: &#8220;Xen is a retarded piece of cancer and can&#8217;t decypher the bzImage format, try vmlinux instead&#8221;. Aha!<br />
Back to the kernel, <code class="codecolorer text vibrant"><span class="text">make vmlinux</span></code>, copy, and another try to boot it. Obviously this was way too simple. It still crashed.<br />
Checking my old kernel that works for both dom0 and domU with file I noticed that gz should at least work.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># file /boot/vmlinuz-2.6*</span><br />
<span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-2.6.18.8-xen: <span style="color: #c20cb9; font-weight: bold;">gzip</span> compressed data, from Unix, <span style="color: #c20cb9; font-weight: bold;">last</span> modified: Tue Nov <span style="color: #000000;">25</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">13</span>:<span style="color: #000000;">16</span> <span style="color: #000000;">2008</span>, max compression<br />
<span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>vmlinuz-new: ELF <span style="color: #000000;">32</span>-bit LSB executable, Intel <span style="color: #000000;">80386</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, statically linked, not stripped</div></div>
<p>Some more details about the crashing domains can be found using <code class="codecolorer text vibrant"><span class="text">xm dmesg</span></code><br />
It gave me something like:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> traps.c:<span style="color: #000000;">413</span>:d38 Unhandled general protection fault fault<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">trap</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #666666; font-style: italic;">#13] on VCPU 0 [ec=0000]</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> domain_crash_sync called from entry.S <span style="color: #7a0874; font-weight: bold;">&#40;</span>ff18928e<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> Domain <span style="color: #000000;">38</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>vcpu<span style="color: #666666; font-style: italic;">#0) crashed on cpu#3:</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> ----<span style="color: #7a0874; font-weight: bold;">&#91;</span> Xen-3.2.3 x86_32p &nbsp;<span style="color: #007800;">debug</span>=n &nbsp;Not tainted <span style="color: #7a0874; font-weight: bold;">&#93;</span>----<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> CPU: &nbsp; &nbsp;<span style="color: #000000;">3</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> EIP: &nbsp; &nbsp;e019:<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">&lt;</span>c03e9e60<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> EFLAGS: 00000282 &nbsp; CONTEXT: guest<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> eax: 8000c068 &nbsp; ebx: c064c040 &nbsp; ecx: <span style="color: #000000;">80000000</span> &nbsp; edx: 00000cf8<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> esi: c0651f3c &nbsp; edi: c0651f30 &nbsp; ebp: c06981b8 &nbsp; esp: c0651f14<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> cr0: 8005003b &nbsp; cr4: 000006f0 &nbsp; cr3: 00bd5c80 &nbsp; cr2: 00000000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> ds: e021 &nbsp; es: e021 &nbsp; fs: e021 &nbsp; <span style="color: #c20cb9; font-weight: bold;">gs</span>: e021 &nbsp; ss: e021 &nbsp; cs: e019<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> Guest stack trace from <span style="color: #007800;">esp</span>=c0651f14:<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00000000 c03e9e60 0001e019 00010082 c04bd0cd 00000068 00000000 00000000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00002003 00000000 00003030 00000002 00000007 c064c07c c065dfd8 00000000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c06423c0 c064c100 c0651fd8 c065a63f 00000005 00000000 00000000 00000000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c065d02b 006faee4 00000000 00000000 c056dad4 00100000 00000000 00100000<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00100000 00000000 006faee4 c065d27c 006faee4 00000000 00000000 c0651fe8<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00000000 00000000 00000000 c0651fe8 00000000 00000000 c065756f c056dd50<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c04c5020 c0657073 c0651ff4 c065973e 00000000 <span style="color: #000000;">17898175</span> 00800001 03040800<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;00100f22 00000000 c08e0000 c04ba91b c04ba923 c0103371 c0103878 c0659a92<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c01039c7 c0103afc c0103d1a c0104004 c0104163 c01041eb c010451d c010457c<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c0659eb7 c0659ebf c04ba975 c04baa22 c0105536 c01055ae c0105781 c0105c5c<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c0105c9e c0106253 c0106345 c0106831 c010683d c0107b07 c010825e c0108333<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c065a45c c065a46a c0108e56 c065a982 c065a98a c0109bf0 c065af2c c065af93<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c065afe9 c065b042 c065b09b c065b0f4 c065b14d c065b1a6 c065b1ff c065b258<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c065b2b1 c065b32d c065b341 c065b397 c065b3f0 c065b449 c065c14f c065c157<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c010aee5 c010aef3 c010af77 c010af85 c065d7be c065d7d1 c010bdc3 c010be22<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c010c113 c010c14a c010c1c6 c010c2f3 c010c41a c010c443 c010c4dd c010d267<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c010d4cb c010d77b c010d782 c010de76 c010defd c010df0c c010df3f c010df49<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c010df84 c010df8c c010df94 c04bb1d7 c04bb466 c04bb4db c04bb5b9 c04bb60f<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c04bb62f c04bbb8b c04bbd60 c065de79 c065de81 c04bc041 c04bc46b c04bc50d<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>XEN<span style="color: #7a0874; font-weight: bold;">&#41;</span> &nbsp; &nbsp;c04bc899 c04bc902 c065e012 c065e01a c065e028 c065e030 c065e038 c065e040</div></div>
<p>As you can see, that&#8217;s really useful&#8230;.. <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>A useful page with some info can be found <a href="http://wiki.xensource.com/xenwiki/XenParavirtOps">here</a>. It confirms that a gz kernel should work (but bz probably doesn&#8217;t) since I&#8217;m still running Xen 3.2. However, I can&#8217;t find a good reason for why it won&#8217;t work.</p>
<p>Google to the rescue! Hard to find a useful keyword, since most xen kernel issues seem to be similar, but eventually I found this tidbit:<br />
<a href="http://patchwork.kernel.org/patch/36570/">tiny kernel patch</a>.<br />
Weird that this should be needed, one would hope that basic shit like this would work after 8 kernel versions, but obviously they&#8217;re all retards when it comes to this.<br />
Thanks Jeremy Fitzhardinge for the patch!<br />
Just for quick reference, this is the actual patch:</p>
<div class="codecolorer-container diff vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="diff codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c<br />
index 28e5f59..e2485b0 <span style="">100644</span><br />
<span style="color: #888822;">--- a/arch/x86/kernel/cpu/amd.c</span><br />
<span style="color: #888822;">+++ b/arch/x86/kernel/cpu/amd.c</span><br />
<span style="color: #440088;">@@ -356,7 +356,7 @@ &nbsp;static void __cpuinit early_init_amd<span style="">&#40;</span>struct cpuinfo_x86 *c<span style="">&#41;</span></span><br />
&nbsp;#endif<br />
&nbsp;#if defined<span style="">&#40;</span>CONFIG_X86_LOCAL_APIC<span style="">&#41;</span> &amp;&amp; defined<span style="">&#40;</span>CONFIG_PCI<span style="">&#41;</span><br />
&nbsp; &nbsp; /* check CPU config space for extended APIC ID */<br />
<span style="color: #991111;">- &nbsp; if <span style="">&#40;</span>c-&gt;x86 &gt;= 0xf<span style="">&#41;</span> <span style="">&#123;</span></span><br />
<span style="color: #00b000;">+ &nbsp; if <span style="">&#40;</span>cpu_has_apic &amp;&amp; c-&gt;x86 &gt;= 0xf<span style="">&#41;</span> <span style="">&#123;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; unsigned int val;<br />
&nbsp; &nbsp; &nbsp; &nbsp; val = read_pci_config<span style="">&#40;</span><span style="">0</span>, <span style="">24</span>, <span style="">0</span>, 0x68<span style="">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; if <span style="">&#40;</span><span style="">&#40;</span>val &amp; <span style="">&#40;</span><span style="">&#40;</span><span style="">1</span> &lt;&lt; <span style="">17</span><span style="">&#41;</span> | <span style="">&#40;</span><span style="">1</span> &lt;&lt; <span style="">18</span><span style="">&#41;</span><span style="">&#41;</span><span style="">&#41;</span> == <span style="">&#40;</span><span style="">&#40;</span><span style="">1</span> &lt;&lt; <span style="">17</span><span style="">&#41;</span> | <span style="">&#40;</span><span style="">1</span> &lt;&lt; <span style="">18</span><span style="">&#41;</span><span style="">&#41;</span><span style="">&#41;</span></div></div>
<p>So much for &#8216;vanilla&#8217;.</p>
<p>However, it boots now:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>iejoor:<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>hosts<span style="color: #000000; font-weight: bold;">/</span>purple<span style="color: #666666; font-style: italic;"># xm create -c purple.cfg-newkernel</span><br />
Using config <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;./purple.cfg-newkernel&quot;</span>.<br />
Started domain purple<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Reserving virtual address space above 0xf5800000<br />
Linux version 2.6.30.5-jemoeder <span style="color: #7a0874; font-weight: bold;">&#40;</span>root<span style="color: #000000; font-weight: bold;">@</span>iejoor<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">gcc</span> version 4.1.2<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #666666; font-style: italic;">#9 SMP Tue Aug 18 22:59:38 CEST 2009</span><br />
KERNEL supported cpus:<br />
&nbsp; Intel GenuineIntel<br />
&nbsp; AMD AuthenticAMD<br />
&nbsp; NSC Geode by NSC<br />
&nbsp; Cyrix CyrixInstead<br />
&nbsp; Centaur CentaurHauls &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; Transmeta GenuineTMx86 &nbsp; &nbsp; &nbsp; <br />
&nbsp; Transmeta TransmetaCPU &nbsp; &nbsp; &nbsp; <br />
&nbsp; UMC UMC UMC UMC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
ACPI <span style="color: #000000; font-weight: bold;">in</span> unprivileged domain disabled</div></div>
<p>and a lot more yadieyada until it hits a new wall: root device.<br />
Well, that sounds solvable.</p>
<p>In fact, here&#8217;s a solution. What you say?<br />
&#8220;<span style="color: #FF00FF">AAAAH, I GET NOTHING, IT WON&#8217;T EVEN CRASH ANYMORE, JUST NO OUTPUT???!</span>&#8221;<br />
Ah yeah, I forgot to mention: they changed the console device as well as the block device. So here&#8217;s a solution for both issues:<br />
Edit your xen host config file and make it so:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root = <span style="color: #ff0000;">&quot;/dev/xvda1 ro&quot;</span><br />
extra = <span style="color: #ff0000;">&quot;xencons=hvc0&quot;</span></div></div>
<p>(xvda1 is what used to be sda1, you can figure out the rest).</p>
<p>And after all this: HAHA! Success is mine!<br />
Except of course for the undeniable fact that my domU has a fucked up fstab and all, but no issues there <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Now go mess up your own system! Oh, I see&#8230; you already did. Good luck fixing it <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2>Update</h2>
<p>I just tested a testing kernel &#8212; 2.6.31-rc8, and it seems like they fixed it. Probably has been fixed in the testing branch for quite a while now, but still not in stable 2.6.30 <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Let&#8217;s hope they release 2.6.31 soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/xen-and-booting-domu-using-a-vanilla-kernel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Printing and cups</title>
		<link>http://notes.benv.junerules.com/all/software/printing-and-cups/</link>
		<comments>http://notes.benv.junerules.com/all/software/printing-and-cups/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:29:06 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=199</guid>
		<description><![CDATA[We tried to do something that seems fairly simple. &#8220;Print out these tickets for HAR2009&#8220;, where we went last weekend and had a great time The tickets were delivered to me by mail in PDF format. Sounds easy huh? Note that this story was written the day before we went there, just not finished, so [...]]]></description>
			<content:encoded><![CDATA[<p>We tried to do something that seems fairly simple. &#8220;Print out these tickets for <a href="https://wiki.har2009.org/page/Main_Page" title="Hacking At Random 2009">HAR2009</a>&#8220;, where we went last weekend and had a great time <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
The tickets were delivered to me by mail in PDF format. Sounds easy huh?<br />
Note that this story was written the day before we went there, just not finished, so timing might be a bit awkward. Here are the details.<span id="more-199"></span></p>
<p>Attempt 1:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">lpr</span> har_ticket_00.pdf<br />
$</div></div>
<p>Easy. It even works, the printer starts rumbling and out it comes. Oh&#8230;. seems like the barcode is a bit screwed&#8230;. mhm, wonder how it managed to do that. (the rest looked fine).<br />
Browsing through the cups error_log gave some gibberish, this line caught my attention:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">W [11/Aug/2009:16:58:55 +0200] [Job 624] This document does not conform to the Adobe Document Structuring Conventions and may not print correctly!</div></div>
<p>Mhm, interesting. Google returned a bunch of filter thingies, and I was like &#8220;maybe it&#8217;ll work better if I try converting it to ps myself first&#8221;.<br />
So I ran pdf2ps (instead of pdftops as cups does) and viewed the resulting ps file. Looks a lot better. Print it!<br />
lpr on the file, and out it comes. Huh, no landscape? I try <code class="codecolorer text vibrant"><span class="text">lpr -o landscape stupidfile.ps</span></code> which also does portrait. RAAAH, STUPID KANKER CUPS.<br />
After an hour of google and cursing I said &#8220;Fine, you do it&#8221; to lotjuh, who asked me earlier if she had to do it with her <a href="http://www.adobe.com/nl/products/reader/">Habbokrat Reader</a>&#8230;. what a piece of garbage that is&#8230;.</p>
<p>Anyway, lotjuh soon ran into a new issue. First of all, her new Windows 7 didn&#8217;t have a printer driver, and trying to install the Vista on failed. Our printer is a cheap Brother DCP135C, which isn&#8217;t THAT old I thought. Oh well, that&#8217;s your windows problems for you <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
So she booted to linux. Surprise! Print didn&#8217;t work. That is, it said &#8220;OK&#8221; but out came nothing. Jobs just collected at her local cups.</p>
<p>*grumble*WHYYYYY???</p>
<p>Debugging this is a tough, since none of the logs give any useful information whatsoever, even in debug mode.</p>
<p>To understand this problem you might want some more network background info:<br />
We have our internet through xs4all, who gave us a Fritzbox for that. Since I couldn&#8217;t get it to work like our previous internet setup with the external IP address on our local server,<br />
we eventually decided that the thing could route for us, but we have our own DHCP server running on our local server.<br />
So in our LAN the default gateway is the fritzbox, but our local server has most ports forwarded to it. In order to also run a dns server and dns cache it has multiple IP addresses in our local lan.<br />
In fact, it has 3 IPs in the 192.168.1.x range on a single ethernet device.</p>
<p>Back to cups:<br />
In cupsd.conf I have <code class="codecolorer text vibrant"><span class="text">Listen 192.168.1.1:631</span></code>. That should work, right?<br />
However, BrowseAddress only accepts a .255 at the end, or an @IF statement. So I had @IF(eth_local) there.<br />
Result: clients get confused, try to send data to all 3 IP addresses on the network. And since I can&#8217;t put the primary IP address in the BrowseAddress&#8230;. it fails.<br />
My guess is that cups detects all 3 IP addresses on that interface and happily announces those, while only 1 of them should be used. Especially because of the listen statement.<br />
I fixed this by using the second address, which I conviently have on a &#8216;different&#8217; ethernet device eth_local:0. This seems to work a lot better, the clients now have a single printer in their cups<br />
configuration and it even provides its location!</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Device URI: ipp://192.168.1.2:631/printers/DCP135C</div></div>
<p>instead of the old</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Device URI: file://dev/null</div></div>
<p>However, my first problem was still present. The whining about invalid PDF files. Printing from KWord also gave this error. The local cups would happily forward my job to our server, which then barfed on the thing:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">D [11/Aug/2009:19:47:17 +0200] [Job 637] Printer using device file &quot;/dev/usblp0&quot;...<br />
D [11/Aug/2009:19:47:17 +0200] Discarding unused printer-state-changed event...<br />
D [11/Aug/2009:19:47:17 +0200] [Job 637] backendRunLoop(print_fd=0, device_fd=5, use_bc=0, side_cb=0x804a23f)<br />
D [11/Aug/2009:19:47:17 +0200] [Job 637] Page = 595x842; 9,9 to 586,833<br />
D [11/Aug/2009:19:47:17 +0200] [Job 637] slow_collate=0, slow_duplex=0, slow_order=1<br />
W [11/Aug/2009:19:47:17 +0200] [Job 637] This document does not conform to the Adobe Document Structuring Conventions and may not print correctly!<br />
D [11/Aug/2009:19:47:17 +0200] Discarding unused printer-state-changed event...<br />
D [11/Aug/2009:19:47:17 +0200] Discarding unused job-progress event...<br />
D [11/Aug/2009:19:47:17 +0200] PID 12180 (/usr/lib/cups/filter/pdftops) exited with no errors.<br />
D [11/Aug/2009:19:47:17 +0200] PID 12181 (/usr/lib/cups/filter/pstops) exited with no errors.<br />
D [11/Aug/2009:19:47:18 +0200] [Job 637] Error: error occurred at print phase !!<br />
E [11/Aug/2009:19:47:18 +0200] [Job 637] No pages found!<br />
D [11/Aug/2009:19:47:18 +0200] Discarding unused printer-state-changed event...<br />
D [11/Aug/2009:19:47:18 +0200] Discarding unused job-progress event...<br />
D [11/Aug/2009:19:47:18 +0200] [Job 637] GPL Ghostscript 8.64: Unrecoverable error, exit code 1</div></div>
<p>&#8230; well, that&#8217;s just lovely.<br />
(insert your curse of the day here).</p>
<p>Oh btw, if anyone ever wonders about the status of their printer and cups and everything:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ lpstat <span style="color: #660033;">-t</span><br />
scheduler is running<br />
system default destination: DCP135C<br />
members of class default:<br />
&nbsp; &nbsp; unknown<br />
members of class printers:<br />
&nbsp; &nbsp; unknown<br />
device <span style="color: #000000; font-weight: bold;">for</span> DCP135C: ipp:<span style="color: #000000; font-weight: bold;">//</span>192.168.1.2:<span style="color: #000000;">631</span><span style="color: #000000; font-weight: bold;">/</span>printers<span style="color: #000000; font-weight: bold;">/</span>DCP135C<br />
device <span style="color: #000000; font-weight: bold;">for</span> default: ipp:<span style="color: #000000; font-weight: bold;">//</span>192.168.1.2:<span style="color: #000000;">631</span><span style="color: #000000; font-weight: bold;">/</span>classes<span style="color: #000000; font-weight: bold;">/</span>default<br />
device <span style="color: #000000; font-weight: bold;">for</span> printers: ipp:<span style="color: #000000; font-weight: bold;">//</span>192.168.1.2:<span style="color: #000000;">631</span><span style="color: #000000; font-weight: bold;">/</span>classes<span style="color: #000000; font-weight: bold;">/</span>printers<br />
DCP135C accepting requests since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">45</span> PM CEST<br />
default accepting requests since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">46</span> PM CEST<br />
printers accepting requests since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">47</span> PM CEST<br />
printer DCP135C is idle. &nbsp;enabled since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">45</span> PM CEST<br />
printer default is idle. &nbsp;enabled since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">46</span> PM CEST<br />
printer printers is idle. &nbsp;enabled since Tue <span style="color: #000000;">11</span> Aug <span style="color: #000000;">2009</span> 07:<span style="color: #000000;">44</span>:<span style="color: #000000;">47</span> PM CEST</div></div>
<p>So far I haven&#8217;t found a solution for this problem yet, except for a print to file, scp, manually convert, lpr style workaround, but that&#8217;s tedious.<br />
If anyone knows, I&#8217;m interested in the cause and fix for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/printing-and-cups/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Slackware timezone fuckup</title>
		<link>http://notes.benv.junerules.com/all/software/slackware-timezone-fuckup/</link>
		<comments>http://notes.benv.junerules.com/all/software/slackware-timezone-fuckup/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 15:20:27 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[slackware]]></category>
		<category><![CDATA[timezone]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=180</guid>
		<description><![CDATA[Messing around on one of my machines I checked a timestamp on a file&#8230;. and noticed &#8220;Huh, didn&#8217;t I just touch it?&#8221;. ls told me the file was about 12 hours old. Interesting, since it was just created. # date Fri Aug &#160;7 10:08:09 CDT 2009 What the&#8230;. CDT ? When did we move? # [...]]]></description>
			<content:encoded><![CDATA[<p>Messing around on one of my machines I checked a timestamp on a file&#8230;. and noticed &#8220;Huh, didn&#8217;t I just touch it?&#8221;.<br />
ls told me the file was about 12 hours old. Interesting, since it was just created.</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># date</span><br />
Fri Aug &nbsp;<span style="color: #000000;">7</span> <span style="color: #000000;">10</span>:08:09 CDT <span style="color: #000000;">2009</span></div></div>
<p>What the&#8230;. CDT ? When did we move? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># ls -la /etc/*time*</span><br />
lrwxrwxrwx <span style="color: #000000;">1</span> root root <span style="color: #000000;">36</span> <span style="color: #000000;">2008</span>-03-<span style="color: #000000;">14</span> 04:<span style="color: #000000;">42</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>Europe<span style="color: #000000; font-weight: bold;">/</span>Amsterdam</div></div>
<p>Well, not recently&#8230; that&#8217;s for sure.<span id="more-180"></span></p>
<p>Note that this box is running an ancient slackware version &#8211; 11.0. I keep it up2date regarding security issues using slackpkg and half the stuff running on it is built by myself anyway.<br />
And so I realized that <span style="color: #FF0000">glibc-zoneinfo</span> was recently upgraded to version 2.3.6. Ah yeah&#8230;. and so we suddenly moved.<br />
Checking another box that had the same update a few days ago I found it had the same problem. Joy.</p>
<p>I see 2 solutions, except for &#8220;wait for the slackware fix&#8221;.</p>
<ul>
<li>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># rm -f /etc/localtime</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>CET <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime</div></div>
</li>
<li>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># rm -f /etc/localtime</span><br />
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>Europe<span style="color: #000000; font-weight: bold;">/</span>Paris <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime</div></div>
</li>
</ul>
<p>(of course there are plenty more solutions, like recompile glibc, but I&#8217;m not in the mood for that).</p>
<p>For testing timezones, you can use this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># TZ=Europe/Dublin date</span><br />
Fri Aug &nbsp;<span style="color: #000000;">7</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">18</span>:00 IST <span style="color: #000000;">2009</span></div></div>
<p>Or for figuring out what zone a timezone file is:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># strings /etc/localtime | grep ST</span><br />
CST6CDT,M3.2.0,M11.1.0</div></div>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/slackware-timezone-fuckup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slackbuild.pl</title>
		<link>http://notes.benv.junerules.com/all/software/slackbuild-pl/</link>
		<comments>http://notes.benv.junerules.com/all/software/slackbuild-pl/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 20:22:56 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Slackbuild.pl]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=37</guid>
		<description><![CDATA[Just wrote a page about my latest tool &#8211; slackbuild.pl Go view it if you run slackware, or get bent if you run anything else.]]></description>
			<content:encoded><![CDATA[<p>Just wrote a page about my latest tool &#8211; <a title="Slackbuild.pl" href="http://notes.benv.junerules.com/slackbuild-pl/" target="_self">slackbuild.pl</a></p>
<p>Go view it if you run slackware, or get bent if you run anything else.</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/slackbuild-pl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
