[webkit-dev] webkit #16401

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Jun 9 01:39:41 PDT 2009


[hiya sean, moving this to webkit-dev as other people may benefit from
it, hope you don't mind]

On 6/9/09, Sean Neilan <sean at seanneilan.com> wrote:
> I'm almost there!
> sneilan at myhost:~/Desktop$ gcc main.c -o main `pkg-config --cflags --libs
> webkit-1.0`
> main.c: In function ‘print_attribute’:
>  main.c:191: warning: passing argument 2 of
> ‘gdom_named_node_map_get_named_item’ discards qualifiers
> from pointer target type
> /usr/local/include/webkit-1.0/gdom/GdomNamedNodeMap.h:42:
> note: expected ‘gchar *’ but argument is of type ‘const gchar *’
>  main.c:191: warning: assignment from incompatible pointer type
>

 ok - that means that you've successfully linked etc. and that the
webkit-1.0 pkg-config is picking up header files _probably_ from the
right location.

 i assume you didn't do ./configure with a "--prefix=/usr" option
somewhere, which would mean that your locally-compiled version of
webkit has ended up by default in /usr/local/lib and the headers in
/usr/local/include/webkit-1.0


>
> sneilan at myhost:~/Desktop$ ./main
>
>
>  ./main: symbol lookup error: ./main: undefined symbol:
> webkit_web_frame_get_dom_document

ok - that means that you likely have two versions of the webkit
library on your system.  you successfully compiled against the first,
which has the gdom bindings functions in it (hence no compile
warnings) but, if you look in /etc/ld.so.conf you'll likely find that
/usr/local/lib isn't first.

consequently, and because the revision number is the same, it is
likely that when the test app ran, it picked up the version of
libwebkit-1.0.0 in /usr/lib, which of course doesn't have
webkit_web_frame_get_dom_document in it and so the error is expected
behaviour as per the setup.

here's a few solutions:

1) remove the system-wide version of webkit from /usr/lib
2) edit ld.so.conf to put /usr/local/lib first (i _think_ this works...)
3) there might be some tricks you can play with LD_LIBRARY_PATH
4) re-run autogen.sh or just configure with --prefix=/usr and make install

bear in mind that this will _overwrite_ the system-wide version of
webkit so only do this if it won't interfere with anything you're
already using.

other people may be able to recommend some other tricks - but first
can you confirm that you indeed have two versions of webkit installed?

l.


More information about the webkit-dev mailing list