Archive for September 10th, 2009

Distributed builds in Xcode

Thursday, September 10th, 2009

Yeah!  After the upgrade to Snow Leopard, I even got the distributed builds in Xcode up and running, so now I’m compiling on four cores (two in my iMac and two on my macbook), not just the two on the machine I’m sitting with.

Distributed build screenshot

Neat!

Earlier I had some problems with this due to different builds of the compilers on the two machines, but now it works.

Of course, I’m not sure if it is even faster to compile this way, with the network overhead and all, but it is nice to see it working at least.

253-277=-24

Installing from CMake+Xcode

Thursday, September 10th, 2009

Ok, I solved the first problem from my previous post, i.e. installing a library from the Xcode project generated by CMake.

The trick is to pick the install target, select the PostBuild rule and select Get Info:

Xcode screenshotthen just add “sudo” to the command there:

sudo screenshotI am not sure if this works if you haven’t run sudo recently, ’cause I don’t know how it will react if it needs to ask for a password, but if you have run sudo recently it should work. Works for me, anyway.

Oh, and you probably want to build the Release version of the target first.  I’m not sure if it will do this for you either, but I had it already compiled when I tried this.

Still haven’t figured out how to build the Documentation Set yet, but I will look into it next time I have the time.

253-276=-23

Xcode and Bio++

Thursday, September 10th, 2009

Ok, first the good news.  In the CVS version of Bio++ there is a CMake build system.  Julien tells me that they are moving to that, so that will be the future of Bio++.

Why is this good news?

Because CMake can build Xcode projects, unlike Automake.  So the CVS version of Bio++ is much easier to work with on OS X.

I still need to fiddle with the generated project files a bit to set the architecture, but aside from that it really is a breeze.

I should probably have a closer look at CMake now to start using that instead of Automake for my own projects.

All I have to figure out now is how to install the libraries from Xcode – I cannot just build the install target since I don’t have permissions for that – and how to build documentation sets.  The latter can be built from Doxygen comments, and I think that I can do that with Xcode and CMake, but I haven’t figured out how yet.

253-275=-22

Don’t underestimate the bandwidth of carrier pidgins

Thursday, September 10th, 2009

Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.

Andrew Tanenbaum

Don’t underestimate the bandwidth of carrier pidgins either!

253-274=-21

Xcode woes

Thursday, September 10th, 2009

I’m trying to get an Xcode project to play with Bio++.  I can compile just fine in the terminal if I use a Makefile, but it is annoying me that I cannot do the same within Xcode.

I’ve debugged the build process and found that the two compiler flags -D_GLIBCXX_DEBUG=1 and -D_GLIBCXX_DEBUG_PEDANTIC=1 are the sinners.

They are supposed to enable some stronger debugging code with assertions and stuff, I think, but if they are enabled I can compile my program just fine but the linker croaks on me.

It probably is something I should worry about since it could be symptoms of a problem in Bio++ (the code I’m compiling isn’t really doing anything except linking with Bio++), but right now I would be happy to just turn the flags off.

Figuring out how to do that took some time as well, but under the Target Info there is a <multiple values> under Preprocessor Macros and if I deleted that the flags went away.

Whether that is good or bad I don’t know, but at least I can build Bio++ applications in Xcode now.

I should probably try to compile the Bio++ source with an Xcode build process at some point.  It is a bit of work to port the Automake file, but if there are some issues that could be brought to light from the debug flags it might be worth it…  Anyway, I’m not up for that today.

253-274=-21