Ubuntu22.04平台安装weston

1, github上下载源代码

2, 需要依赖的库

sudo apt install libxkbcommon-dev

sudo apt install libpixman-1-dev

sudo apt install libinput-dev

sudo apt install libcairo2-dev

sudo apt install libjpeg-dev

sudo apt install libjpeg-dev

sudo apt install libwebp-dev

sudo apt install libsystemd-dev

sudo apt install libdbus-1-dev

sudo apt install libseat-dev

3, 编译

(1)meson build

libweston/color-lcms/meson.build:6:1: ERROR: Problem encountered: color-lcms plugin requires lcms2 which was not found. Or, you can use '-Dcolor-management-lcms=false'.

(2)meson build -Dcolor-management-lcms=false

Run-time dependency libva found: NO (tried pkgconfig and cmake)

libweston/backend-drm/meson.build:70:3: ERROR: Problem encountered: VA-API recorder requires libva >= 0.34.0 which was not found. Or, you can use '-Dbackend-drm-screencast-vaapi=false'.

(3)meson build -Dcolor-management-lcms=false -Dbackend-drm-screencast-vaapi=false

Run-time dependency freerdp2 found: NO (tried pkgconfig and cmake)

libweston/backend-rdp/meson.build:9:1: ERROR: Problem encountered: RDP-backend requires freerdp >= 2.3.0 which was not found. Or, you can use '-Dbackend-rdp=false'.

(4)meson build -Dcolor-management-lcms=false -Dbackend-drm-screencast-vaapi=false -Dbackend-rdp=false

Run-time dependency xcb-composite found: NO (tried pkgconfig and cmake)

xwayland/meson.build:34:2: ERROR: Problem encountered: xwayland requires xcb-composite which was not found. Or, you can use '-Dxwayland=false'.

(5) meson build -Dcolor-management-lcms=false -Dbackend-drm-screencast-vaapi=false -Dbackend-rdp=false -Dxwayland=false

Run-time dependency gstreamer-1.0 found: NO (tried pkgconfig and cmake)

remoting/meson.build:17:3: ERROR: Problem encountered: Remoting plugin requires gstreamer-1.0 which was not found. If you rather not build this, set '-Dremoting=false'.

(6) meson build -Dcolor-management-lcms=false -Dbackend-drm-screencast-vaapi=false -Dbackend-rdp=false -Dxwayland=false -Dremoting=false

Run-time dependency libpipewire-0.3 found: NO (tried pkgconfig and cmake)

pipewire/meson.build:12:2: ERROR: Problem encountered: Pipewire plugin requires libpipewire which was not found. If you rather not build this, set '-Dpipewire=false'.

(7) meson build -Dcolor-management-lcms=false -Dbackend-drm-screencast-vaapi=false -Dbackend-rdp=false -Dxwayland=false -Dremoting=false -Dpipewire=false

Run-time dependency pangocairo found: NO (tried pkgconfig and cmake)

clients/meson.build:334:4: ERROR: Problem encountered: weston-editor requires 'pangocairo' which was not found. If you rather not build this, set '-Ddemo-clients=false'.

(8) meson build -Dcolor-management-lcms=false -Dbackend-drm-screencast-vaapi=false -Dbackend-rdp=false -Dxwayland=false -Dremoting=false -Dpipewire=false -Ddemo-clients=false

编译通过:

weston 10.0.93

  User defined options
    backend-drm-screencast-vaapi: false
    backend-rdp                 : false
    color-management-lcms       : false
    demo-clients                : false
    pipewire                    : false
    remoting                    : false
    xwayland                    : false

4, 生成的库

jyc@jimmy:~/01_code/weston/build$ find ./ -name *.so
./kiosk-shell/kiosk-shell.so
./libweston/backend-headless/headless-backend.so
./libweston/renderer-gl/gl-renderer.so
./libweston/libweston-11.so
./libweston/backend-drm/drm-backend.so
./libweston/backend-wayland/wayland-backend.so
./libweston/backend-x11/x11-backend.so
./ivi-shell/hmi-controller.so
./ivi-shell/ivi-shell.so
./fullscreen-shell/fullscreen-shell.so
./desktop-shell/desktop-shell.so
./tests/test-plugin.so
./tests/weston-test-desktop-shell.so
./tests/test-surface-screenshot.so
./tests/test-ivi-layout.so
./compositor/screen-share.so
./compositor/systemd-notify.so
./compositor/libexec_weston.so

5, demo 执行情况

(1)这3个demo可以正常执行

./weston-simple-egl

./weston-simple-shm

./weston-simple-damage

备注:是在wayland平台,xorg平台报以下错误:

./weston-simple-egl
weston-simple-egl: ../clients/simple-egl.c:1157: main: Assertion `display.display' failed.
已放弃 (核心已转储)

(2)这2个demo执行时异常

./weston-simple-dmabuf-egl   -- (当时是在Nvidia显卡环境,没有安装Nvidia驱动)
MESA-LOADER: failed to open nouveau: /usr/local/lib/x86_64-linux-gnu/dri/nouveau_dri.so: cannot open shared object file: No such file or directory (search paths /usr/local/lib/x86_64-linux-gnu/dri, suffix _dri)
failed to load driver: nouveau
MESA-LOADER: failed to open zink: /usr/local/lib/x86_64-linux-gnu/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/local/lib/x86_64-linux-gnu/dri, suffix _dri)
failed to load driver: zink
Warning: zwp_linux_explicit_synchronization_v1 not supported,
         will not use explicit synchronization
create_bo failed

之后将mesa中的nouveau_dri.so*编译处来

./weston-simple-dmabuf-egl
nouveau_drm_screen_create: unknown chipset nv174
MESA-LOADER: failed to open zink: /usr/local/lib/x86_64-linux-gnu/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/local/lib/x86_64-linux-gnu/dri, suffix _dri)
failed to load driver: zink
Warning: zwp_linux_explicit_synchronization_v1 not supported,
         will not use explicit synchronization
create_bo failed

之后又将mesa中的zink_dri.so*编译出来

./weston-simple-dmabuf-egl
nouveau_drm_screen_create: unknown chipset nv174
nouveau_drm_screen_create: unknown chipset nv174
Warning: zwp_linux_explicit_synchronization_v1 not supported,
         will not use explicit synchronization
create_bo failed

备注:记得当时编译zink时,还安装了vdpau, vulkan 等lib库。

./weston-simple-dmabuf-feedback
This client was written with the purpose of manually test Weston's dma-buf feedback implementation. See main() description for more details on how to test this.

weston-simple-dmabuf-feedback: ../clients/simple-dmabuf-feedback.c:1484: create_display: Assertion `display->dmabuf && "error: dma-buf feedback is not supported by compositor"' failed.
已放弃 (核心已转储)

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值