Ubuntu 20.04でのPybombsによるGNU Radio maint-3.9のビルド
先の記事では,Ubuntu20.04でPybombsによりGNU Radio 3.9.2.0をビルド・インストールした.maint-3.9系列でのビルドを指定すれば,3.9.2.0のリリース後にGitHub上でcommitされた修正を反映したGNU Radioをビルドできそうだ.先の記事に続いて usrp39 という別のユーザを作成し,そのユーザーとして続いて作業する.下記については,先の記事ですでに終わっている.
$ sudo apt-get install python3-pip
$ sudo pip3 install pybombs
$ pybombs auto-config
$ sudo apt-get install -y python3-pygccxml
$ sudo apt install pybind11-dev
続いて,以下のように進める.
$ pybombs recipes add gr-volk git+https://github.com/gnuradio/volk.git
$ pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git
$ pybombs recipes add gr-etcetera git+https://github.com/gnuradio/gr-etcetera.git
$ mkdir gr39
gitbranch を maint-3.9 にセットする.
$ pybombs config --package gnuradio gitbranch maint-3.9
[INFO] Prefix Python version is: 3.8.10
[INFO] PyBOMBS Version 2.3.4
[INFO] Using config file: /home/usrp39/.pybombs/config.yml
Setting keys for packages gnuradio:
gitbranch: maint-3.9
Pybombsを使ってビルドする.
$ pybombs prefix init /home/usrp39/gr39 -a myprefix -R gnuradio-default と入力する.
[INFO] Prefix Python version is: 3.8.10
[INFO] PyBOMBS Version 2.3.4
[INFO] Prefix Python version is: 3.8.10
[INFO] Creating new config file /home/usrp39/gr39/.pybombs/config.yml
[INFO] Prefix Python version is: 3.8.10
[INFO] Installing default packages for prefix...
[INFO]
- gnuradio
[INFO] Phase 1: Creating install tree and installing binary packages:
Install tree:
|
\- gnuradio
|
+- uhd
|
\- libvolk
[INFO] Phase 1 complete: All binary dependencies installed.
[INFO] Phase 2: Recursively installing source packages to prefix:
[INFO] Installing package: libvolk
Cloning into 'libvolk'...
remote: Enumerating objects: 9821, done.
remote: Counting objects: 100% (220/220), done.
remote: Compressing objects: 100% (108/108), done.
remote: Total 9821 (delta 108), reused 198 (delta 99), pack-reused 9601
Receiving objects: 100% (9821/9821), 2.81 MiB | 7.85 MiB/s, done.
Resolving deltas: 100% (6698/6698), done.
Submodule 'cpu_features' (https://github.com/google/cpu_features.git) registered for path 'cpu_features'
Cloning into '/home/usrp39/gr39/src/libvolk/cpu_features'...
remote: Enumerating objects: 1303, done.
remote: Counting objects: 100% (240/240), done.
remote: Compressing objects: 100% (133/133), done.
remote: Total 1303 (delta 134), reused 169 (delta 97), pack-reused 1063
Receiving objects: 100% (1303/1303), 420.64 KiB | 1.46 MiB/s, done.
Resolving deltas: 100% (847/847), done.
Submodule path 'cpu_features': checked out 'a8397ba4591237c17d18e4acc091f5f3ebe7391e'
Configuring: (100%) [==============================================================================================]
Building: (100%) [==============================================================================================]
Installing: (100%) [==============================================================================================]
[INFO] Installation successful.
[INFO] Installing package: uhd
Cloning into 'uhd'...
remote: Enumerating objects: 105717, done.
remote: Counting objects: 100% (6214/6214), done.
remote: Compressing objects: 100% (2054/2054), done.
remote: Total 105717 (delta 4228), reused 6039 (delta 4111), pack-reused 99503
Receiving objects: 100% (105717/105717), 133.12 MiB | 26.13 MiB/s, done.
Resolving deltas: 100% (81527/81527), done.
Configuring: (100%) [==============================================================================================]
Building: (100%) [==============================================================================================]
Installing: (100%) [==============================================================================================]
[INFO] Installation successful.
[INFO] Installing package: gnuradio
Cloning into 'gnuradio'...
remote: Enumerating objects: 175392, done.
remote: Counting objects: 100% (335/335), done.
remote: Compressing objects: 100% (183/183), done.
remote: Total 175392 (delta 173), reused 269 (delta 147), pack-reused 175057
Receiving objects: 100% (175392/175392), 59.98 MiB | 18.54 MiB/s, done.
Resolving deltas: 100% (136796/136796), done.
Configuring: (100%) [==============================================================================================]
Building: (100%) [==============================================================================================]
Installing: (100%) [==============================================================================================]
[INFO] Installation successful.
[INFO] Phase 2 complete: All source packages installed.
3.9.2.0をビルドしたときと全く同じようにも思えるが,よく見ると Receiving objects: 100% (175392/175392) などのようにソースコードツリーに含まれる何らかの対象物の個数に相当する数値が増えているので,異なる条件でビルドされていそうだ.
$ source ~/gr39/setup_env.sh
$ gnuradio-companion
上記のようにパスを通して GNU Radio Companionを起動すると,2021年8月27日のビルドでは,GNU Radio Companion v3.9.2.0-103-gfbfbee7e が起動した.どうやらうまくいったようだ.ちなみに,~/gr39ディレクトリは約13GBの容量を占めている.以上の手順は,ドキュメント類を眺めながら見よう見まねで行っている.手順に何かが抜けていたり,余計だったりするかもしれない.お気づきの点がありましたら,ご指摘をいただければ幸いです.
https://wiki.gnuradio.org/index.php/GNU_Radio_3.8_OOT_Module_Porting_Guide