Thursday, March 29, 2007

boosting your c++ apps

Boost seems to be the answer to most of my prayers when it comes to getting some extended C++ help. But there is one thing that is totally unknown to me and that is how to understand "bjam". Now I was trying to compile boost on a 64bit system and by default the compilation results in 32bit shared objects. Tried high and low to search for someone who managed to get it compiled in 64bit but well I couldnt, maybe because boost shows up as something else on google :)

Anyways here is the simple way to do it.

(get into the tools/build/jam_src dir)
./build.sh
(go back to the boost home dir)
./tools/build/jam_src/bin.solarisx86/bjam -sTOOLS="gcc" -sBUILD=" < cxxflags > -m64 < linkflags > -m64"


Now if you want to go ahead and use the sun studio compilers you need to do this

(get into the tools/build/jam_src dir)
./build.sh sunpro
(go back to the boost home dir)
./tools/build/jam_src/bin.solaris/bjam -sBUILD=" < threading > multi < runtime-link > dynamic
< cxxflags > -xarch=native64" -sTOOLS="sunpro"
-sSUNPRO_CXX="/opt/SUNWspro/bin/CC -library=stlport4 -xarch=native64"
-sSUNPRO_ROOT_DIRECTORY="/opt/SUNWspro/"


Now you should have a working 64bit copy of all the boost libraries.

Wednesday, March 28, 2007

Opensolaris installed. What next?

Done with the solaris installation and want to play around now. Here are some of the sites that I use to learn more about my favourite OS.
http://developers.sun.com/sunstudio/articles/amd64_migration.html - tips on migrating code from x86 to x64 and some tips on moving from gcc to sunstudio
http://blogs.sun.com/rie/date/20061219 - on why ld cant exactly locate _init and _fini
http://blogs.sun.com/sga/ - tips and tricks for getting boost c++ libs going
http://forum.java.sun.com/thread.jspa?threadID=5075258&messageID=9274275 - getting started with dtrace on available binaries
http://prefetch.net/articles/dtracecookbook.html - collection mechanisms/tools and what do they exactly display
http://blogs.sun.com/brendan/ - brendan gregg's cool dtrace toolbox and all his other gyan on zones, zfs and more
http://solaris.reys.net/english/categories/3-DTrace/P4.html - cool dtrace guy with some nift tricks other than those from Brendan Gregg


Tuesday, March 20, 2007

Yippe Yaah!!

Ian Murdoch, the founder of the extremely popular Debian system, has just picked up an offer from Sun Microsystems. He will be joining them towards aligning the strategy of the company towards fighting the competitive edge that linux has ( and yes it does have an edge on things like drivers and usability features ). Maybe fighting is not the right word but aligning is.

Ian has been supportive of the Debian/Ubuntu packaged OpenSolaris distro -Nexenta and has giving his reasoning on his blog. He essentially beleives that open source under any license serves the end goal of being better for the community eventually. Ofcourse the blinded and half baked comments of the so called Linux gurus on his site show how much people are blinded by their incomplete facts based faith.

There's no doubt that he is good, the bonus is that he has a soft spot for Sun too. And the fact that Sun is actually hiring such a guy shows that Sun is really fighting hard to make sure it understands all the aspects of the open source game and Ian is just the right kinda person to help.