主题 : No rule to make target `.../stdarg.h', needed by `hello_world.o'(was: 按照手册上编译U-BOOT出错。) 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 36384
精华: 0
发帖: 18
金钱: 90 两
威望: 18 点
综合积分: 36 分
注册时间: 2011-01-15
最后登录: 2012-05-15
楼主  发表于: 2011-01-20 12:47

 No rule to make target `.../stdarg.h', needed by `hello_world.o'(was: 按照手册上编译U-BOOT出错。)

管理提醒: 本帖被 qq2440 从 U-boot技术交流区 移动到本区(2011-01-20)
mini2440板子上,按照步骤编译U-BOOT出现了如下问题。
(ps:手册上相关内容
在第五章节中我们已经解压安装好了 u-boot 的源代码,它位于
/opt/FriendlyARM/mini2440/bootloadder/u-boot-1.1.6目录中。
进入该目录,运行以下命令:
#cd /opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6
#make open24x0_config    ;配置 U-Boot 这一步我还没有出现问题。
#make    执行这步完了就出现了下面的问题。)
for dir in tools examples post post/cpu ; do make -C $dir _depend ; done
make[1]: Entering directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/tools'
make[1]: Entering directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/examples'
make[1]: Entering directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/post'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/post'
make[1]: Entering directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/post/cpu'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/post/cpu'
make -C tools all
make[1]: Entering directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/tools'
make[1]: Leaving directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/tools'
make -C examples all
make[1]: Entering directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/examples'
make[1]: *** No rule to make target `/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include/stdarg.h', needed by `hello_world.o'.  Stop.
make[1]: Leaving directory `/opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6/examples'
make: *** [examples] Error 2
怎么就会needed by"hello_world.o" 了,百思不得其解。。
  
[ 此帖被kasim在2011-02-08 13:31重新编辑 ]
友善之臂
自由,自强,共享,共创。
级别: 论坛版主
UID: 12573
精华: 27
发帖: 8838
金钱: 46490 两
威望: 9298 点
综合积分: 18216 分
注册时间: 2010-01-09
最后登录: 2019-07-16
1楼  发表于: 2011-01-20 13:02
可能编译器版本不对吧
新手如何向我们反馈有效的信息,以便解决问题,见此贴:
http://www.arm9home.net/read.php?tid-14431.html

[注]: 此处签名链接仅为指引方向,而非解答问题本身.
级别: 新手上路
UID: 36384
精华: 0
发帖: 18
金钱: 90 两
威望: 18 点
综合积分: 36 分
注册时间: 2011-01-15
最后登录: 2012-05-15
2楼  发表于: 2011-01-20 13:42
多谢斑竹关注。
我是按照手册一步步实验的。
开始我只安装了一个ARM-LINUX-GCC 4.3.2版本的编译器、
在编译UBOOT之前我先编译了一遍vivi期间安装了ARM-LINUX-GCC 2.95.3编译vivi没有问题。
接着我按手册上说的编译U-BOOT就出现了以上的错误。
这两个编译器的路径都是/usr/local/arm/.....(对应的目录)  
应该是没有错的吧。环境变量我也都添好了呀。
友善之臂
资料简单,人亦简单
级别: 新手上路
UID: 33114
精华: 0
发帖: 22
金钱: 110 两
威望: 22 点
综合积分: 44 分
注册时间: 2010-11-25
最后登录: 2011-03-18
3楼  发表于: 2011-01-21 17:55

 回 楼主(范小川) 的帖子

我也有这个问题。
我的编译器版本是4.4.3,如果友善之臂的uboot有没有相应更新版本该多好啊!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2011-02-08 13:25
如果是mini2440光盘上提供的u-boot 1.1.6源代码包,在设置好编译环境后最好先make distclean一下,我印象里这个源代码包里不是干净的源代码,有一些上次编译过的垃圾需要清理掉
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 12229
精华: 0
发帖: 23
金钱: 115 两
威望: 23 点
综合积分: 46 分
注册时间: 2010-01-01
最后登录: 2015-01-09
5楼  发表于: 2011-02-09 20:17

 回 4楼(kasim) 的帖子

出现问题同楼主,make distclean后,编译一段时间出现/opt/FriendlyARM/toolschain/4.4.3/bin/.arm-none-linux-gnueabi-ld: cannot find -lc
make: ***  [u-boot] Error 1
杂回事呢~
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2011-02-10 11:42

 回 5楼(gogo123) 的帖子

在/opt/FriendlyARM/toolschain/4.4.3/下面没有libc.so?
事实上,u-boot 1.1.6这种老古董是不适合用4.4.3版本的gcc编译的。而且这个源代码包基本上没有什么实用价值。论坛上有移植的更好的u-boot for mini2440.
http://www.aiothome.net/read.php?tid-3539.html
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 44596
精华: 0
发帖: 5
金钱: 25 两
威望: 5 点
综合积分: 10 分
注册时间: 2011-04-26
最后登录: 2011-10-05
7楼  发表于: 2011-05-28 14:13

 Re:No rule to make target `.../stdarg.h', needed by `hello_world.o'(was: 按照手册上编译U ..

我也出现一样的问题,请问该怎么解决呢
级别: 新手上路
UID: 49420
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
综合积分: 2 分
注册时间: 2011-06-11
最后登录: 2011-06-12
8楼  发表于: 2011-06-11 21:42

 回 楼主(范小川) 的帖子

这个问题我也遇到了,不过我是U-BOOT-1.3.4版本,尝试了以下步骤,编译成功了,具体哪个步骤起作用我也不知道。
1、执行make clean,问题没有解决;
2、根据提示,执行rm /examples/hello_world.o文件,问题没有解决;
3、希望编辑U-BOOT顶层目录下的config.mk文件,不小心将此文件写坏了,从U-BOOT-1.3.4.tar.gz中重新解压此文件,并拷贝到U-BOOT顶层目录,重新make居然成功了。
我想这是否更config.mk目录的修改时间有关系呢,make是根据文件时间来确定依赖关系的吗?
ARM平台狂热爱好者