Ubuntu 20.04 X86成功编译运行wayland、wayland-protocols、weston,亲测有效,踩了很多坑,完美解决。

article/2025/10/11 0:41:45

编译前期准备:

1、更换国内源:

#添加阿里源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
#添加清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse multiverse

2、安装依赖:

sudo apt update

sudo apt install python3-pip git ninja-build cmake

sudo apt install meson

sudo apt install g++
pip3 install --user meson
sudo apt install -y libffi-dev libxml2-dev graphviz doxygen xsltproc xmlto

sudo apt-get install libgstreamer-plugins-base1.0-dev
sudo apt-get install libmount-dev
sudo apt-get install libexpat1-dev
sudo apt-get install -y libpipewire-0.2 libgstreamer1.0 libcolord-dev liblcms2-dev libva-dev libsystemd-dev libwebp-dev libjpeg-dev
sudo apt-get install libxkbcommon-x11-dev
sudo apt-get install libpixman-1-dev
sudo apt install libinput-tools xdotool
sudo apt install libinput-dev
sudo apt install libdrm-dev
sudo apt install libcairo-dev
sudo apt install libdbus-1-dev
sudo apt-get install libpam0g-dev
sudo apt-get install libgbm-dev
sudo apt-get install libfreerdp2-dev
sudo apt-get install libxcb-composite0-dev
sudo apt-get install libxcursor-dev
sudo apt-get install libcairo2-dev libpango1.0-dev

3、安装ninja

git clone https://gitee.com/rogerbowu/ninja.git
cd ninja
./configure.py --bootstrap   
cp ./ninja  /usr/bin/

4、配置环境

//安装在某路径下,不安装在系统中,方便引用开发。
export WLD=$HOME/install   
export LD_LIBRARY_PATH=$WLD/lib
export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/
export PATH=$WLD/bin:$PATH

5、默认Ubuntu20.04的cmake是3.16.3,升级到3.17.0即可;

sudo wget https://cmake.org/files/v3.17/cmake-3.17.0-Linux-x86_64.tar.gz
tar -zvxf cmake-3.17.0-Linux-x86_64.tar.gz
sudo mv cmake-3.17.0-Linux-x86_64 /opt/cmake-3.17.0
sudo ln -sf /opt/cmake-3.17.0/bin/* /usr/bin/
cmake --version

6、下载wayland源码,编译

git clone https://gitee.com/ccyin/wayland.git
cd wayland
meson build/ --prefix=$WLD
ninja -C build/ install

7、下载wayland-protocols源码编译

git clone https://gitee.com/openeuler-graphics/wayland-protocols.git
cd wayland-protocols
meson build/ --prefix=$WLD
ninja -C build/ install

8、下载weston源码编译

git clone https://gitee.com/mirrors/weston.git
cd weston

git checkout remotes/origin/master
meson build/ --prefix=$WLD
ninja -C build/ install

9、运行:

export LD_LIBRARY_PATH=/root/install/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH 
export XDG_RUNTIME_DIR=/usr/lib/

cd /root/install/bin
./weston


http://chatgpt.dhexx.cn/article/2bhyELLQ.shtml

相关文章

weston 窗口管理 (1)

窗口管理 (1) 一、概述 在传统嵌入式场景下,通常只会运行一个UI程序,故相当于单窗口程序,无需桌面服务器的介入;在桌面系统下,对于每一个UI程序而言,它们的行为相比于嵌入式场景仍然没有发生改变,其对接的仍然是窗口,只不过在同一个时刻允许多个UI程序同时运行. 无论如何对于…

weston 简介

参考???weston wiki Weston - Gentoo Wiki weston (1): Linux man pages – code.tools Weston-1.12.0 非常详尽,多图慎入:Wayland与Weston简介 - 云社区 - 腾讯云 什么是weston? Wayland是一套display server(Wayland compositor)与…

waylandweston

简单地说,Wayland是一套display server(Wayland compositor)与client间的通信协议,而Weston是Wayland compositor的参考实现。其官网为http://wayland.freedesktop.org/。它们定位于在Linux上替换X图形系统。X图形系统经历了30年左右的发展,其…

weston 1: 编译与运行傻瓜教程

本人Kubuntu版本是22.04 sudo apt-get update sudo apt-get upgrade 进入主目录 cd $HOME/ mkdir install mkdir works vim ~/.bashrc export WLD$HOME/install source ~/.bashrc cd works wayland git clone https://gitlab.freedesktop.org/wayland/wayland.git cd …

weston input 概述

weston input 概述 零、前言 本文描述了有关于 weston (基于 wayland 协议一种显示服务器的实现) 中有关于输入设备管理的部分;为了聚焦于此,本文不会对 weston 整体或 wayland 协议进行过多的阐述. 考虑到读者可能存在不同的需求,采用分层次的描述方式,主要面向以下两类人群…

weston 2: 登录后直接启动weston配置

本人Kubuntu版本是22.04 名词:SDDM(SDDM - Arch Linux 中文维基)显示管理器 配置流程如下: 1.修改配置文件 a.配置.bashrc vim ~/.bashrc //以下内容删除 #export WLD$HOME/install #export LD_LIBRARY_PATH$WLD/lib/x86_64-…

Weston介绍

Weston结构说明 Weston源码结构 clients:wayland显示客户端应用 compositor:合成器进程(服务端),窗体风 格样式处理 libweston:合成器以及客户端渲染处理以及驱动实现方式,以及wayland服务与客户…

Wayland/Weston 启动方式简介

前言 本文简单介绍 Weston 常用的几种 backend 启动方式。目前最新的 Weston 8.0.0 支持如下几种 backend: drm-backendfbdev-backendheadless-backendrdp-backendwayland-backendx11-backend 其中 headless-backend 不带任何 UI 界面,主要用于 westo…

weston设置

weston设置 屏幕旋转180度方法修改标题栏位置启动配置文件 屏幕旋转180度方法 编辑 /etc/xdg/weston/weston.ini文件,增加如下语句 [output] nameDSI-1 transform180其中name为你的显示屏名称,可以通过如下命令来查看显示屏名称: card0-DS…

Weston 窗口管理(2)

窗口管理(2) 本文基于 weston 分支 10.0.2 进行描述. 五、概述 本文为窗口管理(1)的续章,更多站在开发者角度,以 weston 的代码实现讲解窗口管理(1)中所实现的部分业务场景. 六、数据结构 在窗口管理(1)中曾经描述过 weston 具体的分层逻辑,如下: 再进一步可以把 WESTON_LAY…

01-weston 简介

参考​​​​​​weston wiki Weston - Gentoo Wiki weston (1): Linux man pages – code.tools Weston-1.12.0 非常详尽,多图慎入:Wayland与Weston简介 - 云社区 - 腾讯云 什么是weston? Wayland是一套display server(Wayland compos…

disunity的使用

1. 下载并安装好jdk: 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 安装教程:http://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.html 2.下载disunity: https://…

T-digest

目录 算法算法原理空间消耗及错误界限 示例T-digest的建立T-digest的查询 相关链接 上一篇博客中讲述了使用 R a n d o m Random Random算法进行 q u a n t i l e quantile quantile估算,详情可见Random,本博客将讲诉另外一个 q u a n t i l e quantile …

[反编译U3D]Decompile Unity Resources 修正

反编译unity project的资源文件,包括ios,android,pc等,仅供学习使用! 1.disunity Examples 1.1disunityGUI 1.1.2DiunityGUI 使用方法 2.unity3d decompiler 3.UnityAssetsExplorer 反编译unity project的资源文件&…

edit distance 理解

一直没有理解到inert i delete j 的意思。看看图就可以明白了。 对于那道面试题:http://www.careercup.com/question?id6287528252407808 k-palindrome. 最精妙的地方在于只考虑 k 长度以内的改变,这样就可以判断出来了。速度是O(k*n) 1. Definition o…

Tiny-DSOD: Lightweight Object Detection for Resource-Restricted Usages

Y uxi Li1 lyxok1sjtu.edu.cn Jiuwei Li2 jiuwei.liintel.com Weiyao Lin1 wylinsjtu.edu.cn Jianguo Li2 jianguo.liintel.com 1Shanghai Jiao Tong University , China 2Intel Lab China Abstract 近年来,随着深度学习的发展,目标检测技术取得了长足…

android density

为什么要引入dip —The reason for dip to exist is simple enough. Take for instance the T-Mobile G1. It has a pixel resolution of 320x480 pixels. Now image another device, with the same physical screen size, but more pixels, for instance 640x480. This devic…

手游游戏资源提取 (破解、AssetStudio、VGMToolbox、disunity、Il2CppDumper、 .NET Reflector)...

参考: 公主连结 游戏资源提取(解包)简明教程 Unity3D研究院之mac上从.ipa中提取unity3D游戏资源 吾爱破解:记一次unity3d data修改 GitHub:Il2CppDumper 想拿点知名IP的手游素材做点demo,然后搜了下如何能拿到app的素材资源 一 下…

DISN:Deep Implicit Surface Network for High-quality Single-view 3D Reconstruction

时间:2019年 作者:Weiyue Wang ,University of Southern California etc. Abstract: 1.DISN 通过预测基本符号距离场来从二维图像中生成高质量的细节丰富的三维网格; 2.DISN 在二维图像上预测每一个三维点的投影位置&#xff…