Archive for

July, 2009

...

Verifying Python64 builds

2 comments

At work, I’m migrating over python to our 64bit machines and one thing that I’ve noticed was that there really was no standard python 64bit verification method to ensure the build was really 64bit or not. I’ve read somewhere previously, especially for the Mac OS X crowd, that the LDFLAGS=”-arch x86_64″ flag had to be passed in before building on a 64bit machine.

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:

./configure
make && make test
make install

Surprisingly, I received a segmentation fault when building as well as testing. I’ve never seen this before, but for those of you who are interested, the error message was:

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

The verification step is actually pretty intuitive. An easy test to verify that you’re on a 64bit machine is to find the size of the MAX_INT. Luckily for us, python makes this a very easy verification.

To verify the build, I went on a regular python 32bit machine and I did:

h[1] >>> import sys
h[1] >>> sys.maxint
2147483647

On a 64bit machine, I did:

h[2] >>> import sys
h[2] >>> sys.maxint
9223372036854775807

Clearly, my 64bit installation worked:)

Hope this helps some of you.

python -c ‘print “hello world!” ‘

no comments

And so, we meet again, world. I’ve finally gotten around to registering a home online, installing Wordpress, and ready to share my ideas with the world. I’ve given a lot of topics some thought, and I think I might be able to influence and/or help others with my various migrations.

First, I’d like to thank Canonical for Ubuntu and making my migration from Windows to Linux desktop. Some kinks here, and there, but overall I think that it was pretty flawless. I’ve also started a large push towards using vim as my primary editor, instead of constantly switching between IDEs. I believe Netbeans 6.7 came out, I haven’t had the opportunity to play around with it, but if it was anything like Netbeans 6.5, then hey, that’s +1 for them! What a great IDE, especially with the fantastic jVI extension.

I’ll update various posts here and there with some musings about python (what a language), some software releases, mathematical musings, natural language processing tidbits (including really cool algorithms to generate domain names), and various interesting ideas that I’ve had some time to play around with.

A primary reason for starting up this blog is to share with the world some of my thoughts, improve my writing, and try to contribute to the open source world. I think there’s a lot of work to do and I can NOT wait to start. Well world, I’ll hope to speak to you soon.