{"id":65,"date":"2009-01-24T10:27:47","date_gmt":"2009-01-24T14:27:47","guid":{"rendered":"http:\/\/www.compdigitec.com\/labs\/?p=65"},"modified":"2009-01-24T10:27:47","modified_gmt":"2009-01-24T14:27:47","slug":"set-of-patches-to-allow-php-gtk2-to-compile-with-php6","status":"publish","type":"post","link":"http:\/\/www.compdigitec.com\/labs\/2009\/01\/24\/set-of-patches-to-allow-php-gtk2-to-compile-with-php6\/","title":{"rendered":"Set of patches to allow PHP-GTK2 to compile with PHP6 (incomplete)"},"content":{"rendered":"<p>If you try to compile PHP-GTK 2.0.1 with PHP 6 (<a href=\"http:\/\/www.compdigitec.com\/packaging\/pack\/php6.0-200901240130.deb\">available at the Compdigitec Packaging Department<\/a>), you will need a series of patches to allow it to compile with PHP 6 because the PHP-GTK generator does not like PHP 6. Here are a set of (incomplete, missing <em>main\/phpg_support.c<\/em>) patches for the PHP-GTK2 generator:<\/p>\n<ul>\n<li>ext\/gtk\/gen_atk.c &#8211; <a href=\"\/labs\/files\/phpgtk.patches\/gen_atk.patch\">patch<\/a>, <a href=\"\/labs\/files\/phpgtk.patches\/gen_atk.c\">patched<\/a><\/li>\n<li>ext\/gtk\/gen_pango.c &#8211; <a href=\"\/labs\/files\/phpgtk.patches\/gen_pango.patch\">patch<\/a>, <a href=\"\/labs\/files\/phpgtk.patches\/gen_pango.c\">patched<\/a><\/li>\n<li>ext\/gtk\/gen_gdk.c &#8211; <a href=\"\/labs\/files\/phpgtk.patches\/gen_gdk.patch\">patch<\/a>, <a href=\"\/labs\/files\/phpgtk.patches\/gen_gdk.c\">patched<\/a><\/li>\n<li>ext\/gtk\/gen_gtk.c &#8211; <a href=\"\/labs\/files\/phpgtk.patches\/gen_gtk.patch\">patch<\/a>, <a href=\"\/labs\/files\/phpgtk.patches\/gen_gtk.c\">patched<\/a><\/li>\n<li>ext\/scintilla\/gen_scintilla.c &#8211; <a href=\"\/labs\/files\/phpgtk.patches\/gen_scintilla.patch\">patch<\/a>, <a href=\"\/labs\/files\/phpgtk.patches\/gen_scintilla.c\">patched<\/a><\/li>\n<li>main\/php_gtk.c &#8211; <a href=\"\/labs\/files\/phpgtk.patches\/php_gtk.patch\">patch<\/a>, <a href=\"\/labs\/files\/phpgtk.patches\/php_gtk.c\">patched<\/a><\/li>\n<\/ul>\n<p>This set of patches is incomplete because the build process will fail on<\/p>\n<blockquote><p>gcc -I\/usr\/dev\/php-gtk-2.0.1\/main -I. -I\/usr\/dev\/php-gtk-2.0.1 -DPHP_ATOM_INC -I\/usr\/dev\/php-gtk-2.0.1\/include -I\/usr\/dev\/php-gtk-2.0.1\/main -I\/usr\/dev\/php-gtk-2.0.1 -I\/usr\/include\/php -I\/usr\/include\/php\/main -I\/usr\/include\/php\/TSRM -I\/usr\/include\/php\/Zend -I\/usr\/include\/php\/ext -I\/usr\/include\/php\/ext\/date\/lib -I\/usr\/include\/glib-2.0 -I\/usr\/lib\/glib-2.0\/include -I\/usr\/include\/gtk-2.0 -I\/usr\/lib\/gtk-2.0\/include -I\/usr\/include\/atk-1.0 -I\/usr\/include\/cairo -I\/usr\/include\/pango-1.0 -I\/usr\/include\/pixman-1 -I\/usr\/include\/freetype2 -I\/usr\/include\/libpng12 -I\/usr\/include\/php -DHAVE_CONFIG_H -g -O0 -Wall -c \/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c\u00a0 -fPIC -DPIC -o main\/.libs\/phpg_support.o<\/p><\/blockquote>\n<p>which it fails with the following output:<\/p>\n<blockquote><p>\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c: In function &#8216;phpg_init_object&#8217;:<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c:275: error: incompatible type for argument 2 of &#8216;zend_hash_find&#8217;<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c: In function &#8216;phpg_register_class&#8217;:<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c:300: error: incompatible types in assignment<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c:328: error: incompatible type for argument 2 of &#8216;zend_hash_find&#8217;<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c:331: error: incompatible type for argument 2 of &#8216;_zend_hash_add_or_update&#8217;<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c: In function &#8216;phpg_register_interface&#8217;:<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c:353: error: incompatible types in assignment<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c: In function &#8216;unset_abstract_flag&#8217;:<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c:486: error: incompatible type for argument 2 of &#8216;zend_hash_quick_exists&#8217;<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c: In function &#8216;phpg_handler_marshal&#8217;:<br \/>\n\/usr\/dev\/php-gtk-2.0.1\/main\/phpg_support.c:565: warning: passing argument 3 of &#8216;zend_is_callable&#8217; from incompatible pointer type<\/p><\/blockquote>\n<p>If you found this article useful or helpful, please help Compdigitec spread the word. Don&#8217;t forget to <a title=\"Subscribe to Compdigitec Labs\" href=\"http:\/\/www.compdigitec.com\/labs\/feed\/\">subscribe to Compdigitec Labs<\/a> for more useful or interesting articles!<\/p>","protected":false},"excerpt":{"rendered":"<p>If you try to compile PHP-GTK 2.0.1 with PHP 6 (available at the Compdigitec Packaging Department), you will need a series of patches to allow it to compile with PHP 6 because the PHP-GTK generator does not like PHP 6. Here are a set of (incomplete, missing main\/phpg_support.c) patches for the PHP-GTK2 generator: ext\/gtk\/gen_atk.c &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[394,158,392,864,393,82,11],"_links":{"self":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts\/65"}],"collection":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":0,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}