QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1920|回复: 5

编译skyeye-1.2.4报错,请大侠指教

[复制链接]
发表于 2009-10-30 00:02:26 | 显示全部楼层 |阅读模式
我编译skyeye-1.2.4的时候报这个错,
~/skyeye/src/skyeye-1.2.4$ make
--------------------------- NOTICE ------------------------------
If you always get error, please run "make NO_CHECK=1" instead.
-----------------------------------------------------------------
echo "Checking whether host is big endian ... no"
Checking whether host is big endian ... no
for f in  ./utils/scripts/check-gcc.sh ./utils/scripts/check-x86-asm.sh ./utils/scripts/check-bfd.sh .none; do \
                test "$f" = ".none" || BINARY_DIR="/home/bellsleep/skyeye/src/skyeye-1.2.4/binary/" CROSS_COMPILE="" EXTRA_CFLAGS="" EXTRA_LIBS=" -lm" BFD_LIBS=" -lbfd -liberty" CC=gcc CXX=gcc SUFFIX= sh $f || exit 1; \
        done
Checking gcc ... OK ( gcc version: 4.3.3 )
Checking whether the compiler supports x86 asm ... FAILED

*** It seems that the compiler don't support inline x86 AT&T ASM codes.
*** Run "make NO_DBCT=1" instead to ignore it.

make: *** [check] 错误 1

然后使用 make NO_DBCT=1 编译

~/skyeye/src/skyeye-1.2.4$ make NO_DBCT=1
--------------------------- NOTICE ------------------------------
If you always get error, please run "make NO_CHECK=1" instead.
-----------------------------------------------------------------
echo "Checking whether host is big endian ... no"
Checking whether host is big endian ... no
for f in  ./utils/scripts/check-gcc.sh ./utils/scripts/check-bfd.sh .none; do \
                test "$f" = ".none" || BINARY_DIR="/home/bellsleep/skyeye/src/skyeye-1.2.4/binary/" CROSS_COMPILE="" EXTRA_CFLAGS="" EXTRA_LIBS=" -lm" BFD_LIBS=" -lbfd -liberty" CC=gcc CXX=gcc SUFFIX= sh $f || exit 1; \
        done
Checking gcc ... OK ( gcc version: 4.3.3 )
Checking bfd library ... OK
-----------------------------------------------------------------
gcc  -g -O2 -D_FILE_OFFSET_BITS=64 -DSTANDALONE -DDEFAULT_INLINE=0 -DMODET  -DMODET -I arch/arm -I arch/arm/common -I arch/arm/common/mmu -I arch/arm/mach -I arch/bfin/common -I arch/bfin/mach -I arch/coldfire/common -I arch/ppc/common -I device -I device/net -I device/lcd -I device/flash -I device/uart -I device/nandflash -I utils -I utils/share -I utils/main -I utils/config -I utils/debugger  -DARM  -I. -DNO_DBCT -DGTK_LCD -c arch/arm/mach/skyeye_mach_at91.c -o binary/skyeye_mach_at91.o
arch/arm/mach/skyeye_mach_at91.c: 在函数‘at91_io_write_byte’中:
arch/arm/mach/skyeye_mach_at91.c:578: 警告: 格式字符串实参太少
arch/arm/mach/skyeye_mach_at91.c: 在函数‘at91_mach_init’中:
arch/arm/mach/skyeye_mach_at91.c:688: 警告: 从不兼容的指针类型赋值
arch/arm/mach/skyeye_mach_at91.c:689: 警告: 从不兼容的指针类型赋值
arch/arm/mach/skyeye_mach_at91.c:690: 警告: 从不兼容的指针类型赋值
arch/arm/mach/skyeye_mach_at91.c:691: 警告: 从不兼容的指针类型赋值
arch/arm/mach/skyeye_mach_at91.c:692: 警告: 从不兼容的指针类型赋值
arch/arm/mach/skyeye_mach_at91.c:693: 警告: 从不兼容的指针类型赋值
arch/arm/mach/skyeye_mach_at91.c:695: 警告: 从不兼容的指针类型赋值
。。。
。。。
。。。
device/nandflash/nandflash_smallblock.c: 在函数‘nandflash_sb_setup’中:
device/nandflash/nandflash_smallblock.c:521: 警告: 隐式声明与内建函数‘free’不兼容
device/nandflash/nandflash_smallblock.c:528: 警告: 隐式声明与内建函数‘free’不兼容
device/nandflash/nandflash_smallblock.c:550: 警告: 隐式声明与内建函数‘free’不兼容
device/nandflash/nandflash_smallblock.c:555: 警告: 格式‘%d’需要类型‘int’,但实参 2 的类型为‘__off64_t’
device/nandflash/nandflash_smallblock.c:559: 警告: 隐式声明与内建函数‘free’不兼容
device/nandflash/nandflash_smallblock.c:539: 警告: 忽略声明有 warn_unused_result 属性的‘write’的返回值
device/nandflash/nandflash_smallblock.c: 在函数‘nandflash_sb_uninstall’中:
device/nandflash/nandflash_smallblock.c:612: 警告: 隐式声明与内建函数‘free’不兼容
在函数‘open’中,
    内联自‘nandflash_sb_setup’于 device/nandflash/nandflash_smallblock.c:519:
/usr/include/bits/fcntl2.h:51: 错误: 调用‘__open_missing_mode’,声明有错误属性:open with O_CREAT in second argument needs 3 arguments
make: *** [binary/nandflash_smallblock.o] 错误 1

麻烦各位高手看看我这个是什么原因阿?

我的gcc版本是
~/skyeye/src/skyeye-1.2.4$ gcc -v
使用内建 specs。
目标:i486-linux-gnu
配置为:../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
线程模型:posix
gcc 版本 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
 楼主| 发表于 2009-10-30 00:06:51 | 显示全部楼层
我看过了nandflash_smallblock.c的519行,是这段代码:
      if ((nf->fdump= open(dev->dump, FILE_FLAG)) < 0)   // 519
       {
               free(nf);
               printf("error open nandflash dump!\n");
               skyeye_exit(-1);
       }
怎么会扯上这个错误呢?
/usr/include/bits/fcntl2.h:51: 错误: 调用‘__open_missing_mode’,声明有错误属性:open with O_CREAT in second argument needs 3 arguments

而且我查过这个文件包含的头文件
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
//#include <sys/mman.h>
#include "portable/mman.h"
#include "skyeye_nandflash.h"
#include "nandflash_smallblock.h"
里面也没有包含fcntl2.h阿

请各位大大给支个招。。。
回复

使用道具 举报

 楼主| 发表于 2009-10-30 12:08:12 | 显示全部楼层
找到原因了
需要修改代码
把        if ((nf->fdump= open(dev->dump, FILE_FLAG)) < 0)
修改成       if ((nf->fdump= open(dev->dump, FILE_FLAG, S_IRUSR | S_IWUSR )) < 0)

晚上回去验证下
回复

使用道具 举报

 楼主| 发表于 2009-10-30 12:09:13 | 显示全部楼层
嗯...
感觉这里都没有什么人气....
是用的人少了,还是高手都不再关注这里?
回复

使用道具 举报

发表于 2009-10-30 15:45:11 | 显示全部楼层
回复

使用道具 举报

 楼主| 发表于 2009-10-31 11:20:10 | 显示全部楼层
这个编译错误已经解决了
谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-3-29 17:48 , Processed in 0.098900 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表