mbouden / pywebkitgtk

Automatically exported from code.google.com/p/pywebkitgtk
Other
0 stars 0 forks source link

Error building on OSX #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Tried to build pywebkitgtk on OS X Leopard 10.5.7 against webkit-gtk
version 1.1.7 installed via MacPorts.

./configure --prefix=/opt/local
make

Produced this error:

libtool: link: gcc -Wl,-undefined -Wl,dynamic_lookup -o .libs/webkit.so
-bundle  webkit/.libs/webkit_la-webkitmodule.o
javascriptcore/.libs/webkit_la-javascriptcore_types.o
webkit/.libs/webkit_la-webkit.o   -L/opt/local/lib
/opt/local/lib/libxslt.dylib /opt/local/lib/libwebkit-1.0.dylib
/opt/local/lib/libgtk-x11-2.0.dylib /opt/local/lib/libsoup-2.4.dylib
/opt/local/lib/libgdk-x11-2.0.dylib /opt/local/lib/libatk-1.0.dylib
/opt/local/lib/libgdk_pixbuf-2.0.dylib
/opt/local/lib/libpangocairo-1.0.dylib /opt/local/lib/libXinerama.dylib
/opt/local/lib/libXi.dylib /opt/local/lib/libXrandr.dylib
/opt/local/lib/libXcursor.dylib /opt/local/lib/libXcomposite.dylib
/opt/local/lib/libXdamage.dylib /opt/local/lib/libpangoft2-1.0.dylib
/opt/local/lib/libXext.dylib /opt/local/lib/libXfixes.dylib
/opt/local/lib/libcairo.dylib /opt/local/lib/libpixman-1.dylib
/opt/local/lib/libpng12.dylib /opt/local/lib/libXrender.dylib
/opt/local/lib/libX11.dylib /opt/local/lib/libXau.dylib
/opt/local/lib/libXdmcp.dylib /opt/local/lib/libpango-1.0.dylib
/opt/local/lib/libfontconfig.dylib /opt/local/lib/libexpat.dylib
/opt/local/lib/libfreetype.dylib /opt/local/lib/libxml2.dylib -lpthread -lz
-lm /opt/local/lib/libgnutls.dylib /opt/local/lib/libgcrypt.dylib
/opt/local/lib/libgpg-error.dylib /opt/local/lib/libgio-2.0.dylib
/opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib
/opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib
/opt/local/lib/libiconv.dylib    -framework Carbon
-Wl,-exported_symbols_list,.libs/webkit-symbols.expsym
ld: duplicate symbol __PyGtk_API in webkit/.libs/webkit_la-webkit.o and
webkit/.libs/webkit_la-webkitmodule.o
collect2: ld returned 1 exit status
make[1]: *** [webkit.la] Error 1
make: *** [all] Error 2

Adding this line to webkit.override above the pygtk/pygtk.h include fixed
the problem and allowed the compilation to continue:
#define NO_IMPORT_PYGTK

But running the demo in demos/tabbed_browser.py produces this error:

Traceback (most recent call last):
  File "demos/tabbed_browser.py", line 30, in <module>
    import webkit
ImportError:
dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5
/site-packages/gtk-2.0/webkit.so,
2): Symbol not found: __ZN7WebCore15PurgeableBuffer13makePurgeableEb
  Referenced from: /opt/local/lib/libwebkit-1.0.2.dylib
  Expected in: dynamic lookup

Which I traced down to here:

https://bugs.webkit.org/show_bug.cgi?id=23057

Which I managed to fix with their attached patch & recompiling webkit-gtk:

--- WebCore/platform/PurgeableBuffer.h.orig
+++ WebCore/platform/PurgeableBuffer.h
@@ -62,7 +62,7 @@ namespace WebCore {
         mutable State m_state;
     };

-#if !PLATFORM(DARWIN) || defined(BUILDING_ON_TIGER) || PLATFORM(QT)
+#if !PLATFORM(DARWIN) || defined(BUILDING_ON_TIGER) || PLATFORM(QT) ||
PLATFORM(GTK)
     inline PurgeableBuffer* PurgeableBuffer::create(const char*, size_t) {
return 0; }
     inline PurgeableBuffer::~PurgeableBuffer() { }
     inline const char* PurgeableBuffer::data() const { return 0; }

Original issue reported on code.google.com by NoDam...@gmail.com on 9 Jun 2009 at 8:50

GoogleCodeExporter commented 8 years ago
The pywebkitgtk-related patch was applied in r134. Thanks. The WebKit bug/patch 
will
be tracked in bugs.webkit.org.

Original comment by jmalo...@gmail.com on 13 Jun 2009 at 7:23