【发布时间】:2013-02-06 15:52:33
【问题描述】:
所以我有一个使用arm-eabi-none-xxx 命令的make 文件,但是当我运行make 时出现“找不到命令”错误:
bash-4.2$ make
arm-none-eabi-as -I source/ source/mailbox.s -o build/mailbox.o
make: arm-none-eabi-as: Command not found
make: *** [build/mailbox.o] Error 127
奇怪的是,该命令是否存在并且在我的路径中(以下与makefile在同一目录中):
bash-4.2$ arm-none-eabi-as --version
GNU assembler (Sourcery G++ Lite 2008q3-66) 2.18.50.20080215
This assembler was configured for a target of `arm-none-eabi'.
我可以运行 make 正在运行的命令:
bash-4.2$ arm-none-eabi-as -I source/ source/mailbox.s -o build/mailbox.o
bash-4.2$ ls build/
README mailbox.o
所以。我读到如果./ 在当前路径中,make 会使用 shell 执行命令,所以我尝试过,但没有用。最初我根本无法运行 arm-none-eabi-as,因为它是 32 位二进制文件,而我在 64 位系统(Slackware 14.0)but I followed the instructions here to install the 32-bit libraries 等上运行。
那么问题是……我犯了什么愚蠢的小学生错误?
【问题讨论】:
-
您可以将
arm-none-eabi-as的路径添加到Makefile中的PATH。或者,指定完整路径。 -
所以它不使用我当前的路径,其中包括所在的目录?
-
@LaceyStr:默认情况下是这样;在您的
Makefile中查找对PATH的分配,并检查它使用的shell(/bin/sh,除非它分配给SHELL)与您的交互式shell 相同。 -
我已经使用命令的完整路径临时修复了它。 Makefile 既没有
SHELL也没有任何PATH分配。 -
type arm-none-eabi-as告诉你什么?
标签: linux path makefile slackware