在Solaris上构建binutils 2.21.1a时出错

时间:2011-10-26 16:59:39

标签: solaris gnu binutils build-error

我正在尝试在Solaris sun4u sparc SunOS 5.10上从http://ftp.gnu.org/gnu/binutils构建binutils 2.21.1a。我使用的是gcc 4.0.2版。当我构建这个是错误:

cc1: warnings being treated as errors
compress.c: In function 'bfd_compress_section_contents':
compress.c:100: warning: implicit declaration of function 'compressBound'
make[2]: *** [compress.lo] Error 1
make[2]: Leaving directory `/nfs/netapp0/user/home/hart/downloads/binutils-2.21.1/bfd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/nfs/netapp0/user/home/hart/downloads/binutils-2.21.1/bfd'
*** Error code 2
make: Fatal error: Command failed for target `all'

我将--disable-werror添加到配置行以尝试绕过它,并希望继续构建。不幸的是,这也没有用,我在链接时得到了这个新的,相关的错误:

Undefined                       first referenced
 symbol                             in file
compressBound                       ../bfd/.libs/libbfd.a(compress.o)
ld: fatal: Symbol referencing errors. No output written to size
collect2: ld returned 1 exit status

我搜索了一个已存在的问题,但我发现没有任何相关内容。有任何想法吗?我更喜欢使用这个版本的binutils,但是如果你知道在这个平台上用gcc 4.0.2构建OK的版本,请告诉我。

1 个答案:

答案 0 :(得分:6)

我终于发现这个问题确实是BUG。解决方法是将--without-zlib添加到配置脚本或在系统上安装最新版本的zlib。