2013-02-21 84 views
0

所以我有一個使用arm-eabi-none-xxx命令make文件,但是當我運行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 

奇怪的一點,就是命令存在,並且是在我的道路(以下在同一目錄中生成文件):

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'. 

而且我可以運行,使運行命令:

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等。

所以問題......什麼愚蠢的錯誤男生我是製造?

+0

您可以將'arm-none-eabi-as'的路徑添加到Makefile中的PATH中。或者,指定完整路徑。 – choroba 2013-02-21 10:53:04

+0

所以它不使用我當前的路徑,其中包括目錄? – 2013-02-21 10:56:58

+0

@LaceyStr:默認情況下,在'Makefile'中尋找'PATH'的賦值並檢查它使用的shell('/ bin/sh',除非它賦值給'SHELL')與交互式shell相同。 – reinierpost 2013-02-21 11:08:23

回答

0

你運行'make'爲sudo或root嗎?在這種情況下,它不適合我。 我必須做的是mkdir'build'文件夾,只需運行'make'即可。有效。