2017-05-31 21 views
1

Cファイルをローリングスパイダーにコンパイルしようとしています。しかし、私は誤りがある。私がコンパイルしているうちに、「コマンドが見つかりません」というエラーが発生する

Drone: Trying to pack autogenerated code using PackEmbeddedCode... 
C-files are being packed... 
C-files packed and ready to be built! 
Drone: Autogenerated code using PackEmbeddedCode packed! 
Drone: Trying to build code... 
/opt/arm-2012.03/bin/arm-none-linux-gnueabi-gcc -c -fPIC -Wall -Werror -o Drone_Compensator.o ../Drone_Compensator.c -lm 
make: /opt/arm-2012.03/bin/arm-none-linux-gnueabi-gcc: Command not found 
Makefile:4: recipe for target 'all' failed 
make: *** [all] Error 127 

は、ここでは、コード 'DroneUploadEmbeddedCode.sh' が

#!/bin/bash 

# 1. change folder to where this script is 
cd `dirname $0` 
SCRIPTPATH=$(pwd) 

# 1.2 Exit the script if a command fails 
set -e 

# 2. Pack autogenerated c-code 
echo "Drone: Trying to pack autogenerated code using PackEmbeddedCode..." 
cd utils/ 
./PackEmbeddedCode 
cd .. 
echo "Drone: Autogenerated code using PackEmbeddedCode packed!" 

# 3. Build code 
echo "Drone: Trying to build code..." 
cd ../trunk/embcode/build_arm 
make 
cd $SCRIPTPATH 
echo "Drone: Code built!" 

# 4. ftp into the drone and upload the shared library 
echo "Drone: Trying to upload shared library..." 

echo "> Drone: FTP into the drone" 
/usr/bin/expect <<SCRIPT 
set timeout -1; 
spawn ftp 192.168.1.1; 
expect "(192.168.1.1:$USER):"; 
send "\r"; 
expect "ftp>"; 
send "put ../DroneExchange/librsedu.so librsedu.so\r"; 
expect "ftp>"; 
send "exit\r"; 
expect eof 
SCRIPT 

echo "Drone: Shared library uploaded!" 

また、これは

CC=/opt/arm-2012.03/bin/arm-none-linux-gnueabi-gcc 

all: 
    $(CC) -c -fPIC -Wall -Werror -o Drone_Compensator.o ../Drone_Compensator.c -lm 
    #$(CC) -c -fPIC -Wall -Werror -o Drone_Compensator_capi.o ../Drone_Compensator_capi.c -lm 
    $(CC) -c -DDELOS -DDELOS_EDU -fPIC -Wall -Werror -o rsedu_control.o ../rsedu_control.c -lm 
    $(CC) -c -DDELOS -DDELOS_EDU -fPIC -Wall -Werror -o rsedu_vis_helpers.o ../rsedu_vis_helpers.c -lm 
    $(CC) -c -DDELOS -DDELOS_EDU -fPIC -Wall -Werror -o rsedu_vis.o ../rsedu_vis.c -lm 
    $(CC) -c -DDELOS -DDELOS_EDU -fPIC -Wall -Werror -o rsedu_of.o ../rsedu_of.c -lm 
    $(CC) -c -fPIC -Wall -Werror -o rtGetInf.o ../rtGetInf.c 
    $(CC) -c -fPIC -Wall -Werror -o rtGetNaN.o ../rtGetNaN.c 
    $(CC) -c -fPIC -Wall -Werror -o rt_nonfinite.o ../rt_nonfinite.c 
    $(CC) -c -fPIC -Wall -Werror -DDEFAULT_BUFFER_SIZE=4600 -o rt_logging.o ../rt_logging.c 
    #$(CC) -c -fPIC -Wall -Werror -o rt_logging_mmi.o ../rt_logging_mmi.c 
    #$(CC) -c -fPIC -Wall -Werror -o rtw_modelmap_utils.o ../rtw_modelmap_utils.c 

    # 
    $(CC) rsedu_control.o rsedu_vis_helpers.o rsedu_vis.o rsedu_of.o Drone_Compensator.o rtGetInf.o rtGetNaN.o rt_nonfinite.o rt_logging.o -lm -DDELOS -DDELOS_EDU -fPIC -shared -o ../../../DroneExchange/librsedu.so -I./ 

だから、私はファイルを追跡しようとした 'Makefile' のコードです。正しいフォルダに 'arm-none-linux-gnueabi-gcc'というファイルが見つかりました。また、私は端末で見ることができました。ここで

> ~/Downloads/RollingSpiderEdu-master/MIT_MatlabToolbox/libs/gcc-arm-Toolchain/opt/arm-2012.03/bin$ 
> ls arm-none-linux-gnueabi-addr2line arm-none-linux-gnueabi-gdbtui 
> arm-none-linux-gnueabi-ar   arm-none-linux-gnueabi-gprof 
> arm-none-linux-gnueabi-as   arm-none-linux-gnueabi-ld 
> arm-none-linux-gnueabi-c++  arm-none-linux-gnueabi-nm 
> arm-none-linux-gnueabi-c++filt arm-none-linux-gnueabi-objcopy 
> arm-none-linux-gnueabi-cpp  arm-none-linux-gnueabi-objdump 
> arm-none-linux-gnueabi-elfedit arm-none-linux-gnueabi-ranlib 
> arm-none-linux-gnueabi-g++  arm-none-linux-gnueabi-readelf 
> arm-none-linux-gnueabi-gcc  arm-none-linux-gnueabi-size 
> arm-none-linux-gnueabi-gcc-4.6.3 arm-none-linux-gnueabi-sprite 
> arm-none-linux-gnueabi-gcov  arm-none-linux-gnueabi-strings 
> arm-none-linux-gnueabi-gdb  arm-none-linux-gnueabi-strip 

は、ファイルのプロパティ

file -L arm-none-linux-gnuea 
bi-gcc 
arm-none-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, stripped 

である。これは、問題はここにあるどのような私のコンピュータ

ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=504637666875a5d526ef51acfe601c99efc99114, stripped 

のですか? 32ビットと64ビットの違いのためにこの問題はありますか?

答えて

0

あなたが使用したいコンパイラへの正しいパスでのMakefile

CC=

にラインを交換する必要があります。

あなたのポストから、これは

~/Downloads/RollingSpiderEdu-master/MIT_MatlabToolbox/libs/gcc-arm-Toolchain/opt/arm-2012.03/bin/arm-none-linux-gnueabi-gcc

であるように、それはそうです
関連する問題