<?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>pushin&#039; and poppin&#039; your eax &#187; verification</title>
	<atom:link href="http://blog.mahmoudimus.com/tag/verification/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mahmoudimus.com</link>
	<description>a hacker&#039;s moleskine</description>
	<lastBuildDate>Sat, 24 Dec 2011 00:13:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Verifying Python64 builds</title>
		<link>http://blog.mahmoudimus.com/2009/07/verifying-python64-builds/</link>
		<comments>http://blog.mahmoudimus.com/2009/07/verifying-python64-builds/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 15:24:01 +0000</pubDate>
		<dc:creator>mahmoud</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[32bit]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[verification]]></category>

		<guid isPermaLink="false">http://blog.mahmoudimus.com/?p=10</guid>
		<description><![CDATA[At work, I&#8217;m migrating over python to our 64bit machines and one thing that I&#8217;ve noticed was that there really was no standard python 64bit verification method to ensure the build was really 64bit or not. I&#8217;ve read somewhere previously, especially for the Mac OS X crowd, that the LDFLAGS=&#8221;-arch x86_64&#8243; flag had to be [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>At work, I&#8217;m migrating over <a title="Python" href="http://www.python.org/" target="_blank">python </a>to our 64bit machines and one thing that I&#8217;ve noticed was that there really was no standard python 64bit verification method to ensure the build was really 64bit or not. I&#8217;ve read <a title="somewhere" href="http://www.corepy.org/wiki/index.php?title=How_To_Build_a_64-bit_Python_and_use_Corepy/x86_64_on_OSX" target="_blank">somewhere</a> previously, especially for the Mac OS X crowd, that the LDFLAGS=&#8221;-arch x86_64&#8243; flag had to be passed in before building on a 64bit machine.</p>
<p>It looks like python2.6 changed the way it was required to build respective 64bit binaries. To build on standard linux x86_64 architecture, the following standard steps to installing on a 64bit machine worked for me:</p>
<pre class="brush: bash; title: ;">
./configure
make &amp;&amp; make test
make install
</pre>
<p>Surprisingly, I received a segmentation fault when building as well as testing. I&#8217;ve never seen this before, but for those of you who are interested, the error message was:</p>
<pre class="brush: bash; title: ;">
Parser/pgen ./Grammar/Grammar ./Include/graminit.h ./Python/graminit.c
make: *** [Include/graminit.h] Segmentation fault
Parser/pgen ./Grammar/Grammar ./Include/graminit.h ./Python/graminit.c
make: *** [Python/graminit.c] Segmentation fault
</pre>
<p>The verification step is actually pretty intuitive. An easy test to verify that you&#8217;re on a 64bit machine is to find the size of the MAX_INT. Luckily for us, python makes this a very easy verification.</p>
<p>To verify the build, I went on a regular python 32bit machine and I did:</p>
<pre class="brush: python; title: ;">
h[1] &gt;&gt;&gt; import sys
h[1] &gt;&gt;&gt; sys.maxint
2147483647
</pre>
<p>On a 64bit machine, I did:</p>
<pre class="brush: python; title: ;">
h[2] &gt;&gt;&gt; import sys
h[2] &gt;&gt;&gt; sys.maxint
9223372036854775807
</pre>
<p>Clearly, my 64bit installation worked:)</p>
<p>Hope this helps some of you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mahmoudimus.com/2009/07/verifying-python64-builds/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

