{"id":2210,"date":"2008-12-18T11:41:54","date_gmt":"2008-12-18T02:41:54","guid":{"rendered":"http:\/\/yasu2.prosou.nu\/blog\/index.php\/2008\/12\/18\/build_universal_gtk-2_package\/"},"modified":"2008-12-18T11:41:54","modified_gmt":"2008-12-18T02:41:54","slug":"build_universal_gtk-2_package","status":"publish","type":"post","link":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/2008\/12\/18\/2210\/","title":{"rendered":"Build Universal GTK+-2 Package for Mac"},"content":{"rendered":"<p>** I&#8217;ve given up to build 10.4u libraries on 10.5&#8230; This article is not completed. **<br \/>\nI&#8217;m trying to build a universal GTK+ package for MacOS X 10.4 &#038; 10.4, to release my software. This article is the build log from scratch. My current environment is a PPC Mac mini, running MacOS X 10.4 + XCode 2.5.<br \/>\nNote for Leopard macs: According to <a href=\"http:\/\/lists.apple.com\/archives\/Xcode-users\/2007\/Oct\/msg00693.html\">an article in Apple mailing list<\/a>, &#8220;-mmacosx-version-min=10.4&#8221; is necessary to avoid linking libcrt1.10.5.o when using &#8220;-isysroot \/Developer\/SDKs\/MacOSX10.4u.sdk&#8221;. However, I&#8217;ve given up to build on a Leopard\/Intel MacBook because GTK+ can&#8217;t be built after my 2-days war.<br \/>\n% setenv CFLAGS &#8216;-isysroot \/Developer\/SDKs\/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch ppc -I\/opt\/gtk\/include&#8217; ; setenv CXXFLAGS &#8220;$CFLAGS&#8221; ; setenv LDFLAGS &#8216;-L\/opt\/gtk\/lib -mmacosx-version-min=10.4 -arch ppc -isysroot \/Developer\/SDKs\/MacOSX10.4u.sdk &#8216;; setenv CPPFLAGS &#8216;-I\/opt\/gtk\/include&#8217;<br \/>\n% set path = ( \/opt\/gtk\/bin $path )<br \/>\n% .\/configure &#8211;prefix=\/opt\/gtk &#8211;with-x-includes=\/Developer\/SDKs\/MacOSX10u.sdk\/usr\/X11R6\/include\/ &#8211;with-x-libraries=\/Developer\/SDKs\/MacOSX10.4u.sdk\/usr\/X11R6\/lib\/<br \/>\n(add &#8211;host=i386-apple-darwin8 for i386)<br \/>\npkg-config-0.19 : should be always native since it must executable! I&#8217;ve built for ppc.<br \/>\nlibiconv-1.12<br \/>\ngettext-0.17<br \/>\nlibxml2-2.6.30<br \/>\nglib-2.18.3 : how about &#8220;gtkdoc-rebase: command not found&#8221; error?<br \/>\natk-1.25.2<br \/>\nlibpng-1.2.32<br \/>\njpeg.v6b<br \/>\ntiff-3.8.2<br \/>\npixman-0.13.2<br \/>\nfreetype-2.3.7<br \/>\nfontconfig-2.6.0<br \/>\nrenderext-0.9<br \/>\nlibXrender-0.9.0<br \/>\nlibXft-2.1.13<br \/>\ncairo-1.8.6<br \/>\npango-1.22.4<br \/>\ngtk+-2.4.16<br \/>\nHmm, gtk build stops on Leopard\/i386 Mac: &#8220;gtk-update-icon-cache: The generated cache was invalid.&#8221; This may because of incorrect detection of endianness by glib, however I couldn&#8217;t find the way out.<br \/>\n[ NOTES ]<br \/>\nglib: crosscompiling glib requires a small hack since .\/configure script can&#8217;t run several test programs. see: <a href=\"http:\/\/library.gnome.org\/devel\/glib\/unstable\/glib-cross-compiling.html\">Glib manual<\/a>. Another issue is that we have to have a native glib-genmarshal in PATH (also, genmarshal is required by ATK and some other stuff).<br \/>\nConfiguration for i386 Mac (that I&#8217;ve tested with native build on Leopard) is:<br \/>\nglib_cv_long_long_format=ll<br \/>\nglib_cv_stack_grows=no<br \/>\nglib_cv_uscore=no<br \/>\nac_cv_func_posix_getgrgid_r=yes<br \/>\nac_cv_func_posix_getpwuid_r=yes<br \/>\nac_cv_func_posix_memalign=no<br \/>\nAnd one more thing, make will fail because of an empty command in libtool. This is because global_pipe_symbol is &#8220;&#8221;.  I think this should be:<br \/>\nglobal_pipe_symbol=&#8221;sed -n -e &#8216;s\/^.*[  ]\\\\([BCDEGRST][BCDEGRST]*\\\\)[   ][      ]*_\\\\([_A-Za-z][_A-Za-z0-9]*\\\\)\\$\/\\\\1 _\\\\2 \\\\2\/p'&#8221;<br \/>\nand it looks ok.<br \/>\njpeg-6b: included libtool is too old&#8230; replacing by libtool bundled in MacOS X, but need one more hack.<br \/>\n% cp \/usr\/bin\/glibtool libtool<br \/>\n% vi libtool : allow_undefined_flag=&#8221;$FLAGS&#8221; (a stupid patch but it works :p)<br \/>\n% .\/configure (maybe we don&#8217;t need this)<br \/>\n% .\/configure &#8211;enable-shared &#8211;prefix=\/opt\/gtk<br \/>\nCarbon Framework, libSystem.B.dylib and MacOSX10.4u.sdk problem: <a href=\"http:\/\/www.red-sweater.com\/blog\/246\/missing-link\">http:\/\/www.red-sweater.com\/blog\/246\/missing-link<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>** I&#8217;ve given up to build 10.4u libraries on 10.5&#8230; This article is not completed. ** I&#8217;m try &hellip; <a href=\"https:\/\/yasu2.prosou.nu\/blog\/index.php\/2008\/12\/18\/2210\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Build Universal GTK+-2 Package for Mac&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[9,6],"tags":[],"class_list":["post-2210","post","type-post","status-publish","format-standard","hentry","category-mac","category-unix-"],"_links":{"self":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=2210"}],"version-history":[{"count":0,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2210\/revisions"}],"wp:attachment":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=2210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=2210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=2210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}