找回密码
 注册
查看: 1384|回复: 7

请教一个GCC的问题

[复制链接]
发表于 2006-8-20 21:13:24 | 显示全部楼层 |阅读模式
从网上下了gcc-4.1.1.tar.bz2的包,然后解压,接着配置,如果配置的选项是:../gcc-4.1.1/configure --prefix=/usr/local/gcc-4.1.1 --enable-threads=posix --with-system-zlib --enable-languages=c,c++,java
的话,在后来的编译中,有关java的就总是过不去,而如果把language中的java去掉,最后就可以安装成功gcc4.1.1.这是为什么呢?出错信息是:

        ../../gcc-4.1.1/gcc/java/jcf-io.c -o java/jcf-io.o
../../gcc-4.1.1/gcc/java/jcf-io.c:43:18: error: zlib.h: 没有这个文件或目录../../gcc-4.1.1/gcc/java/jcf-io.c: In function \u2018read_zip_member\u2019:
../../gcc-4.1.1/gcc/java/jcf-io.c:193: error: \u2018Z_NO_COMPRESSION\u2019 undeclared (fir st use in this function)
../../gcc-4.1.1/gcc/java/jcf-io.c:193: error: (Each undeclared identifier is rep orted only once
../../gcc-4.1.1/gcc/java/jcf-io.c:193: error: for each function it appears in.)
../../gcc-4.1.1/gcc/java/jcf-io.c:206: error: \u2018z_stream\u2019 undeclared (first use i n this function)
../../gcc-4.1.1/gcc/java/jcf-io.c:206: error: expected \u2018;\u2019 before \u2018d_stream\u2019
../../gcc-4.1.1/gcc/java/jcf-io.c:207: error: \u2018d_stream\u2019 undeclared (first use i n this function)
../../gcc-4.1.1/gcc/java/jcf-io.c:207: error: \u2018alloc_func\u2019 undeclared (first use  in this function)
../../gcc-4.1.1/gcc/java/jcf-io.c:207: error: expected \u2018;\u2019 before numeric consta nt
../../gcc-4.1.1/gcc/java/jcf-io.c:208: error: \u2018free_func\u2019 undeclared (first use in this function)
../../gcc-4.1.1/gcc/java/jcf-io.c:208: error: expected \u2018;\u2019 before numeric consta nt
../../gcc-4.1.1/gcc/java/jcf-io.c:209: error: \u2018voidpf\u2019 undeclared (first use in this function)
../../gcc-4.1.1/gcc/java/jcf-io.c:209: error: expected \u2018;\u2019 before numeric consta nt
../../gcc-4.1.1/gcc/java/jcf-io.c:225: warning: implicit declaration of function  \u2018inflateInit2\u2019
../../gcc-4.1.1/gcc/java/jcf-io.c:225: error: \u2018MAX_WBITS\u2019 undeclared (first use in this function)
../../gcc-4.1.1/gcc/java/jcf-io.c:226: warning: implicit declaration of function  \u2018inflate\u2019
../../gcc-4.1.1/gcc/java/jcf-io.c:226: error: \u2018Z_NO_FLUSH\u2019 undeclared (first use  in this function)
../../gcc-4.1.1/gcc/java/jcf-io.c:227: warning: implicit declaration of function  \u2018inflateEnd\u2019
make[2]: *** [java/jcf-io.o] 错误1
make[2]: Leaving directory `/usr/src/gcc-4.1.1-build/gcc'
make[1]: *** [stage2_build] 错误2
make[1]: Leaving directory `/usr/src/gcc-4.1.1-build/gcc'
make: *** [bootstrap] \u9519\u8bef 2
发表于 2006-8-20 22:03:11 | 显示全部楼层
--with-system-zlib
当然要你装好 zlib ,特别是 zlib 的开发包了,一般是 zlib-devel .
回复

使用道具 举报

 楼主| 发表于 2006-8-21 09:29:19 | 显示全部楼层
那为什么在配置configure后,objdir出现了zlib的文件夹?zlib不是自动就安装的吗?
回复

使用道具 举报

发表于 2006-8-21 10:04:03 | 显示全部楼层
你用了--with-system-zlib就不会自动安装了
回复

使用道具 举报

 楼主| 发表于 2006-8-21 13:33:11 | 显示全部楼层
我下载了一个zlib的rpm包装上后,仍然出现了原来的问题啊。
回复

使用道具 举报

发表于 2006-8-21 13:57:55 | 显示全部楼层
不是 zlib 的 runtime, 而是开发包
回复

使用道具 举报

 楼主| 发表于 2006-8-21 15:10:14 | 显示全部楼层
谢谢,java的问题跳过去了,可是又出现了新的问题:

WARNING: `makeinfo' is missing on your system.  You should only need it if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
make[4]: *** [fastjar.info] 错误1
make[4]: Leaving directory `/usr/src/gcc-4.1.1-build/fastjar'
make[3]: *** [all] 错误 2
make[3]: Leaving directory `/usr/src/gcc-4.1.1-build/fastjar'
make[2]: *** [all-fastjar] 错误 2
make[2]: Leaving directory `/usr/src/gcc-4.1.1-build'
make[1]: *** [all] 错误2
make[1]: Leaving directory `/usr/src/gcc-4.1.1-build'
make: *** [bootstrap] 错误2

难道是make的版本太老了?还是要装fastjar?我装fastjar时候提示和libgcj冲突。
回复

使用道具 举报

发表于 2006-8-22 13:04:00 | 显示全部楼层
安装texinfo
回复

使用道具 举报

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

本版积分规则

GMT+8, 2025-2-6 18:57 , Processed in 0.037778 second(s), 15 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

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