Posted on Friday, October 19th, 2012  

I recently ran into some problems building the latest Globus Toolkit (5.2.1) from sources on OS X 10.8 Mountain Lion. The compilation aborted with the following error messages:

globus_thread.c:38:18: error: ltdl.h: No such file or directory
globus_thread.c: In function ‘globus_i_thread_pre_activate’:
globus_thread.c:162: error: ‘lt_dlhandle’ undeclared (first use in this function)

and later on:

checking for openssl/opensslv.h... yes
configure: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***

Here’s how to fix these issues and build a clean 64-bit version of Globus:

1. You need to install libtool and OpenSSL. I highly recommend that you use Homebrew to do so:

brew install libtool openssl

2. Next, run ./configure. (GLOBUS_LOCATION) is set to the target installation directory.

./configure --prefix=$GLOBUS_LOCATION  --with-flavor=gcc64

3. Now it’s getting a bit obscure. You will have to change the gssapi-openssh configure script at source-trees/gssapi-openssh/openssh/configure. Find the following lines (around line 10464):

10464
10465
10466
if test -z "$GLOBUS_LDFLAGS" ; then
LIBS="-lcrypto $LIBS"
fi

Remove the if / fi block so that LIBS=”-lcrypto $LIBS” is always evaluated.

4. Now you can run make with LDFLAGS and CPPFLAGS pointing to the OpenSSL package we have installed in step 1:

LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include make

5.  Hopefully, everything was build properly. Run a final make install and you’re done!

Posted on Friday, September 7th, 2012  

Recently, I spent some time getting my head around the Objective-C programming language. To put this into a context: I am experimenting with wrapping the SAGA Python module into an Objective-C framework, so that it can be used from within a Cocoa application. The idea of taking SAGA’s capabilities to interface with heterogeneous distributed systems and combining it with a preppy user interface somehow appeals to me. Yes, I guess I could go off on a rant about the user interfaces that are available to the (scientific) distributed computing community and which haven’t evolved much since the invention of the punched card (ever written a PBS or Condor script?). But I’ll leave this topic for another post.

Anyhow, being a fairly experienced C and C++ programmer, bridging to Python from a C-based language (which, obviously, includes Objective-C) turned out to be easy using the Python/C API. It was no problem to get a quick & dirty C-wrapper prototype going in a jiffy. However, embedding it into an Objective-C framework was a different cup of tea: Objective-C was mostly uncharted seas for me. Its Smalltalk-style object syntax and messaging, was easy enough to get used to after a day or so, however, the intrinsic semantics and usage patterns that I came across while digging through some example code, such as lazy instantiation and heavy use of (synthesized) properties left me somewhat irritated at times. Like any other programming language, Objective-C has a certain “flow” to it, or a “way” it wants to be used. In my experience, this flow is mostly determined by syntax and semantics of a language itself as well as its core libraries (i.e., Foundation Kit), but also by informal conventions and best practices, that have been established over the years by the community.  So I set out to understand the flow of Objective-C a bit better.

Apple provides some good starting points for the apprentice Objective-C programmer, however, most of the stuff found on Apple’s Developer Network is rather lengthy and abstract, so I decided to start looking for some 3rd-party introduction or tutorial on Objective-C that would help me out. After skimming through some not-so-good material that the Google suggested to me, I came across a video podcast that provided exactly what I was looking for :

Stanford University’s: “iPad and iPhone Application Development, taught by Paul Hegarty.

As the title suggests, it is targeted towards the whole iPad / iPhone development thing, but the first few lectures, especially lecture number 3 “Objective-C” was quite enlightened. Granted, if you don’t understand the concept of a class, an object or a pointer, you will be lost within the first five minutes, given the dizzily fast pace in which Paul Hegarty speeds through the various language features. If you do have a good background in C and C++ however, this lecture (or better: the first three lectures) will give you a pretty good idea of how Objective-C is supposed to be used, way beyond pure syntax. It becomes clear that Paul lives and breathes Objective-C. And: it’s easy to follow, entertaining and available for free in the iTunes store. And yes, of course it’s in HD. Give it a try.

Thanks Stanford and Paul Hegarty!