红联Linux门户
Linux帮助

cramfs-1.1.tar.gz 无法编译生成 mkcramfs

发布时间:2011-10-23 21:06:55来源:红联作者:whjcc
下载了 cramfs-1.1.tar.gz 无法编译生成 mkcramfs
在fedora15 下,我编译mkcramfs
以下是出错提示的一部分:

[study@localhost cramfs-1.1]$ make
gcc -W -Wall -O2 -g -I. mkcramfs.c -lz -o mkcramfs
mkcramfs.c: In function ‘parse_directory’:
mkcramfs.c:245:2: warning: passing argument 4 of ‘scandir’ from incompatible pointer type [enabled by default]
/usr/include/dirent.h:252:12: note: expected ‘int (*)(const struct dirent **, const struct dirent **)’ but argument is of type ‘int (*)(const void *, const void *)’
mkcramfs.c:287:15: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
mkcramfs.c: In function ‘write_superblock’:
mkcramfs.c:392:2: warning: implicit declaration of function ‘crc32’ [-Wimplicit-function-declaration]
mkcramfs.c:392:30: error: ‘Z_NULL’ undeclared (first use in this function)
mkcramfs.c:392:30: note: each undeclared identifier is reported only once for each function it appears in
mkcramfs.c:399:3: warning: pointer targets in passing argument 1 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign]
mkcramfs.c:399:3: note: expected ‘char *’ but argument is of type ‘u8 *’
mkcramfs.c:401:3: warning: pointer targets in passing argument 1 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign]
mkcramfs.c:401:3: note: expected ‘char *’ but argument is of type ‘u8 *’
mkcramfs.c: In function ‘write_directory_structure’:
mkcramfs.c:480:4: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
mkcramfs.c: In function ‘do_compress’:
mkcramfs.c:598:4: warning: implicit declaration of function ‘compress2’ [-Wimplicit-function-declaration]
mkcramfs.c:600:5: warning: implicit declaration of function ‘zError’ [-Wimplicit-function-declaration]
mkcramfs.c: In function ‘write_data’:
mkcramfs.c:647:5: warning: pointer targets in passing argument 3 of ‘do_compress’ differ in signedness [-Wpointer-sign]
mkcramfs.c:578:21: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
mkcramfs.c: In function ‘main’:
mkcramfs.c:824:18: error: ‘Z_NULL’ undeclared (first use in this function)
make: *** [mkcramfs] Error 1
网上搜索了很多,没有用。
请教专家。
文章评论

共有 1 条评论

  1. alick 于 2011-10-24 23:40:15发表:

    楼主安装了 zlib-devel 软件包了么,感觉像是缺这个开发包(头文件包)