public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: gcc-2.95.3-5 on cygwin compilation problem
  2001-11-11  8:26   ` Christopher Faylor
@ 2001-11-11  8:26     ` Guy Harrison
  0 siblings, 0 replies; 5+ messages in thread
From: Guy Harrison @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

On Sat, 17 Nov 2001 17:12:44 -0500, Christopher Faylor <cgf@redhat.com>
wrote:

>Just remove all occurrences of strerror.[oc] from the Makefile.

Now there's an idea! :-)

>On Sat, Nov 17, 2001 at 09:41:48PM +0000, Guy Harrison wrote:
>>On Thu, 15 Nov 2001 12:15:36 -0700, "Joe Graham" <joe@aiobjects.com>
>>wrote:
>>
>>FWIW here's my stab at it...
[snip]


-- 
swamp-dog@ntlworld.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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gcc-2.95.3-5 on cygwin compilation problem
  2001-11-11  8:26 gcc-2.95.3-5 on cygwin compilation problem Joe Graham
@ 2001-11-11  8:26 ` Guy Harrison
  2001-11-11  8:26   ` Christopher Faylor
  2001-11-11  8:26 ` Jade
  1 sibling, 1 reply; 5+ messages in thread
From: Guy Harrison @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

On Thu, 15 Nov 2001 12:15:36 -0700, "Joe Graham" <joe@aiobjects.com>
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:
><gcc_source_directory>/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:
><gcc_source_directory>/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@ntlworld.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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gcc-2.95.3-5 on cygwin compilation problem
  2001-11-11  8:26 gcc-2.95.3-5 on cygwin compilation problem Joe Graham
  2001-11-11  8:26 ` Guy Harrison
@ 2001-11-11  8:26 ` Jade
  1 sibling, 0 replies; 5+ messages in thread
From: Jade @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

El jue, 15 nov 2001, escribiste:
> 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:
> <gcc_source_directory>/libiberty/strerror.c
> ../../gcc-2.95.3-5/libiberty/strerror.c:464: conflicting types for
> r`sys_errlist
> /usr/include/sys/errno.h:23: previous declaration of `sys_errlist'
> make[1]: *** [strerror.o] Error 1
 As i see it  u declared something that is declared in some other place, the
solution is:
Change the name of  the duplicate identifier

> <gcc_source_directory>/libiberty/strerror.c
> ../../gcc-2.95.3-5/libiberty/strerror.c
> 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
> Etyp
> 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 ?)
> 
> 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)
> 
> 
> --
Actually this one is hard ( I've used to Borland C++ so the error messages of
gcc are new for me) but I think that commanting out sys_errlist produced this,
you should check where else is sys_errlist declared (use grep an a lot of
pacience.
 That's my best
 -- 
Jade

--
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* gcc-2.95.3-5 on cygwin compilation problem
@ 2001-11-11  8:26 Joe Graham
  2001-11-11  8:26 ` Guy Harrison
  2001-11-11  8:26 ` Jade
  0 siblings, 2 replies; 5+ messages in thread
From: Joe Graham @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

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:
<gcc_source_directory>/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

original:
static const char **sys_errlist;
fix:
//static const char **sys_errlist;
(commenting out the declaration fixes this)

********
error 2:
********
in file:
<gcc_source_directory>/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 ?)

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)


--
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gcc-2.95.3-5 on cygwin compilation problem
  2001-11-11  8:26 ` Guy Harrison
@ 2001-11-11  8:26   ` Christopher Faylor
  2001-11-11  8:26     ` Guy Harrison
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Faylor @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin

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" <joe@aiobjects.com>
>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:
>><gcc_source_directory>/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:
>><gcc_source_directory>/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@ntlworld.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@redhat.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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-11-19 10:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-11  8:26 gcc-2.95.3-5 on cygwin compilation problem Joe Graham
2001-11-11  8:26 ` Guy Harrison
2001-11-11  8:26   ` Christopher Faylor
2001-11-11  8:26     ` Guy Harrison
2001-11-11  8:26 ` Jade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).