tmp/work/x86_64-linux/coreutils-native/8.31-r0/temp/log.do_configure.12484 エラー表示行抜粋
--------------------------------------------------------------------------------------------
checking whether mknod can create fifo without root privileges... configure: error: in `/home/siemens/poky/custom-cross/tmp/work/x86_64-linux/coreutils-native/8.31-r0/build':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See `config.log' for more details
NOTE: The following config.log files may provide further information.
NOTE: /home/siemens/poky/custom-cross/tmp/work/x86_64-linux/coreutils-native/8.31-r0/build/config.log
ERROR: configure failed
WARNING: exit code 1 from a shell command.
ERROR: Execution of '/home/siemens/poky/custom-cross/tmp/work/x86_64-linux/coreutils-native/8.31-r0/temp/run.do_configure.12484' failed with exit code 1:
--------------------------------------------------------------------------------------------
ERROR: Nothing RPROVIDES 'stress-ng' (but /mnt/work/build/../poky/meta/recipes-graphics/images/core-image-weston.bb RDEPENDS on or otherwise requires it)
ERROR: All buildable tasks have been run but the build is incomplete (--continue mode). Errors for the tasks that failed will have been printed above.00:30
ERROR: Command execution failed: 1
bitbake-layers add-layer ../meta-linaro/meta-linaro
ですと、
ERROR: Layer 'linaro' depends on layer 'networking-layer', but this layer is not enabled in your configuration
と言われてしまいました。
yakuhito
2020/6/29 (月) 22:38
追加を行いたいソフトウェアのレシピを構築した際に生成されるパッケージ名をIMAGE_INSTALL変数に追記します
例示されたstress-ngレシピですが、このレシピを構築することで、複数のパッケージが生成されます。
tmp/work/[package-arch]/stress-ng/[レシピバージョン]/packages-split/以下に分割された各パッケージのインストールイメージが
展開されているので、ターゲットボードで動作させるのに必要なパッケージ名が確認できます。
この例では、stress-ng パッケージをインストールすることで、/usr/bin/stress-ng や /usr/share/stress-ng/example-jobs/ 以下のファイルが追加されます。
追加するパッケージが判別しましたら、conf/local.conf でIMAGE_INSTALL_append = " stress-ng " と指定することで、このプロジェクトで構築するイメージレシピから生成されるイメージ内に、streee-ng パッケージに含まれるファイルを追加することが可能となります。
A.H
2020/6/30 (火) 11:35
stress-ngレシピ構築中にエラーが発生しました。
ご回答ありがとうございます。
stress-ngレシピのパッケージを生成するために、
bitbake stress-ng -c package
を実行しましたが、以下のエラーが発生しました。
tmp/work/x86_64-linux/coreutils-native/8.31-r0/temp/log.do_configure.12484 エラー表示行抜粋
--------------------------------------------------------------------------------------------
checking whether mknod can create fifo without root privileges... configure: error: in `/home/siemens/poky/custom-cross/tmp/work/x86_64-linux/coreutils-native/8.31-r0/build':
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See `config.log' for more details
NOTE: The following config.log files may provide further information.
NOTE: /home/siemens/poky/custom-cross/tmp/work/x86_64-linux/coreutils-native/8.31-r0/build/config.log
ERROR: configure failed
WARNING: exit code 1 from a shell command.
ERROR: Execution of '/home/siemens/poky/custom-cross/tmp/work/x86_64-linux/coreutils-native/8.31-r0/temp/run.do_configure.12484' failed with exit code 1:
--------------------------------------------------------------------------------------------
エラー内容から、FORCE_UNSAFE_CONFIGURE=1を設定すればrootからでもconfigureは実行できると解釈しましたが、
どのファイルにFORCE_UNSAFE_CONFIGURE=1設定を追加すればよいでしょうか?
また、
tmp/work/corei7-64-poky-linux/stress-ng/0.10.00-r0/ は、以下のフォルダ構成になっており、
packages-split は生成されていませんでした。(ソース/パッチの適用・イメージ向けライセンスファイルの更新はできていそうです)
【フォルダ構成】
0001-Do-not-preserve-ownership-when-installing-example-jo.patch
0001-bash-completion-remove-the-shebang-at-the-start.patch
license-destdir/
recipe-sysroot/
recipe-sysroot-native/
sstate-install-populate_lic/
stress-ng-0.10.00/
temp/
yakuhito
2020/7/1 (水) 10:01
rootで構築は推奨されていないのですが……
openemebeddedのビルドシステムでは、bitbake 実施時にroot権限が必要な場合は、FakerootやPseudo というメカニズムを
利用して一般ユーザ権限の元でroot権限が必要な動作を実行可能な仕組みが用意されており、bitbake実行時のroot権限は不要と
なっています。
また、bitbake 以外の動作でroot権限が必要な場合は、sudo にて一時的にroot権限でコマンドを実行することを前提としています。
今回stress-ngの構築で発生しているエラーですが、依存関係で必要とされるcoreutils-native の configure 実施時に起こっています。
coreutils-native で対応を行っても、他で同様のエラーが発生する可能性もあるので、一般ユーザー権限で構築を行うわれることを
推奨します。
A.H
2020/7/1 (水) 12:03
回答ありがとうございます。
root権限での環境構築が非推奨であることを理解しました。
一般ユーザー権限で環境を再構築してみます。
丁寧な解説ありがとうございました。
ryuohno
2020/9/11 (金) 14:55
私も類似の状況で、このスレッドを参考にさせていただいたのですが、、、
組み込みLinux に stress-ng コマンドが使えるようにすることについて調べていたら、このスレッドにたどり着きました。
「conf/local.conf でIMAGE_INSTALL_append = " stress-ng " と指定」とのアドバイスを参考にさせていただきましたが、
ERROR: Nothing RPROVIDES 'stress-ng' (but /mnt/work/build/../poky/meta/recipes-graphics/images/core-image-weston.bb RDEPENDS on or otherwise requires it)
ERROR: All buildable tasks have been run but the build is incomplete (--continue mode). Errors for the tasks that failed will have been printed above.00:30
ERROR: Command execution failed: 1
と出てしまい、行き詰っています。
エラー内容から、分かることはないでしょうか。
私も同じ問題だと思いましたので、ここに書かせていただきました。
別質問として書き込んだ方がよろしかったでしょうか。
yakuhito
2020/9/11 (金) 15:24
どちらのバージョンのBSPをご使用でしょうか
ERROR: Nothing RPROVIDES 'stress-ng' (but /mnt/work/build/../poky/meta/recipes-graphics/images/core-image-weston.bb RDEPENDS on or otherwise requires it)
のエラーは、追加でしてされたパッケージを構築するレシピが存在しない場合に表示されるものです。
stress-ng が poky(openembedded-core) のmeta に追加されたのはZeus (Yocto3.0) からで
Sumo(Yocto2.5),Thud(Yocto2.6),Warrior(Yocto2.7)では、meta-openembedded/meta-oe に含まれて
いました。
bitbake-layers show-recipes | grep stress-ng
を実行して、何も表示されなければ、当該バージョンのBSPでは、stress-ngのレシピが含まれないことになります。
ryuohno
2020/9/11 (金) 15:04
質問して舌の根が乾かないうちで申し訳ありません。組み込みに成功したようです。
IMAGE_INSTALL_append = " stress-ng "
ではなく、
DISTRO_FEATURES_append = " stress-ng "
としたら、エラーを吐き出さなくなりました。
お騒がせしました。
IMAGE_INSTALL_append と DISTRO_FEATURES_append とでは
何が違うのでしょうか。
#解決できていませんでした。すみません。やり取り継続させていただいております。
#また、BBQの使い方に慣れておらず、返信の仕方が悪くてすみません。
yakuhito
2020/9/11 (金) 16:04
以下、簡単に説明します
IMAGE_INSTALL 変数に指定するのは、イメージにインストールするパッケージとなります。
DISTRO_FEATURES変数に指定するのは、機能名となります。
あらかじめ定義された機能名が指定された場合は、その機能を実現するパッケージ群がイメージ生成時に
追加されます。
例えば、package-management という機能が指定された場合は、パッケージ管理関連のパッケージを
追加するとともに、image用のrootfsの中に、初期のパッケージデータベースを生成するといった処理が
行われます。
今回は、定義されていない機能を指定した事となりますので、イメージに対する変更は何も起こりません。
ryuohno
2020/9/11 (金) 15:27
私の環境
ルネサスの環境で、Starter Kit Pro(R-Car M3)、BSPバージョンは 3.21.0 です。
https://elinux.org/R-Car/Boards/Yocto-Gen3/v3.21.0
yakuhito
2020/9/11 (金) 15:50
poky2.4.3 ベースですので、通常のbblayeres.conf で指定されたレイヤー内にはレシピが存在していないですね。
https://elinux.org/R-Car/Boards/Kingfisher/Yocto-Gen3/v3.21.0
に、poky2.4.3 ベースと記載されており、このバージョンでは
meta-linaro/meta-linaro/recipes-extra/stress-ng/ にレシピが存在します。
bitbake-layers add-layer ../meta-linaro/meta-linaro を実行することで
stress-ng の構築が可能になるかと。
ryuohno
2020/9/11 (金) 15:53
勉強になりました。
試してみたいと思います。
ありがとうございました。
ryuohno
2020/9/11 (金) 17:42
bitbake-layers add-layer ..
bitbake-layers add-layer ../meta-linaro/meta-linaro
ですと、
ERROR: Layer 'linaro' depends on layer 'networking-layer', but this layer is not enabled in your configuration
と言われてしまいました。
bitbake-layers add-layer ../meta-linaro/meta-linaro/recipes-extra/
としたら、
エラーではないようですが、
Specified layer directory doesn't contain a conf/layer.conf file
と表示されました。
bblayer.conf は存在しているようですが、layer.conf が無いようです。
この場合は、自分で空ファイルなどを用意するのでしょうか。
ryuohno
2020/9/11 (金) 19:41
自己解決に至れたようです
分かったことと、実施したことを示します。
レイヤに依存関係があり、下記3つのコマンドを実行しました。
bitbake-layers add-layer ../meta-openembedded/meta-python/
bitbake-layers add-layer ../meta-openembedded/meta-networking/
bitbake-layers add-layer ../meta-linaro/meta-linaro/
local.conf に下記1行を追加。
IMAGE_INSTALL_append = " stress-ng "
実機で stress-ng コマンドを実行することができました。
もしも誤りがあるようでしたら、ご指摘いただけますと幸いです。