答复: arm_gcc-3.4.6_uClibc-0.9.28 - arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32. compile error
Line149: #ifdef __USE_MISC Line150: /* Old compatibility names for C types. */ Line151: typedef unsigned long int ulong; Line152: typedef unsigned short int ushort; Line153: typedef unsigned int uint; Line154: #endif arm_gcc-3.4.6_uClibc-0.9.28 and arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32, the header file is the same. Could you give me some tips? Thanks. 发件人: Carmelo Amoroso [mailto:carmel...@gmail.com] 发送时间: 2013年6月5日星期三 12:26 收件人: Zhang Yu 抄送: uclibc@uclibc.org 主题: Re: arm_gcc-3.4.6_uClibc-0.9.28 - arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32. compile error Il giorno 05/giu/2013 05:04, Zhang Yu zhang...@oki.com ha scritto: uclibc: First, thanks for reading my mail. I encountered a curious problem about the uclibc version issue. Here is a example. I edited a C program below --- #define ushort unsigned short #include sys/types.h int main() { return 0; } --- I compiled this program on toolchain-arm_gcc-3.4.6_uClibc-0.9.28, it works well, programs can be compiled. But I upgrade my toolchain to toolchain-arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32_eabi and with the same program. The program can't be compiled. Here is the error message: /work/team-zhangyu/0524/ngn-hgw/OS/staging_dir_arm/bin/arm-openwrt-linux-ucl ibcgnueabi-gcc -Wall -g -o test -I../../include ../../common/libCOMMON_LIB.a ../../common/com_semaphore.o test.c In file included from test.c:4:0: /work/team-zhangyu/0524/ngn-hgw/OS_5G/staging_dir/toolchain-arm_v7-a_gcc-4.5 -linaro_uClibc-0.9.32_eabi/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.5.4/../ ../../../arm-openwrt-linux-uclibcgnueabi/sys-include/sys/types.h:152:28: error: duplicate 'unsigned' Check your header line 152 /work/team-zhangyu/0524/ngn-hgw/OS_5G/staging_dir/toolchain-arm_v7-a_gcc-4.5 -linaro_uClibc-0.9.32_eabi/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.5.4/../ ../../../arm-openwrt-linux-uclibcgnueabi/sys-include/sys/types.h:152:28: error: duplicate 'short' As above Can anybody help me solve this problem. Does this problem related to the version of the compiler? Thanks a lot for your help! I guess you should ask to your toolchain provider Carmelo ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
Re: 答复: arm_gcc-3.4.6_uClibc-0.9.28 - arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32. compile error
Il giorno 05/giu/2013 06:38, Zhang Yu zhang...@oki.com ha scritto: Line149: #ifdef __USE_MISC Line150: /* Old compatibility names for C types. */ Line151: typedef unsigned long int ulong; Line152: typedef unsigned short int ushort; Line153: typedef unsigned int uint; Line154: #endif Clearly seems that now __USE_MISC is defined. Remove your define and use C standard types. Do not abuse of macros and typedef just a shortcut. arm_gcc-3.4.6_uClibc-0.9.28 and arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32, the header file is the same. Could you give me some tips? Thanks. 发件人: Carmelo Amoroso [mailto:carmel...@gmail.com] 发送时间: 2013年6月5日星期三 12:26 收件人: Zhang Yu 抄送: uclibc@uclibc.org 主题: Re: arm_gcc-3.4.6_uClibc-0.9.28 - arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32. compile error Il giorno 05/giu/2013 05:04, Zhang Yu zhang...@oki.com ha scritto: uclibc: First, thanks for reading my mail. I encountered a curious problem about the uclibc version issue. Here is a example. I edited a C program below --- #define ushort unsigned short #include sys/types.h int main() { return 0; } --- I compiled this program on toolchain-arm_gcc-3.4.6_uClibc-0.9.28, it works well, programs can be compiled. But I upgrade my toolchain to toolchain-arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32_eabi and with the same program. The program can't be compiled. Here is the error message: /work/team-zhangyu/0524/ngn-hgw/OS/staging_dir_arm/bin/arm-openwrt-linux-ucl ibcgnueabi-gcc -Wall -g -o test -I../../include ../../common/libCOMMON_LIB.a ../../common/com_semaphore.o test.c In file included from test.c:4:0: /work/team-zhangyu/0524/ngn-hgw/OS_5G/staging_dir/toolchain-arm_v7-a_gcc-4.5 -linaro_uClibc-0.9.32_eabi/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.5.4/../ ../../../arm-openwrt-linux-uclibcgnueabi/sys-include/sys/types.h:152:28: error: duplicate 'unsigned' Check your header line 152 /work/team-zhangyu/0524/ngn-hgw/OS_5G/staging_dir/toolchain-arm_v7-a_gcc-4.5 -linaro_uClibc-0.9.32_eabi/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.5.4/../ ../../../arm-openwrt-linux-uclibcgnueabi/sys-include/sys/types.h:152:28: error: duplicate 'short' As above Can anybody help me solve this problem. Does this problem related to the version of the compiler? Thanks a lot for your help! I guess you should ask to your toolchain provider Carmelo ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc
答复: 答复: arm_gcc-3.4.6_uClibc-0.9.28 - arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32. compile error
I commented the line 149 and line 154. And then I respectively compile the same program using arm_gcc-3.4.6_uClibc-0.9.28 and arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32. The program can be compiled in arm_gcc-3.4.6_uClibc-0.9.28. But in arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32, the program can’t be compiled, and error occurred as below. Is there something difference with the compiler? 发件人: Carmelo Amoroso [mailto:carmel...@gmail.com] 发送时间: 2013年6月5日星期三 12:45 收件人: Zhang Yu 抄送: uclibc@uclibc.org 主题: Re: 答复: arm_gcc-3.4.6_uClibc-0.9.28 - arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32. compile error Il giorno 05/giu/2013 06:38, Zhang Yu zhang...@oki.com ha scritto: Line149: #ifdef __USE_MISC Line150: /* Old compatibility names for C types. */ Line151: typedef unsigned long int ulong; Line152: typedef unsigned short int ushort; Line153: typedef unsigned int uint; Line154: #endif Clearly seems that now __USE_MISC is defined. Remove your define and use C standard types. Do not abuse of macros and typedef just a shortcut. arm_gcc-3.4.6_uClibc-0.9.28 and arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32, the header file is the same. Could you give me some tips? Thanks. 发件人: Carmelo Amoroso [mailto:carmel...@gmail.com] 发送时间: 2013年6月5日星期三 12:26 收件人: Zhang Yu 抄送: uclibc@uclibc.org 主题: Re: arm_gcc-3.4.6_uClibc-0.9.28 - arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32. compile error Il giorno 05/giu/2013 05:04, Zhang Yu zhang...@oki.com ha scritto: uclibc: First, thanks for reading my mail. I encountered a curious problem about the uclibc version issue. Here is a example. I edited a C program below --- #define ushort unsigned short #include sys/types.h int main() { return 0; } --- I compiled this program on toolchain-arm_gcc-3.4.6_uClibc-0.9.28, it works well, programs can be compiled. But I upgrade my toolchain to toolchain-arm_v7-a_gcc-4.5-linaro_uClibc-0.9.32_eabi and with the same program. The program can't be compiled. Here is the error message: /work/team-zhangyu/0524/ngn-hgw/OS/staging_dir_arm/bin/arm-openwrt-linux-ucl ibcgnueabi-gcc -Wall -g -o test -I../../include ../../common/libCOMMON_LIB.a ../../common/com_semaphore.o test.c In file included from test.c:4:0: /work/team-zhangyu/0524/ngn-hgw/OS_5G/staging_dir/toolchain-arm_v7-a_gcc-4.5 -linaro_uClibc-0.9.32_eabi/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.5.4/../ ../../../arm-openwrt-linux-uclibcgnueabi/sys-include/sys/types.h:152:28: error: duplicate 'unsigned' Check your header line 152 /work/team-zhangyu/0524/ngn-hgw/OS_5G/staging_dir/toolchain-arm_v7-a_gcc-4.5 -linaro_uClibc-0.9.32_eabi/lib/gcc/arm-openwrt-linux-uclibcgnueabi/4.5.4/../ ../../../arm-openwrt-linux-uclibcgnueabi/sys-include/sys/types.h:152:28: error: duplicate 'short' As above Can anybody help me solve this problem. Does this problem related to the version of the compiler? Thanks a lot for your help! I guess you should ask to your toolchain provider Carmelo ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc ___ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc