<?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"
	>

<channel>
	<title>DEAN LEE:/DEV/BLOG &#187; compile</title>
	<atom:link href="http://www.deanlee.cn/tag/compile/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.deanlee.cn</link>
	<description>mount /dev/brain &#124;&#124; tail -f /var/log/thoughts &#62;&#62; /pub/www</description>
	<pubDate>Fri, 30 Dec 2011 13:27:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Compile with /MP flag on my system</title>
		<link>http://www.deanlee.cn/programming/compile-with-mp-flag-on-my-system/</link>
		<comments>http://www.deanlee.cn/programming/compile-with-mp-flag-on-my-system/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 04:50:28 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[/MP]]></category>

		<category><![CDATA[compile]]></category>

		<category><![CDATA[vc2008]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/programming/compile-with-mp-flag-on-my-system/</guid>
		<description><![CDATA[The most interesting feature I like in VC 2008 is the parallel build capability.
The /MP option can reduce the total time to compile the source files on the command line. The /MP option causes the compiler to create one or more copies of itself, each in a separate process. Then these copies simultaneously compile the [...]]]></description>
			<content:encoded><![CDATA[<p>The most interesting feature I like in VC 2008 is the parallel build capability.</p>
<blockquote><p>The <strong>/MP</strong> option can reduce the total time to compile the source files on the command line. The <strong>/MP</strong> option causes the compiler to create one or more copies of itself, each in a separate process. Then these copies simultaneously compile the source files. Consequently, the total time to build the source files can be significantly reduced.</p>
</blockquote>
<p> <span id="more-970"></span>
<p>and here is the screenshot when compiled with /MP flag on an 8 core processor system:</p>
<p><a href="http://www.deanlee.cn/wp-content/uploads/2009/09/image.png" rel="lightbox"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.deanlee.cn/wp-content/uploads/2009/09/image_thumb.png" width="401" height="423" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/programming/compile-with-mp-flag-on-my-system/feed/</wfw:commentRss>
		</item>
		<item>
		<title>inffas32.asm: error A2070: invalid instruction operands</title>
		<link>http://www.deanlee.cn/windows/inffas32asm-error-a2070-invalid-instruction-operands/</link>
		<comments>http://www.deanlee.cn/windows/inffas32asm-error-a2070-invalid-instruction-operands/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 17:28:32 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Windows]]></category>

		<category><![CDATA[a2070]]></category>

		<category><![CDATA[compile]]></category>

		<category><![CDATA[inffas32.asm]]></category>

		<category><![CDATA[vs2005]]></category>

		<category><![CDATA[zlib]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/?p=805</guid>
		<description><![CDATA[I got the following errors while compiling zlib on windows with Visual studio 2005:

1>inffas32.asm(649) : error A2070: invalid instruction operands
1>inffas32.asm(663) : error A2070: invalid instruction operands
1>inffas32.asm(720) : error A2070: invalid instruction operands
these errors are due to an issue with Microsoft Macro Assembler ,included with Visual C++ 2005.it refuses to assemble a MOVD instruction with a [...]]]></description>
			<content:encoded><![CDATA[<p>I got the following errors while compiling <a href="http://www.zlib.net/" target="_blank">zlib </a>on windows with Visual studio 2005:</p>
<pre class="prettyprint">
1>inffas32.asm(649) : error A2070: invalid instruction operands
1>inffas32.asm(663) : error A2070: invalid instruction operands
1>inffas32.asm(720) : error A2070: invalid instruction operands</pre>
<p>these errors are due to an issue with Microsoft Macro Assembler ,included with Visual C++ 2005.it refuses to assemble a MOVD instruction with a memory operand with an implied size, and requires that &quot;dword ptr&quot; prefix the memory operand.</p>
<p>to fix these problems,simply adding<span style="font-style: italic;">&#8221;</span><em>DWORD PTR&#8217; before</em> the operands:</p>
<pre class="prettyprint">
movd mm5,dword ptr [esp+4](649)
movd mm7,dword ptr [esi](663)
movd mm7,dword ptr [esi](720)
</pre>
<p><span id="more-805"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/windows/inffas32asm-error-a2070-invalid-instruction-operands/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Compiler warning C4022 when building OpenSSL 0.9.8e On Windows</title>
		<link>http://www.deanlee.cn/windows/compiler-warning-c4022-when-building-openssl-098e-on-windows/</link>
		<comments>http://www.deanlee.cn/windows/compiler-warning-c4022-when-building-openssl-098e-on-windows/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 10:46:15 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Windows]]></category>

		<category><![CDATA[c4022]]></category>

		<category><![CDATA[compile]]></category>

		<category><![CDATA[openssl]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/windows/compile-errorc4022-when-trying-to-build-openssl-098e-on-windows/</guid>
		<description><![CDATA[I got the following compiler error&#160;when building OpenSSL-0.9.8e in Windows environments with Visual studio 2005:
.\apps\enc.c(380) : error C2220: warning treated as error - no &#8216;object&#8217; file generated
.\apps\enc.c(380) : warning C4022: &#8216;BIO_ctrl&#8217; : pointer mismatch for actual parameter 4
Here is the quick fix to solve this compile error:
Open file .\apps\enc.c,Go to line 380:
if (BIO_read_filename(in,inf ]]></description>
			<content:encoded><![CDATA[<p>I got the following compiler error&nbsp;when building <a href="http://www.openssl.org/" target="_blank">OpenSSL-0.9.8e</a> in Windows environments with Visual studio 2005:</p>
<p>.\apps\enc.c(380) : error C2220: warning treated as error - no &#8216;object&#8217; file generated<br />
.\apps\enc.c(380) : warning C4022: &#8216;BIO_ctrl&#8217; : pointer mismatch for actual parameter 4</p>
<p>Here is the quick fix to solve this compile error:</p>
<p>Open file .\apps\enc.c,Go to line 380:</p>
<pre class="prettyprint">if (BIO_read_filename(in,inf <= 0))
{
	perror(inf);
	goto end;
}</pre>
<p>&nbsp;Change it to</p>
<pre class="prettyprint">if (BIO_read_filename(in,(char*)(inf <= 0)))
{
	perror(inf);
	goto end;
}</pre>
<p>you can download the compiled binary <a href="http://www.deanlee.cn/programming/openssl-for-windows/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/windows/compiler-warning-c4022-when-building-openssl-098e-on-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Compile the new 2.6.17 Linux kernel for IBM ThinkPad T43</title>
		<link>http://www.deanlee.cn/linux/compile-the-new-2617-linux-kernel-for-ibm-thinkpad-t43/</link>
		<comments>http://www.deanlee.cn/linux/compile-the-new-2617-linux-kernel-for-ibm-thinkpad-t43/#comments</comments>
		<pubDate>Thu, 24 Aug 2006 03:06:30 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[compile]]></category>

		<category><![CDATA[IBM]]></category>

		<category><![CDATA[kernel]]></category>

		<category><![CDATA[T43]]></category>

		<category><![CDATA[ThinkPad]]></category>

		<guid isPermaLink="false">http://deanlee.cn:8080/index.php/2006/08/24/compile-the-new-2617-linux-kernel-for-ibm-thinkpad-t43/</guid>
		<description><![CDATA[I just finished compiling the newest 2.6.17 Linux kernel and I am getting much better performance. In what follows, I will show you how to compile and configure the latest kernel for IBM Thinkpad T43.
Before you begin, you will need to get a kernel
Download the 2.6.17 kernel and it&#8217;s performance patch: The 2.6.17 kernel
Latest Kernel [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished compiling the newest 2.6.17 Linux kernel and I am getting much better performance. In what follows, I will show you how to compile and configure the latest kernel for IBM Thinkpad T43.</p>
<p>Before you begin, you will need to get a kernel<br />
Download the 2.6.17 kernel and it&#8217;s performance patch: The 2.6.17 kernel<br />
Latest Kernel Patch</p>
<p>1. Install needed utilities to configure the kernel<br />
sudo apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev<br />
2. Now we are going to move the kernel and unpack it.<br />
sudo cp linux-2.6.16.tar.bz2 /usr/src<br />
3. Now we are going to move to /usr/src<br />
cd /usr/src<br />
4. Now unpack it:<br />
sudo tar -xvjf linux-2.6.17.tar.bz2<br />
5. Rename the folder:<br />
sudo mv linux-2.6.17/ linux-2.6.17ck1<br />
6. Now we are going to remove the link to the linux directory:<br />
sudo rm -rf linux<br />
7. Make a new link to the new kernel:<br />
sudo ln -s /usr/src/linux-2.6.17ck1 linux<br />
8. Move to the Linux directory:<br />
cd /usr/src/linux<br />
9. Make yourself root:<br />
sudo -s -H<br />
10. Apply the performance patch:<br />
bzcat /home/$USER/patch-2.6.17-ck1.bz2| patch -p1<br />
11. Now we are going to import your current kernel configuration:<br />
uname -r<br />
12. Now import it: Make sure to replace the kernel version in this following command from the one from uname -r.<br />
sudo cp /boot/config-2.6.14-ck1 .config<br />
or you can download my .config file,full optmized for IBM T43</p>
<p>13.Configure the kernel:<br />
make xconfig<br />
14. Let&#8217;s build the kernel: Make sure that you are in /usr/src/linux with full root access. Make sure that you are. This will build a debian file that you can install.</p>
<p><span id="more-21"></span>Now, in terminal do the following:<br />
make-kpkg clean<br />
make-kpkg -initrd &#8211;revision=IBM+T43 kernel_image kernel_headers modules_image<br />
Note: You can replace &#8220;IBM+T43&#8243; with anything you want.</p>
<p>15. Install the .deb fine in /usr/src. In terminal do<br />
sudo dpkg -i<br />
Now reboot and you will have a much faster system !</p>
<p>16. Setup the HDAPS (IBM Hard Drive Active Protection System)</p>
<p>HDAPS is already included in kernel 2.6.14 and later,but not loaded by default.in terminal do the following:</p>
<p>sudo modprobe hdaps<br />
sudo echo hdaps >> /etc/modules<br />
sudo reboot</p>
<p>the hdaps is working now,if you having problems,check dmesg :</p>
<p>sudo dmesg |grep hdaps<br />
hdaps: IBM ThinkPad T43 detected.<br />
hdaps: initial latch check good (0&#215;01).<br />
hdaps: device successfully initialized.<br />
input: hdaps as /class/input/input3<br />
hdaps: driver successfully loaded.</p>
<p>17.install the monitor for hdaps<br />
download gnome-tilt at https://sourceforge.net/project/showfiles.php?group_id=138242<br />
in terminal do the following:<br />
sh ./configure<br />
make install</p>
<p>and add the tilt to System->Preference->Sessions->Startup Programs。</p>
<p>16. Colorzing the prompt<br />
This step is very simple. And can be endlessly customized if you so feel.<br />
Code:</p>
<p>cp ~/.bashrc ~/.bashrc_bak<br />
gedit ~/.bashrc</p>
<p>Look for the following:<br />
Code:</p>
<p># set a fancy prompt (non-color, unless we know we &#8220;want&#8221; color)<br />
case &#8220;$TERM&#8221; in<br />
xterm-color)<br />
PS1=&#8217;${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ &#8216;<br />
;;<br />
*)<br />
PS1=&#8217;${debian_chroot:+($debian_chroot)}\u@\h:\w\$ &#8216;<br />
;;<br />
esac</p>
<p># Comment in the above and uncomment this below for a color prompt<br />
PS1=&#8217;${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ &#8216;</p>
<p>and replace it with:<br />
Code:</p>
<p># set a fancy prompt (non-color, unless we know we &#8220;want&#8221; color)<br />
#case &#8220;$TERM&#8221; in<br />
#xterm-color)<br />
# PS1=&#8217;${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ &#8216;<br />
# ;;<br />
#*)<br />
# PS1=&#8217;${debian_chroot:+($debian_chroot)}\u@\h:\w\$ &#8216;<br />
# ;;<br />
#esac</p>
<p># Comment in the above and uncomment this below for a color prompt<br />
PS1=&#8217;${debian_chroot:+($debian_chroot)}\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[00m\]\$ &#8216;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/linux/compile-the-new-2617-linux-kernel-for-ibm-thinkpad-t43/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

