Subject: Re: can't compile binutils-2.7
To: Zach Fine <zach@xdsl014.serv.net>
From: Eduardo E. Horvath <eeh@one-o.com>
List: netbsd-help
Date: 02/25/2000 12:01:11
> I need to compile the gnu binutils-2.7 (I need to use that version
> because it's the one for which there's a patch for the free PalmOS
> development tools for Unix -- see http://elf.org/pilot/develop.html).
> 
> Every time I try to compile them on my NetBSD 1.4.1 box, compilation
> stops with this error:
> 
> ------------------------------------------------------------------------
> test -z "" ||  gcc -O2 -c -g -I. -I./../include   strerror.c -o pic/strerror.o
> gcc -O2 -c -g -I. -I./../include  strerror.c
> strerror.c:459: conflicting types for `sys_errlist'
> /usr/include/errno.h:61: previous declaration of `sys_errlist'
> strerror.c: In function `init_error_tables':
> strerror.c:544: warning: assignment of read-only variable `sys_nerr'
> *** Error code 1
> 
> Stop.
> *** Error code 1
> 
> Stop.
> xdsl014% 
> ------------------------------------------------------------------------
> 
> I'm a bit surprised that anything as important as the gnu binutils
> would fail to compile cleanly on NetBSD without modification. I could
> probably edit a line or two in strerror.c and get past this particular
> error, but I'm worried that there are probably many more errors to
> follow. 
> 
> I'm hoping that somebody, anybody, on this mailing list has gotten
> this version of the gnu binutils to compile on their NetBSD box, and
> can share the secret or some patches. If anyone out there has managed
> to compile the entire gnu PalmOS development toolkit or is interested
> in compiling it for NetBSD, please get in touch with me.  I'd love to
> see this available as a NetBSD package.

I've seen the same thing happen with binutils-2.9.1 and
NetBSD-current.  I think that binutils' method of locating
`sys_errlist' in the sources is somewhat broken.  Anyway, I haven't
found any other problems with `binutils-2.9.1' after fixing
`libiberty/config.h', and one SPARC V9 assembler bug.  So I'd say give
it a try.

=========================================================================
Eduardo Horvath				eeh@netbsd.org
	"I need to find a pithy new quote." -- me