Cannot build anymore on Mac OSX

Dirk Hohndel dirk at hohndel.org
Sat Jan 19 07:42:46 PST 2013


On Jan 19, 2013, at 7:34 AM, Henrik Brautaset Aronsen wrote:

> Robert C. Helling wrote:
>> after a git pull origin, subsurface does not build anymore for me on Mac OS Lion. I get
>> 
>> th-nb-tmpmbp02:subsurface Robert.Helling$ PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" make
>> gcc -Wall -Wno-pointer-sign -g  -I/opt/local/include -I/opt/local/include/libxml2 -DHAVE_OSM_GPS_MAP -DMAC_INTEGRATION -D_REENTRANT -I/opt/local/include/gtkmacintegration -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng15   -D_REENTRANT -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng15   -c macos.c
>> macos.c:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
>> macos.c: In function ‘subsurface_icon_name’:
>> macos.c:133: warning: implicit declaration of function ‘gtkosx_application_get_resource_path’
>> macos.c:133: warning: format ‘%s’ expects type ‘char *’, but argument 6 has type ‘int’
>> macos.c: In function ‘subsurface_gettext_domainpath’:
>> macos.c:157: warning: initialization makes pointer from integer without a cast
>> macos.c: In function ‘subsurface_ui_setup’:
>> macos.c:178: error: ‘osx_app’ undeclared (first use in this function)
>> macos.c:178: error: (Each undeclared identifier is reported only once
>> macos.c:178: error: for each function it appears in.)
>> macos.c:178: error: ‘GTKOSX_TYPE_APPLICATION’ undeclared (first use in this function)
>> macos.c:180: warning: implicit declaration of function ‘gtkosx_application_set_menu_bar’
>> macos.c:189: warning: implicit declaration of function ‘gtkosx_application_insert_app_menu_item’
>> macos.c:202: warning: implicit declaration of function ‘gtkosx_application_set_use_quartz_accelerators’
>> macos.c:206: warning: implicit declaration of function ‘gtkosx_application_ready’
>> make: *** [macos.o] Error 1
>> 
> 
> I have the same problem.  I'll try to see if I can work it out.
> 
>> Doing 
>> 
>> sudo port upgrade outdated
>> 
>> didn't help. On the webpage it says I should do 
>> 
>> sudo port install gtk2 +no_x11 +quartz -x11 libusb gtk-osx-application automake autoconf libtool
>> 
>> but that gives an error immediately. Thus I tried 
>> 
>> sudo port install gtk2 +no_x11 -quartz +x11 libusb gtk-osx-application automake autoconf libtool
>> 
>> 
>> that looked better (it does a lot of installing for several minutes) but eventually fails upon installing py27-pygtk.
>> 
> 
> No, building Subsurface on Mac requires quartz support.  What error did you get initially?
> 
> If everything else fails, remove /opt/local and reinstall MacPorts.

I don't think that will help.

gtk-mac-integration (which is what we use to have Subsurface more behave like a Mac app) is maintained by John Ralls who is behind the jhbuild way of building Gtk on the Mac (which has been the 'officially supported' way for a while). So I switched one of my systems over to that and did the commit that Robert identified as the culprit. I hadn't intended to push this out until I had figured out how to make this work with MacPorts. Once you convince MacPorts to install version 2.0 or later of gtk-mac-integration it will all build fine. So do NOT mess with the rest of your MacPorts installation, that's just an incredible waste of time. And the Python build issue is a major PITA. And iconv. And expat. All three of those have native versions on the Mac that are in different states of brokenness (or more fairly put, of "being different"-ness) in different versions of MacOS. Python appears to cause problems with jhbuild as well if you don't build the jhbuild version early on. Anyway, this is all a rather fragile mess if you ask me an I wish I hadn't touched it :-)

So Henrik - can you find out if there is an easy way to get gtk-mac-integration 2.0 or 2.0.1 in MacPorts? If not, I'll revert the commit and will figure out a way to do this that supports both flavors.

/D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4130 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130119/d0a31385/attachment.bin>


More information about the subsurface mailing list