#23675: ufraw-0.16 Build fails on deprecated CMFlattenProfile ------------------------------------------------------------------+--------- Reporter: vincent.lucarelli@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: ufraw, Mac OS X 10.6, Snow Leopard, CMFlattenProfile | Port: ufraw ------------------------------------------------------------------+--------- While trying to build gimp on Snow Leopard, the ufraw port fails to build with the following error: {{{ /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I/opt/port/include -I/opt/port/include -I/opt/port/include/gtk-2.0 -I/opt/port/lib/gtk-2.0/include \ -I/opt/port/include/atk-1.0 -I/opt/port/include/cairo -I/opt/port/include/pango-1.0 -I/opt/port/include/glib-2.0 -I/opt/port/lib/glib-2.0/include \ -I/opt/port/include/pixman-1 -I/opt/port/include/freetype2 -I/opt/port/include/libpng12 \ -I/opt/port/include/glib-2.0 -I/opt/port/lib/glib-2.0/include -I/opt/port/include \ -I/opt/port/include -I/opt/port/include/libpng12 -I/opt/port/include \ -DDCRAW_NOMAIN -DUFRAW_LOCALEDIR=\"/opt/port/share/locale\" -I/opt/port/include \ -O2 -arch x86_64 -fopenmp -MT uf_gtk.o -MD -MP -MF .deps/uf_gtk.Tpo -c -o uf_gtk.o uf_gtk.cc uf_gtk.cc: In function 'void uf_get_display_profile(GtkWidget*, guint8**, gint*)': uf_gtk.cc:297: error: 'CMFlattenProfile' was not declared in this scope make[2]: *** [uf_gtk.o] Error 1 make[2]: *** Waiting for unfinished jobs.... }}} From the header file CMApplication.h {{{ #if !__LP64__ && !TARGET_OS_WIN32 /* This function is deprecated in Mac OS X 10.5. Use CMCopyProfile instead.*/ CSEXTERN CMError CMFlattenProfile( CMProfileRef prof, UInt32 flags, CMFlattenUPP proc, void * refCon, Boolean * preferredCMMnotfound) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5; #endif // !__LP64__ && !TARGET_OS_WIN32 }}} So I tried to build it as a 32-bit port so LP64 wasn't defined. {{{
sudo port -d build ufraw configure.build_arch=i386 }}}
But this fails on the link step because all of ufraw's dependencies were built as 64-bit libraries. One option is to build everything at 32-bit libraries/applications but is there a way to replace the CMFlattenProfile with CMCopyProfile as the header suggests? -- Ticket URL: <http://trac.macports.org/ticket/23675> MacPorts <http://www.macports.org/> Ports system for Mac OS