Saturday, May 10, 2008

Compiling hfstar on Mac OS X 10.5 Leopard

Oh joy, trying to compile old stuff on a new system. This article describes the hoops I had to jump through before being able to compile hfstar on Mac OS X 10.5 Leopard successfully.

The first problem, before even running the configure script, is that one of the authors, François Pinard, puts his name in the source code in ISO-8859-1 encoding. It needs to be specified when generating gettext .po files. Edit the file po/Makefile.in.in, find the line that reads something like this:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
And add another option, --from-code=iso-8859-1 after --keyword=N_.

Next, please make sure you have GNU sed installed, and make sure it's in the path searched before the stock /usr/bin/sed, which hangs on processing po/tar.pot file because of the alien character set.

Then, the configure script suffers a problem where .dSYM extension causes gcc to think that it's building a bundle. But it is not. It prevents configure script to detect many functions as present, which makes use of the lib/ compatibility functions. This leads to some catastrophic results (prototype not entirely compatible, conflicting qualifiers, etc.). The fix is to add ac_cv_exeext='' before the configure invocation:
ac_cv_exeext='' configure --prefix=... --program-transform-name=s,tar,hfstar,
And the usual make, make install should work.

Tuesday, May 6, 2008

Where to find real-time Linux kernels...

... for the distros that I use.
  • Ubuntu Hardy: the rt flavor is based on Ubuntu kernel (not vanilla) with preempt and real-time patches and appropriate config options. It should work for any Ubuntu derivatives.
  • CentOS 5 (provided by PlanetCCRMA): again, they seem to use a CentOS kernel with the preempt and real-time patches and appropriate config options. Works for BU Linux.
That's all for now.