LoginSignup
ywata4443
@ywata4443

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

RasPike サンプルコード ビルドエラー

ETrobocon/RasPike
https://github.com/ETrobocon/RasPike/wiki/RasPike_install
に従って開発環境をインストールしたのですが

最後のサンプルプログラムのビルドにおいて

make img=sample_c5

下記のエラーメッセージになり
ビルドが通りません。

<ビルド結果>
rm -rf /home/kogonta/work/RasPike/sdk/workspace/.././OBJ/
cd /home/kogonta/work/RasPike/sdk/workspace/.././OBJ/ &&
ruby /home/kogonta/work/RasPike/sdk/workspace/../../configure.rb -T raspi_gcc -A app
-a ../workspace/sample_c5
-D ../..
-l c
-m ../common/Makefile.img
-o ""
-t
-d ./dep
-C ../common/athrill_common.cdl
-U "" &&
make clean
Generating Makefile from ../common/Makefile.img.
make[1]: Entering directory '/home/kogonta/work/RasPike/sdk/OBJ'
rm -f #* *~ ./.o ./dep/.d check.timestamp
rm -f asp asp.syms asp.srec asp.bin
rm -f kernel_opt.timestamp cfg3_out.db
rm -f cfg3_out.syms cfg3_out.srec
rm -f kernel_cfg.timestamp kernel_cfg.h kernel_cfg.c cfg2_out.db
rm -f cfg2_out.syms cfg2_out.srec
rm -f offset.timestamp
rm -f cfg1_out.syms cfg1_out.srec cfg1_out
rm -f cfg1_out.timestamp cfg1_out.c cfg1_out.db
rm -rf ./gen
rm -f libkernel.a
make[1]: Leaving directory '/home/kogonta/work/RasPike/sdk/OBJ'

-S "banner.o syslog.o serial.o logtask.o"

(cd /home/kogonta/work/RasPike/sdk/workspace/.././OBJ/ &&
make kernel_cfg.h &&
make -j8 > /dev/null ) &&
cp /home/kogonta/work/RasPike/sdk/workspace/.././OBJ//asp /home/kogonta/work/RasPike/sdk/workspace &&
echo "/home/kogonta/work/RasPike/sdk/workspace/sample_c5" > /home/kogonta/work/RasPike/sdk/workspace/appdir
make[1]: Entering directory '/home/kogonta/work/RasPike/sdk/OBJ'
if grep -sq "tecsgen.cfg" ../workspace/sample_c5/app.cfg ; then
cat ../workspace/sample_c5/app.cfg > tmp_app.cfg ;
else
echo "INCLUDE("tecsgen.cfg")" >> tmp_app.cfg;
cat ../workspace/sample_c5/app.cfg >> tmp_app.cfg ;
fi;
ruby ../../tecsgen/tecsgen.rb ../common/athrill_common.cdl -R -I. -I../../include -I. -I../../include -I../../target/raspi_gcc/drivers -I../../target/raspi_gcc -I../../arch/gcc -I../../target/raspi_gcc/athrill -I../../target/raspi_gcc/athrill/option -I../.. -I../.. -I/home/kogonta/work/RasPike/sdk/OBJ/../../../athrill/apl/include -I../common/ev3api/include -I../common/ev3api/src -I../workspace/sample_c5 -I../../target/raspi_gcc/athrill -I../common -I../common/ev3api -I../common/ev3api/include -I../workspace/sample_c5/LineTracer -I./gen -I../../tecs_kernel -I/tecs -I/tecs/rpc -I../../target/raspi_gcc/pil/include -I../../target/raspi_gcc/platform/include -I../../target/raspi_gcc/drivers/uart/include -I../../target/raspi_gcc/drivers/common/virtual-linux-kernel/arch/arm/include -I../../target/raspi_gcc/drivers/common/virtual-linux-kernel/include -I../../target/raspi_gcc/drivers/common/include -I../../target/raspi_gcc/drivers/gpio/include -I../../target/raspi_gcc/drivers/brick/include -I../../target/raspi_gcc/drivers/motor/include -I../../target/raspi_gcc/TLSF-2.4.6/include --cpp "gcc -DBUILD_EV3_PLATFORM -DTOPPERS_SUPPORT_PROTECT -I. -I../../include -I. -I../../include -I../../target/raspi_gcc/drivers -I../../target/raspi_gcc -I../../arch/gcc -I../../target/raspi_gcc/athrill -I../../target/raspi_gcc/athrill/option -I../.. -I../.. -I/home/kogonta/work/RasPike/sdk/OBJ/../../../athrill/apl/include -I../common/ev3api/include -I../common/ev3api/src -I../workspace/sample_c5 -I../../target/raspi_gcc/athrill -I../common -I../common/ev3api -I../common/ev3api/include -I../workspace/sample_c5/LineTracer -I./gen -I../../tecs_kernel -I/tecs -I/tecs/rpc -I../../target/raspi_gcc/pil/include -I../../target/raspi_gcc/platform/include -I../../target/raspi_gcc/drivers/uart/include -I../../target/raspi_gcc/drivers/common/virtual-linux-kernel/arch/arm/include -I../../target/raspi_gcc/drivers/common/virtual-linux-kernel/include -I../../target/raspi_gcc/drivers/common/include -I../../target/raspi_gcc/drivers/gpio/include -I../../target/raspi_gcc/drivers/brick/include -I../../target/raspi_gcc/drivers/motor/include -I../../target/raspi_gcc/TLSF-2.4.6/include -D TECSGEN -E" -g ./gen
tecsgen version 1.5.0 Copyright(c) 2008-2017, TOPPERS project. All rights reserved.
error: G1014 while open or reading '../common/athrill_common.cdl'
error: G1014 while open or reading './gen/tmp_plugin_post_code.cdl'
2 errors
make[1]: *** [Makefile:480: gen/tecsgen.timestamp] Error 1
make[1]: Leaving directory '/home/kogonta/work/RasPike/sdk/OBJ'
make: *** [../common/Makefile.workspace:71: img] Error 2

何が問題なのかがエラーログを見ても不明なのですが
助言いただけますでしょうか?

0

1Answer

error: G1014 while open or reading '../common/athrill_common.cdl'
error: G1014 while open or reading './gen/tmp_plugin_post_code.cdl'

ファイルは存在しているでしょうか?
ターミナルで以下のコマンドを打って、結果を貼ってください。

cd /home/kogonta/work/RasPike/sdk/workspace/.././OBJ/
ls ../common/athrill_common.cdl
ls ./gen/tmp_plugin_post_code.cdl
1

Comments

  1. @ywata4443

    Questioner

    コメントありがとうございます。

    common と genフォルダに該当ファイルは存在しています。
    結果は下記の通りです。

    kogonta@RasPi:~/work/RasPike/sdk/OBJ $ ls ../common/athrill_common.cdl
    ../common/athrill_common.cdl
    kogonta@RasPi:~/work/RasPike/sdk/OBJ $ ls ./gen/tmp_plugin_post_code.cdl
    ./gen/tmp_plugin_post_code.cdl

  2. アクセス権はありますか?
    ターミナルで以下のコマンドを打って、結果を貼ってください。
    二度手間ですみません。

    cd /home/kogonta/work/RasPike/sdk/workspace/.././OBJ/
    ls -ls ../common/athrill_common.cdl
    ls -ls ./gen/tmp_plugin_post_code.cdl
    
  3. @ywata4443

    Questioner

    ありがとうございます。
    結果は下記になります。
    何かわかることはありますでしょうか?

    kogonta@RasPi:~/work/RasPike/sdk/OBJ $ ls -ls ../common/athrill_common.cdl
    8 -rw-r--r-- 1 kogonta kogonta 4450 May 5 13:15 ../common/athrill_common.cdl
    kogonta@RasPi:~/work/RasPike/sdk/OBJ $ ls -ls ./gen/tmp_plugin_post_code.cdl
    0 -rw-r--r-- 1 kogonta kogonta 0 May 5 20:30 ./gen/tmp_plugin_post_code.cdl
    kogonta@RasPi:~/work/RasPike/sdk/OBJ $

  4. アクセス権もありますね。なんでしょうね??

    同じ環境を作って手元で確認しないと難しいです。
    ハード(ロボット?)を持っていませんが、冒頭のURLの案内通りに環境を作れば再現できますかね?


    追伸;

    使われている gcc コンパイラを確認させてください。
    ターミナルで以下のコマンドを打って、結果を貼ってください。

    which gcc
    gcc --version  
    
  5. @ywata4443

    Questioner

    すみません。
    Raspberry Piのイメージで選択するイメージが違っていたかもですので
    そちらを再確認してみます。
    結果は追って記載させていただきます。

  6. @ywata4443

    Questioner

    無事にコンパイルリンクが通って実機動作も確認できました。
    お騒がせしました。
    Raspberry Piのイメージ選択で
    Raspberry Pi OS(32bit) Debian Bullseyeを選択すべきところを
    通常の
    Raspberry Pi OS(32bit) を選択していた為に問題が発生していた模様です。

  7. Raspberry Pi でのコンパイルでしたか。
    普通にPCでのコンパイルと勘違いしていました。

    解決してよかったです。

Your answer might help someone💌