Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Sat, 17 Nov 2001 17:12:44 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: gcc-2.95.3-5 on cygwin compilation problem Message-ID: <20011117221244.GA29470@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <3bfad34b DOT 1447511 AT smtp DOT swampdog> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3bfad34b.1447511@smtp.swampdog> User-Agent: Mutt/1.3.23.1i Just remove all occurrences of strerror.[oc] from the Makefile. cgf On Sat, Nov 17, 2001 at 09:41:48PM +0000, Guy Harrison wrote: >On Thu, 15 Nov 2001 12:15:36 -0700, "Joe Graham" >wrote: > >FWIW here's my stab at it... > >There should be only one sys_errlist. > >>Hello >>I ran into the following 2 problems when trying to build gcc-2.95.3-5 on >>cygwin and gcc-3.0. Both gave me the same problems in the same file. Below >>is how i got it to compile but I sure my implementation is probably wrong. >>Here goes. >>******** >>error 1: >>******** >>in file: >>/libiberty/strerror.c >>../../gcc-2.95.3-5/libiberty/strerror.c:464: conflicting types for >>`sys_errlist >>/usr/include/sys/errno.h:23: previous declaration of `sys_errlist' >>make[1]: *** [strerror.o] Error 1 > >extern __IMPORT const char * const sys_errlist[]; > >Just about as 'const' as you can get. > >>original: >>static const char **sys_errlist; >>fix: >>//static const char **sys_errlist; >>(commenting out the declaration fixes this) > >Declaration here allows you to declare a "creatable" sys_errlist. The >system one above is effectively saying there already is one. > >>******** >>error 2: >>******** >>in file: >>/libiberty/strerror.c >>../../gcc-2.95.3-5/libiberty/strerror.c >>../../gcc-2.95.3-5/libiberty/strerror.c: In function `init_error_tables': >>../../gcc-2.95.3-5/libiberty/strerror.c:546: `sys_errlist' has an incomplete >>typ >>e >>original: >> if ((sys_errlist = (const char **) malloc (nbytes)) != NULL) >>fix: >> if ((sys_errlist[eip->value] = (const char **) malloc (nbytes)) != >>NULL) >>(does this need to be eip->name ?) > >I suspect there's nothing wrong and your fix is horribly broken. > >>here's the diff >>464c464 >>< //static const char **sys_errlist; >>--- >>> static const char **sys_errlist; >>546c546 >>< if ((sys_errlist[eip->value] = (const char **) malloc (nbytes)) != >>NULL) >> >>--- >>> if ((sys_errlist = (const char **) malloc (nbytes)) != NULL) > >I've not compiled gcc but methinks there's two effective choices. > >1) Compile against already existing 'sys_errlist'. >2) gcc creates its own 'sys_errlist'. > >This is only a guess: you want option (1). Option (2) probably exists >for "bootstrapping" gcc. > >I took a look at strerror.c and the problem code is conditional on >HAVE_SYSERRLIST - that must be undefined, at least at that point, >otherwise the problem would not have arisen. You need to discover why >(config.h - configure). > > >-- >swamp-dog AT ntlworld DOT com > >-- >Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple >Bug reporting: http://cygwin.com/bugs.html >Documentation: http://cygwin.com/docs.html >FAQ: http://cygwin.com/faq/ -- cgf AT redhat DOT com Red Hat, Inc. http://sources.redhat.com/ http://www.redhat.com/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/