29 February 2012

GTK+ OS X Lion troubles

While building GTK+ for Mac OS X on Lion, I've run into the next problem:

when running
~/.local/bin/jhbuild shell

I've got an error:
Traceback (most recent call last):
File "/Users/uko/Source/jhbuild/jhbuild/config.py", line 212, in load
execfile(self.filename, config)
File "/Users/uko/.jhbuildrc", line 510, in <module>
execfile(_userrc)
File "/Users/uko/.jhbuildrc-custom", line 112, in <module>
if _osx_version.startswith("8"):
AttributeError: 'float' object has no attribute 'startswith'
jhbuild: could not load config file

The solution was hard to find, but it seems all you need to do is edit ~/.jhbuildrc-custom and replace
_target = None;
if _osx_version.startswith("8"):
_target = "10.4"
elif _osx_version.startswith("9"):
_target = "10.5"
elif _osx_version.startswith("10"):
_target = "10.6"
elif _osx_version.startswith("11"):
_target = "10.7"

with just
_target = "10.7"

voila :)

1 comment: