Comments (8)
Looks like your wl_egl implementation is incomplete.
from meta-webkit.
Is not being able to load "libcogplatform-fdo.so" a problem?
The symbol wl_egl_window_destroy
appears to be defined in libwayland-egl, and undefined in libWPEBackend-fdo-0.1.
$ nm -D ./usr/lib64/libwayland-egl.so.1 | grep wl_egl_window_destroy
...
0000000000000be0 T wl_egl_window_destroy
$ nm -D ./usr/lib64/libWPEBackend-fdo-0.1.so | grep wl_egl_window_destroy
U wl_egl_window_destroy
So I tried preloading libwayland-egl, and it doesn't complain about the undefined symbol.
# export LD_PRELOAD="/usr/lib64/libwayland-egl.so"
# G_MESSAGES_DEBUG=all cog -P fdo
(cog:10167): Cog-DEBUG: platform_setup: Platform name: fdo
(cog:10167): Cog-DEBUG: platform_setup: Platform plugin: libcogplatform-fdo.so
(cog:10167): Cog-WARNING **: Could not load: libcogplatform-fdo.so (possible cause: Socket operation on non-socket).
(cog:10167): Cog-DEBUG: Instantiating default WPE backend as fall-back.
** (cog:10167): CRITICAL **: WebKitWebViewBackend* webkit_web_view_backend_new(wpe_view_backend*, GDestroyNotify, gpointer): assertion 'backend' failed
(cog:10167): Cog-ERROR **: Could not instantiate any WPE backend.
Trace/breakpoint trap (core dumped)
from meta-webkit.
My build is for ARM64, so I manually updated the ldconfig for the /usr/lib64 directories, and set the LD_PRELOAD for the undefined symbol.
I re-ran cog, and got the following.
# ldconfig /lib /usr/lib /lib64 /usr/lib64
# export COG_URL="/home/root/test.html"
# export LD_PRELOAD="/usr/lib64/libwayland-egl.so"
# export XDG_RUNTIME_DIR=/run/user/root
# cog -P fdo
Wayland: Got a wl_compositor interface
Wayland: Got a wl_seat interface
Wayland: Got an xdg_shell interface
Wayland: Got a wl_shell interface
GBM_INFO::msmgbm_mapper(125)::gbm mapper instantiated
gbm_create_device(156): Info: backend name is: fb
xkbcommon: ERROR: couldn't find a Compose file for locale "C"
Seat caps: Keyboard
Seat name 'default'
New XDG toplevel configuration: (0, 0)
EGLDisplay Initialization failed: EGL_BAD_ALLOC
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
Cog-Message: <file:///home/root/test.html> Load started.
Cog-Message: <file:///home/root/test.html> Loading...
Cog-Message: <file:///home/root/test.html> Loaded successfully.
from meta-webkit.
UPDATE: I switched to the RDK + Wayland backend, and it's working. I couldn't get it working with the FDO backend.
I'm trying to figure out why my wpewebkit won't initialize the display. I'm not an expert in EGL and Weston, so I need some help here.
I have a simple-egl
application running on my Weston display, so I know my display is working. Now I'm looking at the difference between the two initialization styles.
Webkit is doing: eglGetDisplay(...)
and then eglInitialize(...)
simple-egl is doing: weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR, ...)
and then eglInitialize(...)
I did some research on simple-egl.c, and I see that there are two different "styles" to initialize EGL:
https://github.com/wayland-project/weston/blob/master/clients/simple-egl.c#L165
https://github.com/krh/weston/blob/master/clients/simple-egl.c#L127
Which is the "right" one, and why do they differ?
I'm looking at the files in Source/WebCore/platform
, and trying to understand the difference between platform Wayland and platform WPE. What is the fundamental difference between these two, and do they both work with Weston?
grepping for EGL_PLATFORM_WAYLAND_KHR
shows that it exists in graphics/wayland/PlatformDisplayWayland.cpp
but not in graphics/wpe/...
.
This seems to hint to me that I should be using platform Wayland.
from meta-webkit.
It definitely looks like something funny is going on when linking libcogplatform-fdo.so
— there should not be undefined symbols when the library is dlopen()
ed.
The different initialization style for getting the EGL display should be basically equivalent, with weston_platform_get_egl_display
apparently being a wrapper around eglGetPlatformDisplay
which is explicit about the type of display to use. While a plain eglGetDisplay
should choose the correct one automatically, there can be situations in which being explicit may be needed.
From the line that reads GBM_INFO::msmgbm_mapper(125)::gbm mapper instantiated
it looks like you have an Adreno GPU. Can you confirm this? If yes, which model and driver are you using? That would be useful because sometimes EGL implementations behave in slightly different ways, and it may be that in your case it would be needed to use eglGetPlatformDisplay
to be explicit about the kind of display we want to use.
from meta-webkit.
As a matter of fact, it would be indeed a good idea to use eglGetPlatformDisplay
when it's available, so I have filed an issue for that: Igalia/cog#64 — note that I do not know if that will be enough to fix your issue, but it should at least help to make sure EGL is being initialized in the way we need it.
from meta-webkit.
It definitely looks like something funny is going on when linking libcogplatform-fdo.so — there should not be undefined symbols when the library is dlopen()ed.
I think that was fixed by ldconfig. I was manually pushing the libraries to target, instead of using the Yocto images. Once I reloaded the ldconfig cache, the problem went away.
it looks like you have an Adreno GPU. Can you confirm this? If yes, which model and driver are you using?
It's an Adreno 306, and the driver is new, but soon to be released. I've been working closely with the GPU team to make sure our driver "just builds" with webkit, and other OS libraries. So far so good, as I can build webkit against our driver without any modifications.
Thanks for the help.
from meta-webkit.
@mrstinky Glad you got the issue solved. I still is a good idea to use eglGetPlatformDisplay
where available, so it has been valuable that you have stopped by and reported the issue to make me think about that. Thanks!
Also: I am looking forward to having an Adreno driver with Wayland support, that will be great!
from meta-webkit.
Related Issues (20)
- Cog with drm frame buffer on Intel not working HOT 3
- Network freeze observed through websocket client running on page HOT 5
- cog not working on hardknott HOT 10
- vpu acceleration not working on kirkstone for a i.mx8 mini HOT 1
- no pointer mouse in kirkstone? HOT 4
- get_drm_fd error on stm32 HOT 9
- video src=rtsp:// HOT 5
- wpewebkit 2.38.4 build failure HOT 5
- WebkitGTK issue with libmanette dependency HOT 1
- core-image-weston build failure when adding wpewebkit and cog to IMAGE_INSTALL in local.conf HOT 2
- CMake configure error wpewebkit.2.40.1, AVIF (libavif) not found HOT 3
- `libavif` does not build with LLVM/clang as the default toolchain HOT 4
- EGL_NOT_INITIALIZED issue HOT 24
- Error when building cog and webkitgtk HOT 2
- Error while loading shared libraries: libwebkit2gtk-4.0 HOT 2
- When drawing a pixel, also the pixel above is impacted HOT 1
- Very disturbed output? HOT 3
- Start Cog as Service HOT 3
- Re-add the 0001-FELightningNEON.cpp-fails-to-build-NEON-fast-path-se.patch HOT 3
- RDEPENDS in the old override syntax
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meta-webkit.