<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Not The Haiku Blog</title>
	<atom:link href="http://easleyk.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://easleyk.wordpress.com</link>
	<description>Programming is 95 percent about patience and 5 percent about Haiku</description>
	<lastBuildDate>Tue, 23 Mar 2010 16:44:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='easleyk.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Not The Haiku Blog</title>
		<link>http://easleyk.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://easleyk.wordpress.com/osd.xml" title="Not The Haiku Blog" />
	<atom:link rel='hub' href='http://easleyk.wordpress.com/?pushpress=hub'/>
		<item>
		<title>An ode to missing header files</title>
		<link>http://easleyk.wordpress.com/2010/03/22/an-ode-to-missing-header-files/</link>
		<comments>http://easleyk.wordpress.com/2010/03/22/an-ode-to-missing-header-files/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 23:16:53 +0000</pubDate>
		<dc:creator>Konstantin</dc:creator>
				<category><![CDATA[DXR]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://easleyk.wordpress.com/?p=230</guid>
		<description><![CDATA[Random thought #1 - Can I have a step-by-step how-to&#8230; - No. - ..that works without any additional work? - No. - Do you always say &#8220;no&#8221;? - Yes. None: ode 1. A lyric poem with complex stanza forms I have these chronic problems with missing or invalid header files. Today I&#8217;m going to deal [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=230&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Random thought #1<br />
<em>- Can I have a step-by-step how-to&#8230;<br />
- No.<br />
- ..that works without any additional work?<br />
- No.<br />
- Do you always say &#8220;no&#8221;?<br />
- Yes.</em></p>
<p><strong>None: ode</strong><br />
1. A lyric poem with complex stanza forms</p>
<p>I have these chronic problems with <a href="http://easleyk.wordpress.com/2010/03/21/cross-compiling-firefox-for-mingw32/" target="_blank">missing</a> or <a href="http://easleyk.wordpress.com/2010/02/10/cross-compiling-firefox-for-mac-on-linux/" target="_blank">invalid</a> header files. Today I&#8217;m going to deal with one of them.</p>
<p>Headers in question are <code>X11/Xos.h</code> and <code>X11/Xfuncproto.h</code> from my attempt to build <a href="http://easleyk.wordpress.com/2010/03/21/cross-compiling-firefox-for-mingw32/" target="_blank">firefox for mingw32</a>. (Note that I have no idea what X11 is. And I suspect that X11 is something very obvious.). They are the missing dependency in several different files: <code>cppsetup.c</code>, <code>include.c</code>, <code>parse.c</code>, <code>main.c</code>, <code>def.h</code>.</p>
<p>It obviously looks like a group of source files that include the same header file <code>def.h</code>, that includes the missing headers <code>X11/Xos.h</code> and <code>X11/Xfuncproto.h</code>. So, I will go straight to <code>def.h</code></p>
<p><code>def.h</code>:<br />
<code>#ifndef NO_X11<br />
#include &lt;X11/Xos.h&gt;<br />
#include &lt;X11/Xfuncproto.h&gt;</code></p>
<p>Ok, this suggest that these are actually external headers, that I supposedly have under <code>/usr/include/X11</code> or <code>/usr/X11/include</code>. So what is X11? <a href="http://cygwin.com/packages/xproto/xproto-7.0.16-1" target="_blank">X11 core headers?</a> I feel like I&#8217;m missing something very obvious. However, after some time &#8220;poking&#8221; around, I think, I need <code>xorg-x11-proto-devel</code> package.</p>
<p>After installing it, I got my X11 headers under <code>/usr/include/X11</code>. And now I can continue with<a href="http://easleyk.wordpress.com/2010/03/21/cross-compiling-firefox-for-mingw32/"> the firefox build</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/easleyk.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/easleyk.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/easleyk.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/easleyk.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/easleyk.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/easleyk.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/easleyk.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/easleyk.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/easleyk.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/easleyk.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/easleyk.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/easleyk.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/easleyk.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/easleyk.wordpress.com/230/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=230&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://easleyk.wordpress.com/2010/03/22/an-ode-to-missing-header-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1954511b5e417b8f14ec1270e09d14ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Konstantin.Novichikhin</media:title>
		</media:content>
	</item>
		<item>
		<title>Cross Compiling Firefox for mingw32</title>
		<link>http://easleyk.wordpress.com/2010/03/21/cross-compiling-firefox-for-mingw32/</link>
		<comments>http://easleyk.wordpress.com/2010/03/21/cross-compiling-firefox-for-mingw32/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 20:20:32 +0000</pubDate>
		<dc:creator>Konstantin</dc:creator>
				<category><![CDATA[DXR]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://easleyk.wordpress.com/?p=214</guid>
		<description><![CDATA[A couple of days ago I was able to put together a working toolchain to compile windows binaries. Today I&#8217;m going to try and compile a firefox build with it. First of all, I&#8217;m going to get a firefox build that passed unit tests. To do that, I need to go to tinderbox and look [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=214&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago I was able to put together <a href="http://easleyk.wordpress.com/2010/03/18/cross-compiling-firefox-for-windows-on-linux/" target="_blank">a working toolchain</a> to compile windows binaries. Today I&#8217;m going to try and compile a firefox build with it.</p>
<p>First of all, I&#8217;m going to get a firefox build that passed unit tests. To do that, I need to go to <a href="http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox" target="_blank">tinderbox</a> and look for &#8220;WINNT 5.2 mozilla-central build&#8221;. Next step is to find the latest successful source code revision.</p>
<p>Right now (March 21st, 5:35 pm GMT) the latest &#8220;green&#8221; revision is 1633e6077d77.</p>
<p>Since I already have mozilla-central source on my machine, I&#8217;m just going to update to this revision. Under mozilla-central folder:<br />
<code>hg pull</code><br />
<code>hg update -r 1633e6077d77</code></p>
<p><span id="more-214"></span></p>
<p>After that I need to configure .mozconfig. I&#8217;ll take a sample mozconfig from <a href="https://developer.mozilla.org/en/Cross_Compile_Mozilla_for_Mingw32" target="_blank">MDC</a>. It looks like this:<br />
<code>#Specify the cross compile<br />
CROSS_COMPILE=1<br />
ac_add_options --enable-application=browser<br />
ac_add_options --host=i686-linux<br />
ac_add_options --target=i686-mingw32<br />
ac_add_options --enable-default-toolkit=cairo-windows<br />
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../mozilla-mingw<br />
# Mozilla trunk uses many Vista only features on Windows, so we should disable some components to make it buildable with mingw32.<br />
ac_add_options  --enable-debug<br />
ac_add_options  --disable-optimize<br />
ac_add_options  --disable-tests<br />
ac_add_options  --disable-embedding-tests<br />
ac_add_options  --disable-installer<br />
ac_add_options  --disable-accessibility</code></p>
<p><span style="color:#ff0000;">#ac_add_options &#8211;disable-vista-sdk-requirements<br />
ac_add_options &#8211;with-windows-version=502</span><br />
ac_add_options &#8211;disable-updater</p>
<p>#change this to where your libIDL-config file locate.<br />
<span style="color:#ff0000;">#I have libIDL itself, but I don&#8217;t have libIDL-config</span><br />
<span style="color:#ff0000;">#Installing libIDL-devel package seemed to fix it</span><br />
HOST_LIBIDL_CONFIG=/usr/bin/libIDL-config<span style="color:#ff0000;">-2</span><br />
#Config your moztools position<br />
<span style="color:#ff0000;">#No need to change this</span><br />
GLIB_PREFIX=$HOME/moztools<br />
LIBIDL_PREFIX=$HOME/moztools</p>
<p>#disable xpcom stdcall calling convention because of gcc 4.3.0 bug<br />
CPPFLAGS=&#8221;-DMOZ_DISABLE_XPCOM_STDCALL&#8221;</p>
<p><span style="color:#ff0000;">#Parallel compilation<br />
mk_add_options MOZ_MAKE_FLAGS=&#8221;-j5&#8243;</span></p>
<p>Now, when I have a good mozconfig file, I need to apply <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=449557" target="_blank">some patches</a> to make mingw happy.</p>
<p>Under mozilla-central:</p>
<p><code>mkdir ../mingw-patches<br />
wget -O ../mingw-patches/disable-xpcom-stdcall.patch https://bugzilla.mozilla.org/attachment.cgi?id=332690<br />
wget -O ../mingw-patches/gcc_stdcall.patch https://bugzilla.mozilla.org/attachment.cgi?id=332691<br />
wget -O ../mingw-patches/crypto.patch https://bugzilla.mozilla.org/attachment.cgi?id=334847<br />
wget -O ../mingw-patches/trivial.patch https://bugzilla.mozilla.org/attachment.cgi?id=334848<br />
patch -p1 &lt; ../mingw-patches/disable-xpcom-stdcall.patch<br />
patch -p1 &lt; ../mingw-patches/gcc_stdcall.patch<br />
patch -p1 &lt; ../mingw-patches/crypto.patch<br />
patch -p1 &lt; ../mingw-patches/trivial.patch</code></p>
<p>Some of the patches failed. I applied them manually. Now, I&#8217;m going to try and built it.  Let&#8217;s see what happens.</p>
<p><code>make -f client.mk build</code></p>
<p><strong>Problem #1:</strong> <code>*** Couldn't find autoconf 2.13.</code><br />
<strong>Solution:</strong> <code>yum install autoconf213</code></p>
<p><strong>Problem #2:</strong><br />
<code>checking for i686-mingw32-gcc... no<br />
checking for i686-pc-mingw32-gcc... no<br />
checking whether the C compiler (:  ) works... no<br />
configure: error: installation or configuration problem: C compiler cannot create executables.</code></p>
<p><strong>Solution:</strong><br />
Add <code>PATH=$PATH:$INSTALL/bin</code> to your .bash_profile.<br />
Where $INSTALL is your mingw32 folder.</p>
<p><strong>Problem #3:</strong><br />
<code>In file included from .../mozilla-central/config/mkdepend/cppsetup.c:29:<br />
In file included from .../mozilla-central/config/mkdepend/include.c:30:<br />
In file included from .../mozilla-central/config/mkdepend/parse.c:29:<br />
In file included from .../mozilla-central/config/mkdepend/pr.c:29:<br />
In file included from .../mozilla-central/config/mkdepend/main.c:29:<br />
In file included from .../mozilla-central/config/mkdepend/def.h:30:21:<br />
In file included from .../mozilla-central/config/mkdepend/def.h:31:28:<br />
error: X11/Xos.h: No such file or directory<br />
error: X11/Xfuncproto.h: No such file or directory</code><br />
<strong>Solution:</strong><br />
<a href="http://easleyk.wordpress.com/2010/03/22/an-ode-to-missing-header-files/" target="_blank">I knew it was <em>too</em> easy.</a></p>
<p><strong>Problem #4:</strong><br />
<a href="http://pastebin.com/WwYSNqpG" target="_blank">This time an error is half a mile long.</a><br />
<strong>Solution:</strong><br />
I&#8217;m working on it.</p>
<p>Some reading material:<br />
<a href="https://developer.mozilla.org/en/Cross-Compiling_Mozilla">Cross-compiling Mozilla</a><br />
<a href="http://www.airs.com/ian/configure/">The GNU configure and build system</a> &#8211; <a href="http://www.airs.com/ian/configure/configure_5.html#SEC28">Cross Compilations Tools</a><br />
<a href="https://developer.mozilla.org/en/How_Mozilla%27s_build_system_works">How Mozilla&#8217;s build system works</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/easleyk.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/easleyk.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/easleyk.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/easleyk.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/easleyk.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/easleyk.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/easleyk.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/easleyk.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/easleyk.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/easleyk.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/easleyk.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/easleyk.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/easleyk.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/easleyk.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=214&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://easleyk.wordpress.com/2010/03/21/cross-compiling-firefox-for-mingw32/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1954511b5e417b8f14ec1270e09d14ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Konstantin.Novichikhin</media:title>
		</media:content>
	</item>
		<item>
		<title>Building mingw32 toolchain to cross-compile Firefox</title>
		<link>http://easleyk.wordpress.com/2010/03/18/building-mingw32-toolchain-to-cross-compile-firefox/</link>
		<comments>http://easleyk.wordpress.com/2010/03/18/building-mingw32-toolchain-to-cross-compile-firefox/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 02:18:44 +0000</pubDate>
		<dc:creator>Konstantin</dc:creator>
				<category><![CDATA[DXR]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://easleyk.wordpress.com/?p=199</guid>
		<description><![CDATA[Today I&#8217;m going to compile Firefox for Windows on a Linux box. And for that I&#8217;m not going to reinvent the wheel, but follow an existing guide. This is what I&#8217;m going to need: GNU Binutils &#8211; This is linker, assembler, and various other tools. GCC 4.3 &#8211; I have GCC 4.4.3. I might have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=199&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m going to compile Firefox for Windows on a Linux box. And for that I&#8217;m not going to reinvent the wheel, but follow <a href="https://developer.mozilla.org/en/Cross_Compile_Mozilla_for_Mingw32" target="_blank">an existing guide</a>.</p>
<p>This is what I&#8217;m going to need:</p>
<ul>
<li><a href="http://www.gnu.org/software/binutils/" target="_blank">GNU Binutils</a> &#8211; This is linker, assembler, and various other tools.</li>
<li><a href="http://gcc.gnu.org/" target="_blank">GCC</a> 4.3 &#8211; I have GCC 4.4.3. I might have to install GCC 4.3, if GCC 4.4.3 doesn&#8217;t play well with <a href="https://developer.mozilla.org/en/Dehydra" target="_blank">Dehydra</a>.</li>
<li><a href="http://downloads.sourceforge.net/mingw/mingw-runtime-3.14.tar.gz?modtime=1198749088&amp;big_mirror=1" target="_blank">mingw-runtim</a>, <a rel="external nofollow" href="http://downloads.sourceforge.net/mingw/w32api-3.11.tar.gz?modtime=1198748420&amp;big_mirror=1" target="_blank">w32api</a>, and <a rel="external nofollow" href="http://cygwin.com/snapshots/" target="_blank">Cygwin winsup</a> &#8211; It has something to do with GCC cross compiler.</li>
<li><a title="http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip" rel="external nofollow" href="http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip" target="_blank">Netscape wintools</a> &#8211; This is something that is need for some xpidl. A quick search reveals that it (might) stands for [X]Cross Platform Interface Definition Language.</li>
<li>And, off course, configuring Firefox build.</li>
</ul>
<ol>
<li><a href="http://ftp.gnu.org/gnu/binutils/binutils-2.18.tar.bz2" target="_blank"><code>binutils-2.18</code></a> surprisingly installed with no problems.</li>
<li>Install <a href="http://downloads.sourceforge.net/mingw/mingw-runtime-3.14.tar.gz?modtime=1198749088&amp;big_mirror=1" target="_blank"><code>mingw-runtime-3.14</code></a></li>
<li>Same for <a href="http://downloads.sourceforge.net/mingw/w32api-3.11.tar.gz?modtime=1198748420&amp;big_mirror=1" target="_blank"><code>w32api-3.11</code></a>.</li>
<li>Get <a href="ftp://mirrors.kernel.org/gnu/gcc/gcc-4.3.0/gcc-4.3.0.tar.bz2" target="_blank">GCC 4.3 source</a> and <a href="http://cygwin.com/snapshots/winsup-src-20100315.tar.bz2" target="_blank"><code>winsup-src-20100315</code></a>.</li>
</ol>
<p>I had to get <a href="http://www.mpfr.org/" target="_blank">mpfr</a> to install GCC, but other than that everything went without a problem.</p>
<p>Time to check the compiler:<br />
<code>[root@xxxxxx ~]# osd/mingw32/bin/i686-mingw32-gcc -v<br />
Using built-in specs.<br />
Target: i686-mingw32<br />
Configured with: ../gcc-4.3.0/configure --prefix=/root/osd/mingw32/ --target=i686-mingw32 --with-gnu-ld --with-gnu-as --enable-__cxa_atexit --enable-languages=c,c++<br />
Thread model: win32<br />
gcc version 4.3.0 (GCC)</code></p>
<p><code>[root@xxxxxx ~]# osd/mingw32/bin/i686-mingw32-gcc test.c -o test.exe<br />
[root@xxxxxx ~]# ls test*<br />
test.c  test.exe</code></p>
<p>On Windows:<br />
<code>C:\&gt;test.exe<br />
hello world!</code></p>
<p>I&#8217;m almost ready to build Firefox.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/easleyk.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/easleyk.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/easleyk.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/easleyk.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/easleyk.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/easleyk.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/easleyk.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/easleyk.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/easleyk.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/easleyk.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/easleyk.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/easleyk.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/easleyk.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/easleyk.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=199&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://easleyk.wordpress.com/2010/03/18/building-mingw32-toolchain-to-cross-compile-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1954511b5e417b8f14ec1270e09d14ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Konstantin.Novichikhin</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing Thunderbird bug &#8211; Email Parsing in Thunderbird</title>
		<link>http://easleyk.wordpress.com/2010/03/09/fixing-thunderbird-bug-email-parsing-in-thunderbird/</link>
		<comments>http://easleyk.wordpress.com/2010/03/09/fixing-thunderbird-bug-email-parsing-in-thunderbird/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 09:51:14 +0000</pubDate>
		<dc:creator>Konstantin</dc:creator>
				<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://easleyk.wordpress.com/?p=159</guid>
		<description><![CDATA[Thunderbird is an email application from Mozilla. It happened to have a bug where it highlights false email addresses with &#8220;mailto&#8221; tags. For example, it would highlight &#8220;a@a&#8230;&#8221;, which is clearly an invalid email address. I&#8217;m going to try to fix it. It&#8217;s going to be a nice distraction from my Mac adventure Here is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=159&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Thunderbird is an email application from Mozilla. It happened to have a bug where it highlights false email addresses with &#8220;mailto&#8221; tags. For example, it would highlight &#8220;a@a&#8230;&#8221;, which is clearly an invalid email address. I&#8217;m going to try to fix it.</p>
<p>It&#8217;s going to be a nice distraction from my <a href="http://easleyk.wordpress.com/2010/02/10/cross-compiling-firefox-for-mac-on-linux/">Mac adventure</a></p>
<p>Here is the plan for bullet point lovers:</p>
<ol>
<li>Register on <a href="http://landfill.bugzilla.org/" target="_blank">landfill</a> and file <a href="http://landfill.bugzilla.org/bugzilla-3.0-branch/show_bug.cgi?id=7332" target="_blank">the bug</a></li>
<li>Get Thunderbird <a href="http://mxr.mozilla.org/comm-central" target="_blank">source code</a> and build a <a href="https://developer.mozilla.org/En/Simple_Thunderbird_build" target="_blank">debug build</a></li>
<li>Find where and whan needs to be fixed</li>
<li>Submit a diff to my bug report</li>
<li>Get someone to review it</li>
</ol>
<p><span id="more-159"></span></p>
<p>I had no problems with registration and creation of the bug report. I&#8217;m not going to go deep into details on how to build TB, since it&#8217;s very similar to the <a href="http://easleyk.wordpress.com/2010/02/04/simple-firefox-build/" target="_blank">simple firefox build</a> I&#8217;ve done earlier.</p>
<p>(Edit: I should probably take my words back. It took about 20+ builds to get a correct one. In half of the attempts to compile TB, it froze in the middle and had to be shut down. Considering each build takes 2-3 hours on my machine, it&#8217;s quite some time wasted. And when it wasn&#8217;t freezing, there were build errors 2 hours into compilation and linking.)</p>
<p>Now, when it is finally done, I end up with the following:</p>
<p style="text-align:center;"><img class="aligncenter" title="193a3pre" src="http://img651.imageshack.us/img651/8265/193a3pre.png" alt="" width="420" height="184" /></p>
<p>I wonder what platform it&#8217;s referring to&#8230;</p>
<p>Anyways, I&#8217;m going to forget that I do not have a working TB debug build and try to find the place to fix this bug without it.</p>
<p>I haven&#8217;t used TB for years, so I&#8217;m just going to guess. Mailto is essentially a URL. Some programs highlight plain text URLs and put them in special tags, usually html. With that in mind, I&#8217;m going to search <a href="http://mxr.mozilla.org/comm-central/" target="_blank">comm-central</a> for some kind of <a href="http://mxr.mozilla.org/comm-central/search?string=url+parse&amp;find=&amp;findi=&amp;filter=^[^]*%24&amp;hitlimit=&amp;tree=comm-central" target="_blank">URL parser</a>.</p>
<p>It looks like <a href="http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/base/src/nsURLParsers.cpp" target="_blank">nsURLParsers.cpp</a> that has an interesting method  ParseURL(&#8230;). However, after looking at ParseURL I do not think this is what I need.</p>
<p>It figures, I&#8217;m looking at this from a wrong perspective. Mailto tag has to be created first. And only then (when it&#8217;s clicked, for example) it&#8217;s parsed by the program. So, to create an html tag out of plain text, I would need some kind of <a href="http://mxr.mozilla.org/comm-central/search?string=txttohtml" target="_blank">text to html converter</a>, that would parse anything that looks like an email address.</p>
<p>It looks like <a href="http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp" target="_blank">mozTXTToHTMLConv.cpp</a> is the file <a href="http://mxr.mozilla.org/comm-central/search?string=url&amp;find=mozTXTToHTMLConv.cpp&amp;findi=&amp;filter=^[^]*%24&amp;hitlimit=&amp;tree=comm-central" target="_blank">I need</a>.</p>
<p>Functions to look at:</p>
<p><a href="http://mxr.mozilla.org/comm-central/ident?i=CompleteAbbreviatedURL" target="_blank">CompleteAbbreviatedURL(&#8230;)</a> &#8211; This function will add &#8220;mailto:&#8221; to a string that looks like &#8220;mail@host.domain&#8221; or some &#8220;wr@ngurl.here&#8221;. The only thing it checks is &#8220;@&#8221; sign followed  by &#8220;.&#8221; sign. This would probably also match &#8220;a@.&#8221;, and convert it to &#8220;mailto:a@.&#8221;. But this doesn&#8217;t seem to be the place, since this function serves a single purpose of fixing incomplete URLs.</p>
<p><a href="http://mxr.mozilla.org/comm-central/ident?i=CheckURLAndCreateHTML" target="_blank">CheckURLAndCreateHTML(&#8230;)</a> &#8211; This function looks more promising. I understand what this function is supposed to do, but I have no idea what it is exactly doing. It&#8217;s clear that it add &#8220;href&#8221; tag to the txtURL, but what about those modes: RFC1738, RFC2396E, freetext, and abbreviated. I would assume that it&#8217;s used somewhere else to make a correct HTML for this URL. That is something to keep in mind.</p>
<p>And the last one &#8211; <a href="http://mxr.mozilla.org/comm-central/ident?i=FindURL" target="_blank">FindURL(&#8230;)</a>, which is called by <a href="http://mxr.mozilla.org/comm-central/search?string=ScanTXT&amp;find=mozTXTToHTMLConv" target="_blank">ScanTXT(&#8230;)</a> upon finding &#8220;@&#8221;, &#8220;.&#8221;, and &#8220;:&#8221; signs. <a href="http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.h#192" target="_blank"> &#8220;enum:modetypes&#8221;</a> comments in FindURL answer my previous question about RFCs. From looking at those comments, RFC2396E and abbreviated are the ones I should interested in, since those match mailto URLs.</p>
<p>From looking at the FindURL code, it checks for &#8220;@&#8221; sign and marks mode as RFC2396E and then checks for &#8220;.&#8221; sign and marks mode as abbreviated.</p>
<p>Then it looks for the <a href="http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp#222" target="_blank">start of URL</a> based on the mode. For abbreviated, it will look from the position of &#8220;@&#8221; sign in the string for a first defined special character, or space, or non-digit. Makes sense so far.</p>
<p>If previous step is successful it will look for the <a href="http://mxr.mozilla.org/comm-central/search?string=findurlend&amp;find=mozTXTToHTMLConv&amp;findi=&amp;filter=^[^]*%24&amp;hitlimit=&amp;tree=comm-central" target="_blank">end of URL</a> based on the mode. And again I&#8217;m more interested in abbreviated and freetext mode parsing here. In a similar to FindURLStart(&#8230;) fashion,  it looks for the first defined special character or space and marks it as the end of URL. For emails, however, it looks for &#8220;(&#8220;, &#8221; &#8216; &#8220;, and any non-ASCII character, and marks the end of URL. It will also eliminate any trailing &#8220;.,;!?-\&#8221;, since these signs are not allowed at the end of an email address. Now, I&#8217;m certain that I need to make a change to <a href="http://mxr.mozilla.org/comm-central/search?string=mozTXTToHTMLConv::FindURLEnd" target="_blank">mozTXTToHTMLConv::FindURLEnd</a> for the case of email address.</p>
<p>Let&#8217;s take a look at the requirements:</p>
<h4>Valid Addresses</h4>
<ol>
<li> a@a.com</li>
<li>a.a@a.a</li>
<li> a.a@a.a.com</li>
</ol>
<h4>Invalid Addresses</h4>
<ol>
<li> a@.</li>
<li>a@..</li>
<li> a@..f</li>
<li> a@&#8230;.f</li>
<li> @.</li>
<li> @.com</li>
<li> @a.com</li>
<li> @a</li>
<li> @a.</li>
<li> @a..</li>
<li> @a&#8230;com</li>
<li> a@a.a..a</li>
</ol>
<p>It looks like a lof of work.</p>
<p>I&#8217;m 100% sure that valid addresses 1, 2, and 3 are going to be matched, since FindURLStart and FindURLEnd will terminate when then find a space. Invalid addresses is a different story. It is hard to come up with a single rule for all of them without breaking existing ones. Cases 5 to 11 do not require a FindURLStart change, since the program already checks if recipient&#8217;s mail address is present.</p>
<p>The change is going to be made in <a href="http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp#310" target="_blank">mozTXTToHTMLConv::FindURLEnd(&#8230;)</a>:</p>
<p>The main requiremens for this one are:<br />
a) there must be something between &#8220;@&#8221;, &#8220;.&#8221;, and any consecutive &#8220;.&#8221; as in &#8220;@doe.somesite.somewhere.domain&#8230;&#8221;<br />
b) there must be a domain name after &#8220;.&#8221; as in &#8220;@doe.domain?..&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/easleyk.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/easleyk.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/easleyk.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/easleyk.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/easleyk.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/easleyk.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/easleyk.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/easleyk.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/easleyk.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/easleyk.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/easleyk.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/easleyk.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/easleyk.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/easleyk.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=159&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://easleyk.wordpress.com/2010/03/09/fixing-thunderbird-bug-email-parsing-in-thunderbird/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1954511b5e417b8f14ec1270e09d14ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Konstantin.Novichikhin</media:title>
		</media:content>

		<media:content url="http://img651.imageshack.us/img651/8265/193a3pre.png" medium="image">
			<media:title type="html">193a3pre</media:title>
		</media:content>
	</item>
		<item>
		<title>Cross-compiling Firefox for Mac on Linux</title>
		<link>http://easleyk.wordpress.com/2010/02/10/cross-compiling-firefox-for-mac-on-linux/</link>
		<comments>http://easleyk.wordpress.com/2010/02/10/cross-compiling-firefox-for-mac-on-linux/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 05:34:03 +0000</pubDate>
		<dc:creator>Konstantin</dc:creator>
				<category><![CDATA[DXR]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://easleyk.wordpress.com/?p=70</guid>
		<description><![CDATA[As a part of my DXR project work I will have to cross-compile Firefox for Mac and Windows on a Linux box. I&#8217;m going to start with a Mac build and follow instructions in this blog post in my attempt to build it. I need to get toolwhip source code and compile cctools and ld64. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=70&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As a part of my <a href="http://easleyk.wordpress.com/2010/02/09/dxr-getting-started-initial-project-plan/">DXR project work</a> I will have to cross-compile Firefox for Mac and Windows on a Linux box.</p>
<p>I&#8217;m going to start with a Mac build and follow instructions in this <a href="http://weblogs.mozillazine.org/bz/archives/020405.html" target="_blank">blog post</a> in my attempt to build it.</p>
<p>I need to get <a href="http://code.google.com/p/toolwhip/" target="_blank">toolwhip</a> <a href="http://code.google.com/p/toolwhip/source/checkout">source code</a> and compile cctools and ld64. These are the parts of a custom toolchain. To spice things up I will also need <a href="http://www.opensource.apple.com/tarballs/gcc_42/" target="_blank">Apple&#8217;s gcc</a>.</p>
<p><span id="more-70"></span></p>
<p>I will start with cctools following instructions in cctools.README.</p>
<p>To compile cctools:<br />
<code>CC="gcc -m32 -std=gnu99" CFLAGS="-O2" make -f Makefile.linux</code></p>
<p>And it fails:<br />
<code>/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory</code></p>
<p>Google tells me that I need to install <code>glibc-devel</code> package:<br />
<code>yum -y install glibc-devel</code></p>
<p>Second try:<br />
<code>/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.3.2/libgcc_s.so when searching for -lgcc_s<br />
/usr/bin/ld: cannot find -lgcc_s</code></p>
<p>That is great. Linker doesn&#8217;t like libgcc_s.so for some reason.</p>
<p><a href="http://forums.fedoraforum.org/showthread.php?t=208748">A-smarter-than-me-person-over-on-fedora-forums</a> notes that this problem has something to do with compiling 32-bit app on a 64-bit system and suggests that installing GCC compatibility packages <code>compat-libstdc++-33</code> and <code>compat-libstdc++-296</code> should help.</p>
<p>I do not know if this is the case. It looks like I would need to do a lot of extra work on a 64-bit box.</p>
<p><em>&#8220;If the mountain won&#8217;t come to Muhammad, Muhammad must go to the mountain.&#8221;</em></p>
<p>I&#8217;m going to move to 32-bit box.</p>
<p>I&#8217;m back to compiling cctools; this time on a 32-bit box. And&#8230; it compiles just fine. Now I need to install it. I created some folders, symbolic links, and a script as described in <code>cctools.README</code> under installation.</p>
<p>I have no idea if it&#8217;s working or not. Or if I did everything right. But I&#8217;m just going to live with it by now.</p>
<p>Next step is to compile and install <code>ld64</code>. I&#8217;m going to follow instructions in <code>ld64.README</code>.</p>
<p>To compile <code>ld64</code>:<br />
<code>CC="gcc -m32 -std=gnu99" CXX="g++ -m32" CFLAGS="-O2" CXXFLAGS="${CFLAGS}" make -f Makefile.linux</code></p>
<p>And it <a href="http://pastebin.com/f5fe5b209" target="_blank">fails</a>. It cannot find declaration of functions like <code>fopen()</code> which is a part of <code>stdio.h</code>.</p>
<p>This does not make any sense. (Edit: It might be related to gcc 4.4.x <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504946" target="_blank">bug</a>)</p>
<p>Ok, nevermind. I added the following line to <code>/toolwhip-read-only/ld64/src/Options.cpp</code>:</p>
<p><code>#include &lt;stdio.h&gt;</code></p>
<p>I feel as if I&#8217;m fixing my first assignment in <a href="https://cs.senecac.on.ca/%7Eipc144/" target="_blank">IPC144</a>.</p>
<p>This time around <code>Options.cpp</code> compiled fine, but they might have a 1000 + 1 file with similar problems. Did I mention that I like inflicting pain on myself?</p>
<p>I did the same to:<br />
<code>MachOReaderDylib.hpp<br />
MachOWriterExecutable.hpp<br />
MachOReaderRelocatable.hpp</code></p>
<p>Ok, the linker compiled. And I created some folders and links mentioned in <code>ld64.README</code> under installation.</p>
<p>By the way, I have revision 176 of toolwhip. And I compile it with gcc 4.4.2.</p>
<p>The next and hopefully the last step to get this toolchain done is <a href="http://www.opensource.apple.com/tarballs/gcc_42/" target="_blank">Apple&#8217;s gcc</a>. I will work on it later.</p>
<p>I&#8217;m too exhausted<br />
To write any &#8220;Haiku&#8221; right now<br />
Do not even start</p>
<p>Donwload Apple&#8217;s gcc to toolwip directory and patch it:<br />
<code>wget http://www.opensource.apple.com/tarballs/gcc_42/gcc_42-5574.tar.gz<br />
tar -xvzf gcc_42-5574.tar.gz<br />
patch -p0 --verbose -i gcc_42-5574.patch</code></p>
<p>To install it, I&#8217;m going to follow <code>gcc_42-5574.README</code>.</p>
<p>The first thing I need is &#8220;appropriate&#8221; Mac SDKs. I&#8217;m not a Mac user. And I don&#8217;t have Mac to copy SDKs from. So, I wonder which one is <a href="http://developer.apple.com/sdk/" target="_blank">appropriate</a>?</p>
<p>It seems that there are two ways to do it: the easy way and the hard way. The easy way consists of bribing a friendly Mac user to get you a copy of <code>/Developer/SDKs/MacOSX10.5.sdk</code> folder. The hard way consists of downloading <a href="http://developer.apple.com/technology/xcode.html" target="_blank">XCode</a> and getting necessary packages from there.</p>
<p>Since I said earlier that I like inflicting pain on myself, I will go with the hard way.</p>
<p>There are a couple of way to open <code>.dmg</code> files.</p>
<ol>
<li>To <a href="http://baghira.sourceforge.net/dmg.htm" target="_blank">open</a> &#8220;f****** stupid useless .dmg file&#8221; in Linux</li>
<li>To <a href="http://www.acutesystems.com/sharetm.htm" target="_blank">open</a> .dmg file in Windows</li>
<li><a href="http://hem.bredband.net/catacombae/hfsx.html" target="_blank">HFSExplorer</a> for both</li>
</ol>
<p>Once that&#8217;s done, all packages can be found under&#8230; package folder. I&#8217;m going to make a wild guess and say that <code>MacOSX10.5.pkg</code> is the package I need. However, now I&#8217;m stuck with &#8220;f****** stupid useless .pkg file&#8221;. And after long search I found nothing (that actually works) on how to unpack <code>.pkg</code> files outside Mac. (I’m almost waiting for someone to point out, that it’s something simple and obvious).</p>
<p>That leaves me no choice, but to go the easy way:<br />
<code>beer -h friendlyMacUser -o MacOSX10.5.sdk.gz</code></p>
<p>And time to build it.</p>
<p>First problem:<br />
<code>P: lipo: can't open input file: /usr/lib/libSystem.B.dylib (No such file or directory)</code></p>
<p>It&#8217;s looking for this library in the standard folder.</p>
<p><code>S: ln -s /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.B.dylib /usr/lib/libSystem.B.dylib</code></p>
<p>Second problem:<br />
<code>make[3]: execvp: i686-apple-darwin9-ranlib: Permission denied</code></p>
<p>I&#8217;m doing everything as root. However,<code>i686-apple-darwin9-ranlib</code> is a script I created earlier (see <code>cctools.README</code>). And the error has everything to do with a permission of the script.</p>
<p><code>chmod +x /Developer/usr/bin/i686-apple-darwin9-ranlib</code></p>
<p>Third problem:<br />
<code>ld warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libc.dylib, file is not of required architecture<br />
<a href="http://pastebin.com/f371e7ed1" target="_blank">A long list of missing references...</a><br />
</code></p>
<p>This is 9/10 bad on my scale of Bad, because it has <em>everything</em> to do with the <code>MacOSX10.5.sdk</code> files I got from a random Mac.</p>
<p>Below is the content of <code>libc.dylib</code>:<br />
<code>XSym<br />
0015<br />
8ddc754cd3d0fce1cdf43a87f3e54bca<br />
libSystem.dylib</code></p>
<p>It looks like it points to <code>libSystem.dylib</code>, which, in turn, points to <code>libSystem.B.dylib</code>. And <code>libSystem.B.dylib</code> is compiled library.</p>
<p>I think I will have to review build log, find any reference of <code>libSystem.B.dylib</code>, see what objects <code>libSystem.B.dylib</code> is compiled from, and check their source code. Or I can just use <a href="http://linux.about.com/library/cmd/blcmdl1_nm.htm" target="_blank">nm</a>, but this is a Mac library, so it might not work. So, by doing this, I might find out what &#8220;architercute&#8221; it supports, and what I&#8217;m doing wrong.</p>
<p>It figures that nm doesn&#8217;t work after all. It cannot recognize &#8220;dylib&#8221; files. So, the only way is to check the build log.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/easleyk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/easleyk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/easleyk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/easleyk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/easleyk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/easleyk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/easleyk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/easleyk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/easleyk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/easleyk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/easleyk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/easleyk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/easleyk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/easleyk.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=70&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://easleyk.wordpress.com/2010/02/10/cross-compiling-firefox-for-mac-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1954511b5e417b8f14ec1270e09d14ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Konstantin.Novichikhin</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Simple Firefox build&#8221;</title>
		<link>http://easleyk.wordpress.com/2010/02/04/simple-firefox-build/</link>
		<comments>http://easleyk.wordpress.com/2010/02/04/simple-firefox-build/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 17:43:02 +0000</pubDate>
		<dc:creator>Konstantin</dc:creator>
				<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://easleyk.wordpress.com/?p=31</guid>
		<description><![CDATA[I&#8217;m going to attempt to build a firefox on my windows machine. I&#8217;m going to follow &#8220;simple firefox build&#8220;  doc in MDC. First of all, I&#8217;m going to get Mozilla build tools for windows. I&#8217;m running windows 7 and VS2008, so I do not need to worry about .NET Framework. But I will most likely [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=31&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to attempt to build a firefox on my windows machine. I&#8217;m going to follow &#8220;<a href="https://developer.mozilla.org/En/Simple_Firefox_build" target="_blank">simple firefox build</a>&#8220;  doc in MDC.</p>
<p>First of all, I&#8217;m going to get <a href="http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe" target="_blank">Mozilla build tools</a> for windows. I&#8217;m running windows 7 and VS2008, so I do not need to worry about .NET Framework. But I will most likely need some of the windows SDKs.</p>
<p>Mozilla build tools is going to install lots of stuff to &#8220;drive:\mozilla-build&#8221; (by default). Next thing I&#8217;m going to do is to set environment to use VS2008. In cmd under mozilla-build folder execute <code style="font-size:1.2em;">start-msvc9.bat.</code></p>
<p><code style="font-size:1.1em;">C:\mozilla-build&gt;start-msvc9.bat<br />
"Mozilla tools directory: C:\mozilla-build\"<br />
Windows SDK directory: C:\Program Files\Microsoft SDKs\Windows\v6.0A\<br />
Windows SDK version: 6.0A<br />
Setting environment for using Microsoft Visual Studio 2008 x86 tools.<br />
Mozilla build environment: MSVC version 9.</code></p>
<p>I guess, it worked.</p>
<p>Next step is to get the source code. Mozilla uses HG to manage source code (you can get HG <a href="http://mercurial.selenic.com/" target="_blank">here</a>). I&#8217;m going to get the code from the main tree:</p>
<p><code style="font-size:1.1em;">hg clone http://hg.mozilla.org/mozilla-central/</code></p>
<p>I&#8217;m doing it over my college wireless. It&#8217;s probably not the best idea, because there is 1GB of source code data.</p>
<p><code style="font-size:1.1em;">C:\Program Files (x86)\Mercurial&gt;hg clone http://hg.mozilla.org/mozilla-central/<br />
destination directory: mozilla-central<br />
requesting all changes<br />
adding changesets<br />
adding manifests<br />
transaction abort!<br />
rollback completed<br />
abort: connection ended unexpectedly</code></p>
<p>Thought so&#8230; So, first step should have been &#8220;look for a lan cable&#8221;.</p>
<p>Here is a &#8220;haiku&#8221;:</p>
<p>Found a LAN cable<br />
Broadband connection is nice<br />
Very Cold outside</p>
<p>Before I build I have to make sure that there is no spaces in the path to &#8220;make&#8221;. And I have to have a mozconfig file in the build directory.</p>
<p>mozconfig should containt the following lines:<br />
<code style="font-size:1.1em;">. $topsrcdir/browser/config/mozconfig<br />
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-release<br />
mk_add_options MOZ_MAKE_FLAGS="-j4"</code></p>
<p>So now when I have the source code all I have to do is &#8220;make -f client.mk&#8221;. Spirits of my ancestors tell me that &#8220;make&#8221; is a unix program. Here is where <a href="http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe" target="_blank">MozillaBuild</a> comes into play. Under &#8220;drive:\mozilla-build&#8221;, I&#8217;m going to execute &#8220;start-msvc9.bat&#8221; to get a build console. Inside the console I&#8217;m going to execute &#8220;make -f client.mk&#8221; to start compiling firefox.</p>
<p>And SDK version check fails:</p>
<p><code style="font-size:1.1em;">checking for Windows SDK being recent enough... no<br />
configure: error: You are targeting Windows version 0x06010000, but your SDK only supports up to version 0x06000000.</code></p>
<p>It basically requires <a href="https://developer.mozilla.org/En/Windows_SDK_versions#Windows_7_SDK" target="_blank">windows 7 SDK</a>, that can be downloaded <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=71deb800-c591-4f97-a900-bea146e4fae1" target="_blank">here</a>. 3 ISO files, 1500 mb each. I will reduce the world carbon dioxide emissions by not downloading those files. Instead, I&#8217;m going to add &#8220;ac_add_options &#8211;with-windows-version=600&#8243; to mozconfig and see if it works.</p>
<p>I will see you after the brea&#8230; after it builds.</p>
<p>It failed with the following error:</p>
<p>cl : Command line error D8027 : cannot execute &#8216;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\c2.dll&#8217;</p>
<p>I have another &#8220;haiku&#8221;:</p>
<p>Building Firefox<br />
Installing Visual Studio SP1<br />
Not good at all</p>
<p>I let VS2008 SP1 install first and re-started &#8220;make&#8221;. Now, I just need to wait for it to finish.</p>
<p>An hour later the build is finished. Time to test.</p>
<p><code style="font-size:1.1em;">drive:\mozilla-build\mozilla-central\objdir-ff-release\dist\bin\firefox.exe</code></p>
<p style="text-align:center;"><img class="aligncenter" title="Minefield" src="http://img6.imageshack.us/img6/752/minefieldq.jpg" alt="" width="480" height="409" /></p>
<p>Welcome to Minefield</p>
<p style="text-align:center;"><img class="aligncenter" title="Minefield" src="http://img163.imageshack.us/img163/4901/minefieldlogo.jpg" alt="" width="317" height="492" /></p>
<p>Minefield installed<br />
It has not crashed on me<br />
Broken Promises</p>
<p>Overall, it wasn&#8217;t too difficult to do &#8220;simple firefox build&#8221;. The main requirements are keyboard, monitor, and patience&#8230; and a lan cable.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/easleyk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/easleyk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/easleyk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/easleyk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/easleyk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/easleyk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/easleyk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/easleyk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/easleyk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/easleyk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/easleyk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/easleyk.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/easleyk.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/easleyk.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=31&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://easleyk.wordpress.com/2010/02/04/simple-firefox-build/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1954511b5e417b8f14ec1270e09d14ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Konstantin.Novichikhin</media:title>
		</media:content>

		<media:content url="http://img6.imageshack.us/img6/752/minefieldq.jpg" medium="image">
			<media:title type="html">Minefield</media:title>
		</media:content>

		<media:content url="http://img163.imageshack.us/img163/4901/minefieldlogo.jpg" medium="image">
			<media:title type="html">Minefield</media:title>
		</media:content>
	</item>
		<item>
		<title>Student collaboration in CS learning</title>
		<link>http://easleyk.wordpress.com/2010/01/26/student-collaboration-in-cs-learning/</link>
		<comments>http://easleyk.wordpress.com/2010/01/26/student-collaboration-in-cs-learning/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 17:09:14 +0000</pubDate>
		<dc:creator>Konstantin</dc:creator>
				<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://easleyk.wordpress.com/?p=8</guid>
		<description><![CDATA[After reading the article on the Academic source code dust-up symptom of CS education, I can understand Kyle&#8217;s professor position on the matter. Universities and colleges have to have a way to evaluate students&#8217; performance in a course. Aside from exams and mid-terms, students&#8217; performance is mostly evaluated based on their assignment and lab work [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=8&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After reading the article on the <a href="http://arstechnica.com/open-source/news/2009/06/academic-source-code-dust-up-symptom-of-cs-education-ills.ars" target="_blank">Academic source code dust-up symptom of CS education</a>, I can understand Kyle&#8217;s professor position on the matter. Universities and colleges have to have a way to evaluate students&#8217; performance in a course. Aside from exams and mid-terms, students&#8217; performance is mostly evaluated based on their assignment and lab work (at least at the <a href="http://senecac.on.ca" target="_blank">Seneca</a> college). And since those assignments and labs, for the most part, are very specific to the subject, it makes students to do research to solve various problems they encounter.</p>
<p>Now, let&#8217;s say there is a solution out there, that can be copied and will work right away. A honest student wouldn&#8217;t copy it without understanding, but rather review existing solutions, apply them, and get something out of them. Another student would just copy the solution. That student hasn&#8217;t done any work and learnt nothing.</p>
<p>There is middle ground here. Without openly sharing complete solutions, students can discuss and share solutions to specific problems. &#8216;This is how I handled user sessions on my JSP website&#8217; or &#8216;This is how I ported this solution to Windows&#8217;. Students can review each others work and collaborate. So that everybody learns from each others experience in a way that still allows to evaluate all students based on the work they have done in the course.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/easleyk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/easleyk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/easleyk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/easleyk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/easleyk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/easleyk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/easleyk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/easleyk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/easleyk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/easleyk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/easleyk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/easleyk.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/easleyk.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/easleyk.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=easleyk.wordpress.com&amp;blog=11407777&amp;post=8&amp;subd=easleyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://easleyk.wordpress.com/2010/01/26/student-collaboration-in-cs-learning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1954511b5e417b8f14ec1270e09d14ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Konstantin.Novichikhin</media:title>
		</media:content>
	</item>
	</channel>
</rss>
