Ubuntu22.04平台安装mesa
1,环境准备
1,在Ubuntu22.04的环境下编译安装Mesa22版本的全过程。
2,以下面编译选项为依据:
meson build -Degl=true --buildtype debug -Dplatforms=x11 -Dgallium-drivers=swrast
3,编译mesa22版本时依赖的所有依赖库的顺序:
sudo apt install meson
sudo apt-get install pkg-config
sudo apt-get install cmake
sudo apt-get install zlib1g-dev
sudo apt-get install libzstd-dev
sudo apt-get install libexpat1-dev
sudo apt install libdrm-dev
sudo apt install llvm
sudo apt install libelf-dev
sudo apt install valgrind
sudo apt install bison
sudo apt install flex
如果上面的编译选项需要支持wayland平台,比如 meson build -Degl=true --buildtype debug -Dplatforms=x11,wayland -Dgallium-drivers=swrast
编译到此处时还需要安装wayland协议相关的依赖库。包括以下3个:wayland-scanner,wayland-protocol,wayland-egl-backend
(1)sudo apt install libwayland-dev
(2)wayland-protocol 没有找到直接解决的命令,采样的是源码编译的方式。github上下载 wayland-protocols库的源码, meson build 和 ninja -C build install 可解决该依赖项。
(3)sudo apt install libwayland-egl-backend-dev
sudo apt install libx11-dev
sudo apt install libxext-dev
sudo apt install libxfixes-dev
sudo apt install libxcb-glx0-dev
sudo apt install libxcb-shm0-dev
sudo apt install libx11-xcb-dev
sudo apt install libxcb-dri2-0-dev
sudo apt install libxcb-dri3-dev
sudo apt install libxcb-present-dev
sudo apt install libxshmfence-dev
sudo apt install libxxf86vm-dev
sudo apt install libxrandr-dev
至此,可以解决上面的所有依赖项,完成mesa源码的编译。
2, mesa编译过程
(1) 下载源码
sudo apt install meson
meson build -Degl=true --buildtype debug -Dplatforms=x11 -Dgallium-drivers=swrast
meson build -Degl=true --buildtype debug -Dplatforms=x11,wayland -Dgallium-drivers=swrast
meson build --reconfigure -Degl=true --buildtype debug -Dplatforms=x11,wayland -Dgallium-drivers=swrast
(2)编译成功
meson build 成功时的打印:
WARNING: Library target 'EGL' has 'name_prefix' set. Compilers may not find it from its '-lEGL' linker flag in the 'egl.pc' pkg-config file.
WARNING: Library target 'EGL' has 'name_prefix' set. Compilers may not find it from its '-lEGL' linker flag in the 'egl-uninstalled.pc' pkg-config file.
Message: Configuration summary:
prefix: /usr/local
libdir: lib/x86_64-linux-gnu
includedir: include
OpenGL: yes (ES1: yes ES2: yes)
OSMesa: no
DRI platform: drm
DRI drivers: no
DRI driver dir: /usr/local/lib/x86_64-linux-gnu/dri
GLX: DRI-based
EGL: yes
EGL drivers: builtin:egl_dri2 builtin:egl_dri3
EGL/Vulkan/VL platforms: x11 surfaceless drm xcb
GBM: yes
GBM backends path: /usr/local/lib/x86_64-linux-gnu/gbm
Vulkan drivers: amd intel swrast
Vulkan ICD dir: share/vulkan/icd.d
llvm: yes
llvm-version: 13.0.1
Gallium drivers: swrast
Gallium st: mesa
HUD lmsensors: no
Shared-glapi: yes
Perfetto: no
Perfetto ds: auto
Build targets in project: 193
NOTICE: Future-deprecated features used:
* 0.55.0: {'ExternalProgram.path'}
* 0.56.0: {'meson.source_root'}
mesa 22.1.2
User defined options
buildtype : debug
egl : true
gallium-drivers: swrast
platforms : x11
Found ninja-1.10.1 at /usr/bin/ninja
(3)安装成功
ninja -C build install
ninja: Entering directory `build'
[1/2] Installing files.
Installation failed due to insufficient permissions.
Attempting to use polkit to gain elevated privileges...
Installing src/mapi/shared-glapi/libglapi.so.0.0.0 to /usr/local/lib/x86_64-linux-gnu
Installing symlink pointing to libglapi.so.0.0.0 to /usr/local/lib/x86_64-linux-gnu/libglapi.so.0
Installing symlink pointing to libglapi.so.0 to /usr/local/lib/x86_64-linux-gnu/libglapi.so
Installing src/mapi/es1api/libGLESv1_CM.so.1.1.0 to /usr/local/lib/x86_64-linux-gnu
Installing symlink pointing to libGLESv1_CM.so.1.1.0 to /usr/local/lib/x86_64-linux-gnu/libGLESv1_CM.so.1
Installing symlink pointing to libGLESv1_CM.so.1 to /usr/local/lib/x86_64-linux-gnu/libGLESv1_CM.so
Installing src/mapi/es2api/libGLESv2.so.2.0.0 to /usr/local/lib/x86_64-linux-gnu
Installing symlink pointing to libGLESv2.so.2.0.0 to /usr/local/lib/x86_64-linux-gnu/libGLESv2.so.2
Installing symlink pointing to libGLESv2.so.2 to /usr/local/lib/x86_64-linux-gnu/libGLESv2.so
Installing src/intel/vulkan/intel_icd.x86_64.json to /usr/local/share/vulkan/icd.d
Installing src/intel/vulkan/libvulkan_intel.so to /usr/local/lib/x86_64-linux-gnu
Installing src/amd/vulkan/libvulkan_radeon.so to /usr/local/lib/x86_64-linux-gnu
Installing src/amd/vulkan/radeon_icd.x86_64.json to /usr/local/share/vulkan/icd.d
Installing src/gbm/libgbm.so.1.0.0 to /usr/local/lib/x86_64-linux-gnu
Installing symlink pointing to libgbm.so.1.0.0 to /usr/local/lib/x86_64-linux-gnu/libgbm.so.1
Installing symlink pointing to libgbm.so.1 to /usr/local/lib/x86_64-linux-gnu/libgbm.so
Installing src/gallium/targets/dri/libgallium_dri.so to /usr/local/lib/x86_64-linux-gnu/dri
Installing src/gallium/targets/lavapipe/libvulkan_lvp.so to /usr/local/lib/x86_64-linux-gnu
Installing src/gallium/targets/lavapipe/lvp_icd.x86_64.json to /usr/local/share/vulkan/icd.d
Installing src/glx/libGL.so.1.2.0 to /usr/local/lib/x86_64-linux-gnu
Installing symlink pointing to libGL.so.1.2.0 to /usr/local/lib/x86_64-linux-gnu/libGL.so.1
Installing symlink pointing to libGL.so.1 to /usr/local/lib/x86_64-linux-gnu/libGL.so
Installing src/egl/libEGL.so.1.0.0 to /usr/local/lib/x86_64-linux-gnu
Installing symlink pointing to libEGL.so.1.0.0 to /usr/local/lib/x86_64-linux-gnu/libEGL.so.1
Installing symlink pointing to libEGL.so.1 to /usr/local/lib/x86_64-linux-gnu/libEGL.so
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/KHR/khrplatform.h to /usr/local/include/KHR
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES/egl.h to /usr/local/include/GLES
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES/gl.h to /usr/local/include/GLES
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES/glext.h to /usr/local/include/GLES
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES/glplatform.h to /usr/local/include/GLES
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES2/gl2.h to /usr/local/include/GLES2
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES2/gl2ext.h to /usr/local/include/GLES2
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES2/gl2platform.h to /usr/local/include/GLES2
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES3/gl3.h to /usr/local/include/GLES3
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES3/gl31.h to /usr/local/include/GLES3
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES3/gl32.h to /usr/local/include/GLES3
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES3/gl3ext.h to /usr/local/include/GLES3
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GLES3/gl3platform.h to /usr/local/include/GLES3
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GL/gl.h to /usr/local/include/GL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GL/glcorearb.h to /usr/local/include/GL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GL/glext.h to /usr/local/include/GL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GL/glx.h to /usr/local/include/GL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GL/glxext.h to /usr/local/include/GL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/EGL/egl.h to /usr/local/include/EGL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/EGL/eglext.h to /usr/local/include/EGL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/EGL/eglplatform.h to /usr/local/include/EGL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/EGL/eglmesaext.h to /usr/local/include/EGL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/EGL/eglextchromium.h to /usr/local/include/EGL
Installing /home/jyc/01_code/mesa-mesa-22.1.2/include/GL/internal/dri_interface.h to /usr/local/include/GL/internal
Installing /home/jyc/01_code/mesa-mesa-22.1.2/src/gbm/main/gbm.h to /usr/local/include
Installing /home/jyc/01_code/mesa-mesa-22.1.2/src/util/00-mesa-defaults.conf to /usr/local/share/drirc.d
Installing /home/jyc/01_code/mesa-mesa-22.1.2/build/meson-private/glesv1_cm.pc to /usr/local/lib/x86_64-linux-gnu/pkgconfig
Installing /home/jyc/01_code/mesa-mesa-22.1.2/build/meson-private/glesv2.pc to /usr/local/lib/x86_64-linux-gnu/pkgconfig
Installing /home/jyc/01_code/mesa-mesa-22.1.2/src/amd/vulkan/00-radv-defaults.conf to /usr/local/share/drirc.d
Installing /home/jyc/01_code/mesa-mesa-22.1.2/build/meson-private/gbm.pc to /usr/local/lib/x86_64-linux-gnu/pkgconfig
Installing /home/jyc/01_code/mesa-mesa-22.1.2/build/meson-private/dri.pc to /usr/local/lib/x86_64-linux-gnu/pkgconfig
Installing /home/jyc/01_code/mesa-mesa-22.1.2/build/meson-private/egl.pc to /usr/local/lib/x86_64-linux-gnu/pkgconfig
Installing /home/jyc/01_code/mesa-mesa-22.1.2/build/meson-private/gl.pc to /usr/local/lib/x86_64-linux-gnu/pkgconfig
Running custom install script '/usr/bin/python3 /home/jyc/01_code/mesa-mesa-22.1.2/bin/install_megadrivers.py /home/jyc/01_code/mesa-mesa-22.1.2/build/src/gallium/targets/dri/libgallium_dri.so /usr/local/lib/x86_64-linux-gnu/dri swrast_dri.so kms_swrast_dri.so'
Ubuntu22.04平台安装mesa相关推荐
- Ubuntu22.04平台安装weston
1, github上下载源代码 2, 需要依赖的库 sudo apt install libxkbcommon-dev sudo apt install libpixman-1-dev sudo ap ...
- ubuntu22.04编译安装gcc12.2
ubuntu22.04编译安装gcc12.2 更新apt sudo apt-get update 安装wget sudo apt-get install wget zlib2 make 3. 下载相应 ...
- Ubuntu22.04.1安装ROS2入门级教程(ros-humble)
Ubuntu22.04.1安装ROS2入门级教程(ros-humble) 文章目录 Ubuntu22.04.1安装ROS2入门级教程(ros-humble) 一键安装ROS(五星推荐⭐⭐⭐⭐⭐) 前言 ...
- Ubuntu22.04编译安装vulkan图形渲染环境
使用Ubuntu22.04编译安装vulkan图形渲染环境 环境准备 1.下载vulkan的开源代码 2.解压vulkan源码压缩包 3.修改编译文件参数 4.开始编译 5.编译中的错误 6.安装结束 ...
- ubuntu22.04版本安装CUDA及cuDNN
此方法仅针对ubuntu22.04下linux系统安装及配置深度学习环境,其他版本不知可通用! 一.独立显卡驱动安装 1-1 先更新所有的软件包 sudo add-apt-repository ppa ...
- Ubuntu22.04篇---安装微信,QQ,企业微信
Ubuntu22.04篇---安装微信,QQ,企业微信 1.企业微信安装方法 2.微信安装方法 3.QQ安装方法 微信,企业微信,QQ 在Ubuntu20.04下通过优麒麟官网应用下载提供的wine版 ...
- Ubuntu22.04上安装Xilinix Vivado 2018.3
OpenWiFi的默认编译仿真工具是Xilinx Vivado 218.3.在Ubuntu22.04 LTS上安装Xilinx Vivado 2018.3之前,首先要安装如下的库 sudo apt-g ...
- Ubuntu22.04下安装OpenFOAM
因为上课需要这个软件,所以从头回顾记录自己安装的过程,参考的链接以及中间出错的一些解决方法. 1.下载Ubuntu镜像 Ubuntu 22.04.1 LTS (Jammy Jellyfish) 2.因 ...
- Ubuntu22.04中安装SCIP排雷记录
1. 之前Ubuntu20.04是可以直接下载SCIPSuite的deb包,在Ubuntu系统中直接应用商店打开安装,非常方便.但是最新的Ubuntu22.04系统这样做会缺少依赖,无法安装成功. S ...
最新文章
- JDK 1.5 主要新特性
- java 前端页面传过来的值怎么防止篡改_答对这40道经典web前端面试题,想不拿到offer都难!...
- NET问答: 是否有通用的方法判断一个 Type 是 Number ?
- C++泛型编程实现二叉搜索树BST
- VNCServer在Linux下设置
- 超好看倒计时特效单页html模板源码下载
- 45. PHP 过滤器(Filter)
- CSS学习总结(1)——基本介绍
- python word 转html,怎么用python将Word转成html?
- 网页中插入视频的代码小技巧
- oppoa3android怎么升级,OPPO A3刷机教程_OPPO A3卡刷升级更新官方系统包
- java speex_JAVA版-微信语音.speex转.wav(示例代码)
- python爬虫——爬取抽屉新热榜
- [连载2]互联网究竟是什么怪物…他们不愿公开真正秘密...
- error launching idea
- 给Rstudio修改背景和字体等设置教程
- VGG16系列IV: 参数计算
- 即时通讯软件都有哪些类型?哪些适合企业内部使用?
- 基于深度学习的红外和可见光图像融合论文及代码整理
- 「镁客·请讲」小不点刘筱璇:新制造时代,用3D打印让世界个性起来