[wpe-webkit] What causes symbols to be visible?

Adrian Perez de Castro aperez at igalia.com
Mon Aug 6 05:40:12 PDT 2018

Hello Mark,

On Thu, 2 Aug 2018 23:13:54 +0000, "Salisbury, Mark" <mark.salisbury at hp.com> wrote:
> I'm still using the old WebKit C API, (for example functions like
> WKPageLoadURLRequest).
> However, after updating to tip of tree, none of these functions are visible
> anymore when I try to link a browser using the C API.

We have deprecated and disabled usage of the plain C API in favor of the
GLib-based one. This was done some time before the first official stable
release (version 2.20.0, on May 18th), in order to avoid third party
applications using it because there is no API/ABI stability guarantees
for the old C API.

From our own experience the new GLib API is richer and much more convenient
to use. I would *very strongly* encourage you to port to the new API and use
stable official releases: on top of providing the API/ABI compatibility
promise that one would expect from stable releases, new releases are also
periodically published—including security updates and advisories.

> Only a few misc methods + glib style API methods are exported:
> $ nm -g -D -C libWPEWebKit-0.1.so | grep -v "U " | more
>          w __cxa_finalize
>          w __gmon_start__
>          w _ITM_deregisterTMCloneTable
>          w _ITM_registerTMCloneTable
>          w _Jv_RegisterClasses
> 003eae11 T NetworkProcessMainUnix
>          w __pthread_key_create
>          w pthread_once
> 003f9ebd T StorageProcessMainUnix
> 00408d6d T webkit_application_info_get_name
> 00408c89 T webkit_application_info_get_type
> 00408ddd T webkit_application_info_get_version
> ...
> 0042bdb1 T webkit_window_properties_get_resizable
> 0042bce1 T webkit_window_properties_get_scrollbars_visible
> 0042bc9d T webkit_window_properties_get_statusbar_visible
> 0042bc59 T webkit_window_properties_get_toolbar_visible
> 0042b919 T webkit_window_properties_get_type
> 00441d89 T WebProcessMainUnix
> Both types of functions have __attribute__((visibility("default"))) (I
> checked pre-processor output).
> Old C API functions use WK_EXPORT whereas the new glib API uses WEBKIT_API.
> (But again, they both end up being __attribute__((visibility("default"))).
> I notice that we're compiling and linking with -fvisibility-inlines-hidden,
> but not with -fvisibility=hidden...
> Any ideas?

As mentioned by Konstantin, we are using a linker script to filter which
symbols are ultimately exported by the shared library. While you may be
able to make the symbols from the old C API usable again, note that this
API may change at any moment, and the corresponding headers are *not*
installed anymore.

If there is something you need that is missing from the new GLib-based API,
we would appreciate you filing bugs [1] or sending a message to this mailing
list to request additions to the API. If you can also explain your use-case
it's much more likely that we would look into it :-)

Best regards,


[1] https://bugs.webkit.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-wpe/attachments/20180806/9552e81d/attachment.bin>

More information about the webkit-wpe mailing list