0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Ubuntu 24.04 に glmark2 をインストールするまで 後編

Last updated at Posted at 2025-02-01

コンパイル準備の続き・・・

前編では、glmark2 をコンパイルするところにこぎつけましたが・・・

  • libdrm から何から全部入れる・・・

libdrm2-dev を入れるのに依存関係のある .deb を一つ一つ、
 https://launchpad.net/ubuntu/
から探して落としていきます。これが難行苦行。2時間を要しました。

  • まず依存関係があって一通り入れないと libdrm2-dev が入りません。

libdrm-common
libdrm2
libdrm-intel1
libdrm-nouveau2
libdrm-radeon1
libdrm-amdgpu

  • 以下は、バージョンがいっぱいありすぎて間違えると数度手間になります。 最新リリースのnoble はもう既に開発先行バージョンから見れば、最新バージョンではなく、libgbmに至っては マイナーバージョンのサブリビジョンまで違うと入りません・・・。

libpciaccess0
libpcaccess-dev

libgbm1
libgbm-dev

  • 途中で live-updateが走ってたり、 gnuplotがねえぞ!入れるーと余計なことをしていたので、dpkg のログがぐちゃぐちゃですが取り敢えず、必要ならライブラリは揃えられました。

  • INSTALL に書いてある meson の設定例が Raspiまで対応してた!

glmark2 uses the meson build system.

To configure glmark2 use (with only the flavors you need):

$ meson setup build -Dflavors=dispmanx-glesv2,drm-gl,drm-glesv2,wayland-gl,wayland-glesv2,x11-gl,x11-glesv2 [-Ddata-path=DATA_PATH --prefix=PREFIX]

dispmanx-glesv2 なんてのが入ってます。これが実はRaspberryPIの bcm系コードですが、こんなの amd64 のマシンでは要りません。

~/workdir/glmark2$ meson setup build -Dflavors=dispmanx-glesv2,drm-gl,drm-glesv2,wayland-gl,wayland-glesv2,x11-gl,x11-glesv2
The Meson build system
Version: 1.7.0
Source dir: /home/hiko/workdir/glmark2
Build dir: /home/hiko/workdir/glmark2/build
Build type: native build
Project name: glmark2
Project version: 2023.01
C compiler for the host machine: cc (gcc 13.3.0 "cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
C linker for the host machine: cc ld.bfd 2.42
C++ compiler for the host machine: c++ (gcc 13.3.0 "c++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
C++ linker for the host machine: c++ ld.bfd 2.42
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Run-time dependency x11 found: YES 1.8.7
Run-time dependency libdrm found: YES 2.4.122
Run-time dependency gbm found: YES 24.0.9-0ubuntu0.3
Run-time dependency libudev found: YES 255
Run-time dependency wayland-client found: YES 1.22.0
Run-time dependency wayland-cursor found: YES 1.22.0
Run-time dependency wayland-egl found: YES 18.1.0
Run-time dependency wayland-protocols found: YES 1.34
Build-time dependency wayland-scanner found: YES 1.22.0
Found CMake: /usr/bin/cmake (3.28.3)
Run-time dependency bcm_host found: NO (tried pkgconfig and cmake)

meson.build:76:19: ERROR: Dependency "bcm_host" not found, tried pkgconfig and cmake

A full log can be found at /home/hiko/workdir/glmark2/build/meson-logs/meson-log.txt

"bcm_host" なんだろ?これ? 探すと出てくるのは RasPI関係。
-Dflavor で見知ったものは殆どライブラリで加えたので、良くわからないのは dispmanx-glesv2 こいつを外したらいいのか?

strnh@ryzen5700-pc:~/workdir/glmark2$ meson setup build -Dflavors=drm-gl,drm-glesv2,wayland-gl,wayland-glesv2,x11-gl,x11-glesv2
The Meson build system
Version: 1.7.0
Source dir: /home/hiko/workdir/glmark2
Build dir: /home/hiko/workdir/glmark2/build
Build type: native build
Project name: glmark2
Project version: 2023.01
C compiler for the host machine: cc (gcc 13.3.0 "cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
C linker for the host machine: cc ld.bfd 2.42
C++ compiler for the host machine: c++ (gcc 13.3.0 "c++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
C++ linker for the host machine: c++ ld.bfd 2.42
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Run-time dependency x11 found: YES 1.8.7
Run-time dependency libdrm found: YES 2.4.122
Run-time dependency gbm found: YES 24.0.9-0ubuntu0.3
Run-time dependency libudev found: YES 255
Run-time dependency wayland-client found: YES 1.22.0
Run-time dependency wayland-cursor found: YES 1.22.0
Run-time dependency wayland-egl found: YES 18.1.0
Run-time dependency wayland-protocols found: YES 1.34
Build-time dependency wayland-scanner found: YES 1.22.0
Library m found: YES
Library dl found: YES
Run-time dependency threads found: YES
Run-time dependency libjpeg found: YES 2.1.5
Run-time dependency libpng found: YES 1.6.43
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Configuring glmark2-drm.1 using configuration
Configuring glmark2-es2-drm.1 using configuration
Configuring glmark2-wayland.1 using configuration
Configuring glmark2-es2-wayland.1 using configuration
Configuring glmark2.1 using configuration
Configuring glmark2-es2.1 using configuration
Message: Building with flavors: drm-gl, drm-glesv2, wayland-gl, wayland-glesv2, x11-gl, x11-glesv2
Build targets in project: 15
NOTICE: Future-deprecated features used:
 * 0.56.0: {'dependency.get_pkgconfig_variable'}

glmark2 2023.01

  User defined options
    flavors: drm-gl,drm-glesv2,wayland-gl,wayland-glesv2,x11-gl,x11-glesv2

Found ninja-1.13.0.git at /usr/bin/ninja

「あたり」でした。 amd64向けの glmark2 でクロスコンパイルしているのではないのです。 良かった。 これでコンパイルの準備とどのいました。

ninja 活躍

  • ninja -C build であっという間にコンパイルが終わります。
  • ninja -C build install で sudo を自動実行して install されます・・・ ここは省略。

ようやく動く

glmark2-0.png

glmark2.png

ubuntu のコンパイル環境・・・

  • 管理用で開発用設定にしていなかったPCでしたが、色々欲が出てきてちゃんとなんでもできるようにすると結構骨なのでした。 debianとかだと最初から入るのかもしれませんが・・・
  • FreeBSDだと ports でかなり楽させてもらってたりします。今回も deb で端折ったわけですが、portsは portmaster 一発で終わるのが多くなって野良ビルドの苦労を忘れていました。
  • 純然たる野良ビルドではないんですが、やっていること手当り次第取ってくるとか手順は野良ビルドでした。
  • もっと説明を読もう・・・
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?