本次编译环境:
1、SDK版本是MediaTek_ApSoC_SDK_4330_20151204.tar.bz2
2、Linux 操作系统 Ubuntu14 64位。
3、交叉编译工具链:buildroot-gcc463 mipsel-linux-gcc-4.6.3
编译过程中的问题如下:
make[1]: Leaving directory `/home/lzw/mtk_openwrt/SDK_4_3_3_0_R/RT288x_SDK/source/linux-3.10.14.x'
rm -fr /home/lzw/mtk_openwrt/SDK_4_3_3_0_R/RT288x_SDK/source/uClibc-0.9.33.2/include/config/autoconf.h
make[1]: Entering directory `/home/lzw/mtk_openwrt/SDK_4_3_3_0_R/RT288x_SDK/source/uClibc++'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/lzw/mtk_openwrt/SDK_4_3_3_0_R/RT288x_SDK/source/uClibc++'
rm -fr /home/lzw/mtk_openwrt/SDK_4_3_3_0_R/RT288x_SDK/source/uClibc-0.9.33.2/include/config/autoconf.h
make[1]: Entering directory `/home/lzw/mtk_openwrt/SDK_4_3_3_0_R/RT288x_SDK/source/uClibc-0.9.33.2'
make[2]: Nothing to be done for `locale_headers'.
CC libc/sysdeps/linux/common/sendfile.os
libc/sysdeps/linux/common/sendfile.c:20:1: error: conflicting types for 'sendfile64'
./include/sys/sendfile.h:46:16: note: previous declaration of 'sendfile64' was here
make[1]: *** [libc/sysdeps/linux/common/sendfile.os] Error 1
make[1]: Leaving directory `/home/lzw/mtk_openwrt/SDK_4_3_3_0_R/RT288x_SDK/source/uClibc-0.9.33.2'
make: *** [uClibc-0.9.33.2_only] Error 2
解决方法:
修改以下路径: SDK_4_3_3_0_R/RT288x_SDK/source/uClibc-0.9.33.2/libc/sysdeps/linux/common/sendfile.c
sendfile.c 文件的原始内容为:
1 /* vi: set sw=4 ts=4: */
2 /*
3 * sendfile() for uClibc
4 *
5 * Copyright (C) 2000-2006 Erik Andersen
6 *
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 */
9
10 #include
11 #include
12 #include
13
14 #ifdef __NR_sendfile
15
16 _syscall4(ssize_t, sendfile, int, out_fd, int, in_fd, __off_t *, offset,
17 size_t, count)
18
19 #if ! defined __NR_sendfile64 && defined __UCLIBC_HAS_LFS__
20 strong_alias(sendfile,sendfile64)
21 #endif
22
23 #endif /* __NR_sendfile */
sendfile.c修改之后的内容:
1 /* vi: set sw=4 ts=4: */
2 /*
3 * sendfile() for uClibc
4 *
5 * Copyright (C) 2000-2006 Erik Andersen
6 *
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 */
9
10 #include
11 #include
12 #include
13
14 _syscall4(ssize_t, sendfile, int, out_fd, int, in_fd, __off_t *, offset, size_t, count);
15
16 #if ! defined __NR_sendfile64 && defined __UCLIBC_HAS_LFS__
17 #undef sendfile64
18 extern __typeof(sendfile) sendfile64;
19 libc_hidden_proto(sendfile64)
20 strong_alias(sendfile,sendfile64)
21 libc_hidden_def(sendfile64)
22 #endif
图片的红色高亮不要在意,是编辑器的问题。
sendfile.rar--这个文件是我修改之后的文件。
文件修改之后的对比图片,左边为修改前的文件,右边为修改之后的文件
参考:
阅读(3859) | 评论(0) | 转发(0) |