- 论坛徽章:
- 0
|
嗯,编译的是韦东山老师的u-boot-1.1.6
发现在编译crc32.o时,链接的/usr/include.zlib.h有错。这个错弄得我是有点莫名其妙。
网上找了,也没找到答案,所以这里贴出来,请各位大牛帮帮忙,谢谢。
原文如下:
- make -C tools all
- make[1]: Entering directory '/home/jimmyhu/Desktop/u-boot-1.1.6/tools'
- gcc -g -Wall -pedantic -idirafter /home/jimmyhu/Desktop/u-boot-1.1.6/include -idirafter /home/jimmyhu/Desktop/u-boot-1.1.6/include2 -idirafter /home/jimmyhu/Desktop/u-boot-1.1.6/include -DTEXT_BASE=0x33F80000 -DUSE_HOSTCC -O -c -o crc32.o crc32.c
- In file included from crc32.c:15:0:
- /usr/include/zlib.h:86:5: error: unknown type name ‘z_const’
- z_const Bytef *next_in; /* next input byte */
- ^
- /usr/include/zlib.h:86:19: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘*’ token
- z_const Bytef *next_in; /* next input byte */
- ^
- In file included from /usr/include/zlib.h:34:0,
- from crc32.c:15:
- /usr/include/zlib.h:1025:29: error: unknown type name ‘z_const’
- typedef unsigned (*in_func) OF((void FAR *,
- ^
- /usr/include/zlib.h:1029:33: error: unknown type name ‘in_func’
- ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
- ^
- In file included from crc32.c:15:0:
- /usr/include/zlib.h:1349:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Z_ARG’
- ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
- ^
- /usr/include/zlib.h:1673:5: error: unknown type name ‘z_off64_t’
- z_off64_t pos;
- ^
- /usr/include/zlib.h:1748:15: error: unknown type name ‘z_crc_t’
- ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
- ^
- /usr/include/zlib.h:1758:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Z_ARG’
- ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
- ^
- Makefile:164: recipe for target 'crc32.o' failed
- make[1]: *** [crc32.o] Error 1
- make[1]: Leaving directory '/home/jimmyhu/Desktop/u-boot-1.1.6/tools'
- Makefile:275: recipe for target 'tools' failed
- make: *** [tools] Error 2
复制代码 |
|