troubles compiling pythonwebkit

Dave somewhere at hotmail.com
Thu Jan 13 14:57:53 EST 2011


Hello Python enthusiasts,
I'm trying to install the "Python Webkit DOM Bindings" 
(http://www.gnu.org/software/pythonwebkit/) but am not successful.

The trouble starts when trying to 'make' pywebkitgtk. I've tried the 
prepatched version and downloading and patching myself. In both case the 
  'make' fails but with different errors.
Here are the steps I performed and the error output.

Thanks for any insight in resolving this problem.

:-)

I'm running Ubuntu 10.04 32bit


<code>
     sudo apt-get remove python-webkit

     sudo apt-get install python-dev
     sudo apt-get install python-ply
     sudo apt-get install autoconf
     sudo apt-get install automake
     sudo apt-get install autotools-dev
     sudo apt-get install bison
     sudo apt-get install flex
     sudo apt-get install gperf
     sudo apt-get install glib-networking  <---E: Couldn't find package 
glib-networking
     sudo apt-get install gtk-doc-tools
     sudo apt-get install libenchant-dev
     sudo apt-get install libgail-dev
     sudo apt-get install libgeoclue-dev
     sudo apt-get install libglib2.0-dev
     sudo apt-get install libgstreamer-plugins-base0.10-dev
     sudo apt-get install libgtk2.0-dev
     sudo apt-get install libicu-dev
     sudo apt-get install libjpeg62-dev
     sudo apt-get install libpango1.0-dev
     sudo apt-get install libpng12-dev
     sudo apt-get install libsoup2.4-dev
     sudo apt-get install libsqlite3-dev
     sudo apt-get install libtool
     sudo apt-get install libxslt-dev
     sudo apt-get install libxt-dev

     sudo apt-get install git-core

     git clone git://git.savannah.gnu.org/pythonwebkit.git
     cd pythonwebkit
     git checkout -b python_codegen
     sudo mkdir build
     cd build
     sudo ../autogen.sh
     sudo ../configure
     sudo make
     sudo make install
     cd ../..

     sudo apt-get install libxslt1-dev
     sudo apt-get install python-gtk2-dev
     sudo apt-get install liblogthread-dev

     git clone git://github.com/lkcl/pywebkitgtk.git
     cd pywebkitgtk
     git checkout -b pythonwebkitgtk_1_1_8
     sudo ./autogen.sh
     sudo ./configure
     sudo make
</code>

     results in the following:

<make output>
     make  all-am
     make[1]: Entering directory `/home/david/Downloads/pywebkitgtk'
     /bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H 
-I.  -I/usr/include/python2.6     -pthread -I/usr/include/libxml2 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
-I/usr/include/pygtk-2.0   -pthread -D_REENTRANT 
-I/usr/local/include/webkit-1.0 -I/usr/local/include/libsoup-2.4 
-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/gio-unix-2.0/ -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 
-I/usr/include/libxml2   -g -O2 -MT webkit/webkit_la-webkitmodule.lo -MD 
-MP -MF webkit/.deps/webkit_la-webkitmodule.Tpo -c -o 
webkit/webkit_la-webkitmodule.lo `test -f 'webkit/webkitmodule.c' || 
echo './'`webkit/webkitmodule.c
     libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/include/python2.6 
-pthread -I/usr/include/libxml2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pygtk-2.0 -pthread 
-D_REENTRANT -I/usr/local/include/webkit-1.0 
-I/usr/local/include/libsoup-2.4 -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/gio-unix-2.0/ 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb 
-I/usr/include/libpng12 -I/usr/include/libxml2 -g -O2 -MT 
webkit/webkit_la-webkitmodule.lo -MD -MP -MF 
webkit/.deps/webkit_la-webkitmodule.Tpo -c webkit/webkitmodule.c  -fPIC 
-DPIC -o webkit/.libs/webkit_la-webkitmodule.o
     libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/include/python2.6 
-pthread -I/usr/include/libxml2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pygtk-2.0 -pthread 
-D_REENTRANT -I/usr/local/include/webkit-1.0 
-I/usr/local/include/libsoup-2.4 -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/gio-unix-2.0/ 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb 
-I/usr/include/libpng12 -I/usr/include/libxml2 -g -O2 -MT 
webkit/webkit_la-webkitmodule.lo -MD -MP -MF 
webkit/.deps/webkit_la-webkitmodule.Tpo -c webkit/webkitmodule.c -o 
webkit/webkit_la-webkitmodule.o >/dev/null 2>&1
     mv -f webkit/.deps/webkit_la-webkitmodule.Tpo 
webkit/.deps/webkit_la-webkitmodule.Plo
     /bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H 
-I.  -I/usr/include/python2.6     -pthread -I/usr/include/libxml2 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
-I/usr/include/pygtk-2.0   -pthread -D_REENTRANT 
-I/usr/local/include/webkit-1.0 -I/usr/local/include/libsoup-2.4 
-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/gio-unix-2.0/ -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 
-I/usr/include/libxml2   -g -O2 -MT 
javascriptcore/webkit_la-javascriptcore_types.lo -MD -MP -MF 
javascriptcore/.deps/webkit_la-javascriptcore_types.Tpo -c -o 
javascriptcore/webkit_la-javascriptcore_types.lo `test -f 
'javascriptcore/javascriptcore_types.c' || echo 
'./'`javascriptcore/javascriptcore_types.c
     libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/include/python2.6 
-pthread -I/usr/include/libxml2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pygtk-2.0 -pthread 
-D_REENTRANT -I/usr/local/include/webkit-1.0 
-I/usr/local/include/libsoup-2.4 -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/gio-unix-2.0/ 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb 
-I/usr/include/libpng12 -I/usr/include/libxml2 -g -O2 -MT 
javascriptcore/webkit_la-javascriptcore_types.lo -MD -MP -MF 
javascriptcore/.deps/webkit_la-javascriptcore_types.Tpo -c 
javascriptcore/javascriptcore_types.c  -fPIC -DPIC -o 
javascriptcore/.libs/webkit_la-javascriptcore_types.o
     libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/include/python2.6 
-pthread -I/usr/include/libxml2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pygtk-2.0 -pthread 
-D_REENTRANT -I/usr/local/include/webkit-1.0 
-I/usr/local/include/libsoup-2.4 -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/gio-unix-2.0/ 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb 
-I/usr/include/libpng12 -I/usr/include/libxml2 -g -O2 -MT 
javascriptcore/webkit_la-javascriptcore_types.lo -MD -MP -MF 
javascriptcore/.deps/webkit_la-javascriptcore_types.Tpo -c 
javascriptcore/javascriptcore_types.c -o 
javascriptcore/webkit_la-javascriptcore_types.o >/dev/null 2>&1
     mv -f javascriptcore/.deps/webkit_la-javascriptcore_types.Tpo 
javascriptcore/.deps/webkit_la-javascriptcore_types.Plo
     /usr/bin/python /usr/share/pygobject/2.0/codegen/createdefs.py 
webkit/webkit.defs ./webkit/webkitdom.defs 
./webkit/webkit-base-types.defs ./webkit/webkit-1.1-types.defs 
./webkit/webkit-1.0.2.defs ./webkit/webkit-1.1.defs
     (/usr/bin/pygobject-codegen-2.0 \
                 --register /usr/share/pygtk/2.0/defs/gdk-types.defs \
                 --register /usr/share/pygtk/2.0/defs/gtk-types.defs \
             --override ./webkit/webkit.override \
             --prefix pywebkit webkit/webkit.defs) 2>&1 > 
webkit/gen-webkit.c | tee webkit/webkit.errors \
         && cp webkit/gen-webkit.c webkit/webkit.c \
         && rm -f webkit/gen-webkit.c
     Warning: Constructor for WebKitWebHistoryItem needs to be updated 
to new API
              See 
http://live.gnome.org/PyGTK_2fWhatsNew28#update-constructors
     ***INFO*** The coverage of global functions is 100.00% (5/5)
     ***INFO*** The coverage of methods is 100.00% (1434/1434)
     ***INFO*** There are no declared virtual proxies.
     ***INFO*** There are no declared virtual accessors.
     ***INFO*** There are no declared interface proxies.
     /bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H 
-I.  -I/usr/include/python2.6     -pthread -I/usr/include/libxml2 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
-I/usr/include/pygtk-2.0   -pthread -D_REENTRANT 
-I/usr/local/include/webkit-1.0 -I/usr/local/include/libsoup-2.4 
-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/gio-unix-2.0/ -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 
-I/usr/include/libxml2   -g -O2 -MT webkit/webkit_la-webkit.lo -MD -MP 
-MF webkit/.deps/webkit_la-webkit.Tpo -c -o webkit/webkit_la-webkit.lo 
`test -f 'webkit/webkit.c' || echo './'`webkit/webkit.c
     libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/include/python2.6 
-pthread -I/usr/include/libxml2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pygtk-2.0 -pthread 
-D_REENTRANT -I/usr/local/include/webkit-1.0 
-I/usr/local/include/libsoup-2.4 -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/gio-unix-2.0/ 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb 
-I/usr/include/libpng12 -I/usr/include/libxml2 -g -O2 -MT 
webkit/webkit_la-webkit.lo -MD -MP -MF webkit/.deps/webkit_la-webkit.Tpo 
-c webkit/webkit.c  -fPIC -DPIC -o webkit/.libs/webkit_la-webkit.o
     webkit/webkit.c: In function 
‘_wrap_webkit_dom_navigator_get_geolocation’:
     webkit/webkit.c:3642: error: ‘WebKitDOMGeolocation’ undeclared 
(first use in this function)
     webkit/webkit.c:3642: error: (Each undeclared identifier is 
reported only once
     webkit/webkit.c:3642: error: for each function it appears in.)
     webkit/webkit.c:3642: error: ‘ret’ undeclared (first use in this 
function)
     webkit/webkit.c: In function ‘pywebkit_register_classes’:
     webkit/webkit.c:32127: error: ‘WEBKIT_TYPE_DOM_GEOLOCATION’ 
undeclared (first use in this function)
     make[1]: *** [webkit/webkit_la-webkit.lo] Error 1
     make[1]: Leaving directory `/home/david/Downloads/pywebkitgtk'
     make: *** [all] Error 2
</make output>


Alternatively I download pywebkitgtk-1.1.8 and extract. I download 
pywebkitgtk-1.1.8.patch to dir just extracted.

<code>
     cd pywebkitgtk-1.1.8
     patch -p 1 < pywebkitgtk-1.1.8.patch
     ./configure
     sudo make
</code>

Results in the following:

<make output>
      cd . && /bin/bash /home/david/Downloads/pywebkitgtk-1.1.8/missing 
--run automake-1.11 --foreign
     aclocal.m4:16: warning: this file was generated for autoconf 2.66.
     You have another version of autoconf.  It may work, but is not 
guaranteed to.
     If you have problems, you may need to regenerate the build system 
entirely.
     To do so, use the procedure documented by the package, typically 
`autoreconf'.
      cd . && /bin/bash ./config.status Makefile depfiles
     config.status: creating Makefile
     config.status: executing depfiles commands
     make  all-am
     make[1]: Entering directory `/home/david/Downloads/pywebkitgtk-1.1.8'
     /bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H 
-I.  -I/usr/include/python2.6     -pthread -I/usr/include/libxml2 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
-I/usr/include/pygtk-2.0   -pthread -D_REENTRANT 
-I/usr/local/include/webkit-1.0 -I/usr/local/include/libsoup-2.4 
-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/gio-unix-2.0/ -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 
-I/usr/include/libxml2   -g -O2 -MT webkit/webkit_la-webkitmodule.lo -MD 
-MP -MF webkit/.deps/webkit_la-webkitmodule.Tpo -c -o 
webkit/webkit_la-webkitmodule.lo `test -f 'webkit/webkitmodule.c' || 
echo './'`webkit/webkitmodule.c
     libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/include/python2.6 
-pthread -I/usr/include/libxml2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pygtk-2.0 -pthread 
-D_REENTRANT -I/usr/local/include/webkit-1.0 
-I/usr/local/include/libsoup-2.4 -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/gio-unix-2.0/ 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb 
-I/usr/include/libpng12 -I/usr/include/libxml2 -g -O2 -MT 
webkit/webkit_la-webkitmodule.lo -MD -MP -MF 
webkit/.deps/webkit_la-webkitmodule.Tpo -c webkit/webkitmodule.c  -fPIC 
-DPIC -o webkit/.libs/webkit_la-webkitmodule.o
     webkit/webkitmodule.c:30:22: error: pywebkit.h: No such file or 
directory
     webkit/webkitmodule.c:37: warning: 'struct pyjoinapi' declared 
inside parameter list
     webkit/webkitmodule.c:37: warning: its scope is only this 
definition or declaration, which is probably not what you want
     webkit/webkitmodule.c: In function 'initwebkit':
     webkit/webkitmodule.c:59: warning: passing argument 2 of 
'webkit_init_pywebkit' from incompatible pointer type
     webkit/webkitmodule.c:37: note: expected 'struct pyjoinapi *' but 
argument is of type 'struct pyjoinapi *'
     make[1]: *** [webkit/webkit_la-webkitmodule.lo] Error 1
     make[1]: Leaving directory `/home/david/Downloads/pywebkitgtk-1.1.8'
     make: *** [all] Error 2
</make output>



More information about the Python-list mailing list