PHP Classes

can't compile succesfully

Recommend this page to a friend!

      GtkMozEmbed Screenshot  >  All threads  >  can't compile succesfully  >  (Un) Subscribe thread alerts  
Subject:can't compile succesfully
Summary:configure error under ubuntu 8.04 with all needed packages
Author:Luis Martinez Ulloa
Date:2008-08-25 13:49:32
Update:2009-09-06 23:08:18

  1. can't compile succesfully   Reply   Report abuse  
Luis Martinez Ulloa - 2008-08-25 13:49:37
I need some explanation because I fail with the steps to compile php-gtk with mozembed.. In other cases I can compile the other extensions but not mozembed.
After the patch, the configure step don't recognize libxul-dev package and skip this extension. Can you tell me how to correct this ?


  2. Re: can't compile succesfully   Reply   Report abuse  
Daniel Anechitoaie - 2008-08-26 06:41:06 - In reply to message 1 from Luis Martinez Ulloa
try to apply patch by hand (that's how i did) and see if it works

start from the beginning
extract php-gtk source, apply patch by hand and then do the rest, ./buildconf
, ./configure --with-mozembed , make && make install

if that doesn't work, maybe you can post the ./configure log somewhere so i can take a look.

  3. Re: can't compile succesfully   Reply   Report abuse  
LiquidIce - 2009-09-06 05:10:58 - In reply to message 2 from Daniel Anechitoaie
Here is how I got this working in Ubuntu 9. Hope this helps someone, as it took me hours to get it right.

sudo apt-get install php5-cli php5-dev libglib2.0-dev libgtk2.0-dev xulrunner-1.9-dev re2c

tar -xzvf php-gtk-2.0.0.tar.gz
cd php-gtk-2.0.0

./configure --with-mozembed
sudo make install

#edit php.ini for your php CLI to include:

export LD_LIBRARY_PATH=/usr/lib/xulrunner-
export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-

  4. Re: can't compile succesfully   Reply   Report abuse  
Luis Martinez Ulloa - 2009-09-06 23:08:19 - In reply to message 3 from LiquidIce
I have now Ubuntu 9.04 with php 5 and php-gtk 2.0.0 working some months ago; the set up of this php extension needs:

* download a copy of php-gtk-2.0.0 sources from,
* install with synaptic php5-dev package and others like above
******PATCH A SYSTEM FILE******* very important:
--begin of bash script file---copy and paste on a file--------------------
FECHA=`date +%Y%m%d%H%M%S`
cd /usr/share/aclocal
cp libtool.m4 libtool.m4.$FECHA
chmod 777 libtool.m4
cat lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 >>libtool.m4
chmod 644 libtool.m4
--end of file-------------------------------------------------------------
run this script with root privileges in gnome-terminal:
sudo bash name_of_file
As you can see this change is reversible because the backup file made

* uncompress the source files in a clean directory
******PATCH SOME SOURCE FILES****** very important:
-patch file---- f60e601e7.txt---------------------------------------------
Index: ext/mozembed/README
RCS file: /repository/php-gtk/ext/mozembed/README,v
retrieving revision 1.2
diff -u -8 -p -r1.2 README
--- ext/mozembed/README 22 Jun 2006 03:11:13 -0000 1.2
+++ ext/mozembed/README 4 May 2008 22:32:47 -0000
@@ -1,11 +1,11 @@
LICENSE: Mozilla Public License / (Optionally LGPL/GPL)

GtkMozembed is a widget that allows you to embed the Mozilla engine in your Gtk+
applications. Check the demos/ directory for sample script(s).

-You need to add the --enable-mozembed switch to your ./configure statement when
+You need to add the --with-mozembed switch to your ./configure statement when
you build PHP-GTK 2 in order to enable this extension.

NOTE: This extension is currently supported only on the *nix platform.
Index: ext/mozembed/config.m4
RCS file: /repository/php-gtk/ext/mozembed/config.m4,v
retrieving revision 1.3
diff -u -8 -p -r1.3 config.m4
--- ext/mozembed/config.m4 28 May 2007 23:53:33 -0000 1.3
+++ ext/mozembed/config.m4 4 May 2008 22:32:47 -0000
@@ -1,27 +1,32 @@
dnl $Id: config.m4,v 1.3 2007/05/28 23:53:33 anant Exp $
dnl config.m4 for mozembed module

define(firefox_required_version, 1.5.0)
define(mozilla_required_version, 1.7.0)
+define(xulrunner_required_version, 1.7.0) #Just a wild guess

PHP_GTK_ARG_WITH(mozembed,for GtkMozEmbed support,
[ --with-mozembed Enable GtkMozEmbed support],no)

dnl first check for firefox, then mozilla
if test "$PHP_GTK_MOZEMBED" != "no"; then
PKG_CHECK_MODULES(MOZEMBED, [firefox-gtkmozembed >= firefox_required_version],
have_mozembed=yes, have_mozembed=no)
if test "$have_mozembed" != "yes"; then
PKG_CHECK_MODULES(MOZEMBED, [mozilla-gtkmozembed >= mozilla_required_version],
have_mozembed=yes, have_mozembed=no)
if test "$have_mozembed" != "yes"; then
- AC_MSG_RESULT([Unable to locate firefox-gtkmozembed version firefox_required_version or mozilla-gtkmozembed version mozilla_required_version or higher: not building])
+ PKG_CHECK_MODULES(MOZEMBED, [xulrunner-gtkmozembed >= xulrunner_required_version],
+ have_mozembed=yes, have_mozembed=no)
+ fi
+ if test "$have_mozembed" != "yes"; then
+ AC_MSG_RESULT([Unable to locate firefox-gtkmozembed version firefox_required_version, mozilla-gtkmozembed version mozilla_required_version, xulrunner-gtkmozembed xulrunner_required_version or higher: not building])
AC_DEFINE(HAVE_MOZEMBED, 1, [mozembed support])
if test "$php_gtk_ext_shared" = "yes"; then
-----------end of file--------------------------------------------------
Apply this patch by hand modifying the files with text editor replacing the needed blocks
* in gnome-terminal:
cd /php_gtk_source_directory
./configure --with-mozembed
sudo make install (only if make was successful)

*modify php.ini (with root permissions) in /etc/php5/cli to include the line:

*in gnome-terminal, run the demo php script within ext/mozembed directory of source to confirm that all is working

I choose for php-gtk2.0.0 because in 2.0.1 I don't have gtkstatusicon class in it

I hope that this can help somebody