public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Fwd: Eorror compiling GCC-4.8.0 for Solaris 2.9 and 2.10
@ 2019-09-30 15:47 Lincoln
  2019-10-01 13:51 ` Rainer Orth
  0 siblings, 1 reply; 6+ messages in thread
From: Lincoln @ 2019-09-30 15:47 UTC (permalink / raw)
  To: gcc-help

Hi GNU.ORG,

I am getting the error below when I try to compile gcc-4.8.0.  Can someone assist me with a possible solution:


"/tmp/gcc-4.8.0/libcpp/files.c", line 1268: Error: Cannot assign char* to int.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1371: Warning (Anachronism): Formal argument 2 of type extern "C" int(*)(void**,void*) in call to htab_traverse(htab*, extern "C" int(*)(void**,void*), void*) is being passed int(*)(void**,void*).
"/tmp/gcc-4.8.0/libcpp/files.c", line 1380: Warning (Anachronism): Formal argument 4 of type extern "C" int(*)(const void*,const void*) in call to std::qsort(void*, unsigned, unsigned, extern "C" int(*)(const void*,const void*)) is being passed int(*)(const void*,const void*).
"/tmp/gcc-4.8.0/libcpp/files.c", line 1386: Error: The function "__flsbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1530: Error: The function "__filbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1570: Error: The function "__filbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1584: Error: The function "__filbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1597: Error: The function "__filbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1677: Error: The function "__flsbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1834: Warning (Anachronism): Formal argument 4 of type extern "C" int(*)(const void*,const void*) in call to std::qsort(void*, unsigned, unsigned, extern "C" int(*)(const void*,const void*)) is being pa
ssed int(*)(const void*,const void*).
"/tmp/gcc-4.8.0/libcpp/files.c", line 1932: Warning (Anachronism): Formal argument 5 of type extern "C" int(*)(const void*,const void*) in call to std::bsearch(const void*, const void*, unsigned, unsigned, extern "C" int(*)(const void*,cons
t void*)) is being passed int(*)(const void*,const void*).
7 Error(s) and 11 Warning(s) detected.
make[3]: *** [Makefile:223: files.o] Error 7
make[3]: Leaving directory '/tmp/gcc-4.8.0/objdir/libcpp'
make[2]: *** [Makefile:9816: all-stage1-libcpp] Error 2
make[2]: Leaving directory '/tmp/gcc-4.8.0/objdir'
make[1]: *** [Makefile:20357: stage1-bubble] Error 2
make[1]: Leaving directory '/tmp/gcc-4.8.0/objdir'
make: *** [Makefile:889: all] Error 2


Thank you,

Lincoln.......
-----------------------------------------------------------
The wheel is spinning, but the hamster is asleep!
Yes! The Truth is Out There, Somewhere!

-----Original Message-----
From: "Lincoln" [fslsf@excite.com]
Date: 09/30/2019 11:43 AM
To: gcc@gcc.gnu.org
Subject: Eorror compiling GCC-4.8.0 for Solaris 2.9 and 2.10

Hi GNU.ORG,

I am getting the error below when I try to compile gcc-4.8.0.  Can someone assist me with a possible solution:


"/tmp/gcc-4.8.0/libcpp/files.c", line 1268: Error: Cannot assign char* to int.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1371: Warning (Anachronism): Formal argument 2 of type extern "C" int(*)(void**,void*) in call to htab_traverse(htab*, extern "C" int(*)(void**,void*), void*) is being passed int(*)(void**,void*).
"/tmp/gcc-4.8.0/libcpp/files.c", line 1380: Warning (Anachronism): Formal argument 4 of type extern "C" int(*)(const void*,const void*) in call to std::qsort(void*, unsigned, unsigned, extern "C" int(*)(const void*,const void*)) is being passed int(*)(const void*,const void*).
"/tmp/gcc-4.8.0/libcpp/files.c", line 1386: Error: The function "__flsbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1530: Error: The function "__filbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1570: Error: The function "__filbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1584: Error: The function "__filbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1597: Error: The function "__filbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1677: Error: The function "__flsbuf" must have a prototype.
"/tmp/gcc-4.8.0/libcpp/files.c", line 1834: Warning (Anachronism): Formal argument 4 of type extern "C" int(*)(const void*,const void*) in call to std::qsort(void*, unsigned, unsigned, extern "C" int(*)(const void*,const void*)) is being pa
ssed int(*)(const void*,const void*).
"/tmp/gcc-4.8.0/libcpp/files.c", line 1932: Warning (Anachronism): Formal argument 5 of type extern "C" int(*)(const void*,const void*) in call to std::bsearch(const void*, const void*, unsigned, unsigned, extern "C" int(*)(const void*,cons
t void*)) is being passed int(*)(const void*,const void*).
7 Error(s) and 11 Warning(s) detected.
make[3]: *** [Makefile:223: files.o] Error 7
make[3]: Leaving directory '/tmp/gcc-4.8.0/objdir/libcpp'
make[2]: *** [Makefile:9816: all-stage1-libcpp] Error 2
make[2]: Leaving directory '/tmp/gcc-4.8.0/objdir'
make[1]: *** [Makefile:20357: stage1-bubble] Error 2
make[1]: Leaving directory '/tmp/gcc-4.8.0/objdir'
make: *** [Makefile:889: all] Error 2


Thank you,

Lincoln.......
-----------------------------------------------------------
The wheel is spinning, but the hamster is asleep!
Yes! The Truth is Out There, Somewhere!


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

* Re: Fwd: Eorror compiling GCC-4.8.0 for Solaris 2.9 and 2.10
  2019-09-30 15:47 Fwd: Eorror compiling GCC-4.8.0 for Solaris 2.9 and 2.10 Lincoln
@ 2019-10-01 13:51 ` Rainer Orth
  2019-10-01 15:33   ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Rainer Orth @ 2019-10-01 13:51 UTC (permalink / raw)
  To: Lincoln; +Cc: gcc-help

Hi Lincoln,

> I am getting the error below when I try to compile gcc-4.8.0.  Can someone
> assist me with a possible solution:

it usually helps if you provide some context:

* What host compiler did you use?

* How exactly did you configure gcc?

> "/tmp/gcc-4.8.0/libcpp/files.c", line 1268: Error: Cannot assign char* to int.
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1371: Warning (Anachronism): Formal
> argument 2 of type extern "C" int(*)(void**,void*) in call to
> htab_traverse(htab*, extern "C" int(*)(void**,void*), void*) is being
> passed int(*)(void**,void*).
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1380: Warning (Anachronism): Formal
> argument 4 of type extern "C" int(*)(const void*,const void*) in call to
> std::qsort(void*, unsigned, unsigned, extern "C" int(*)(const void*,const
> void*)) is being passed int(*)(const void*,const void*).
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1386: Error: The function "__flsbuf"
> must have a prototype.
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1530: Error: The function "__filbuf"
> must have a prototype.
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1570: Error: The function "__filbuf"
> must have a prototype.
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1584: Error: The function "__filbuf"
> must have a prototype.
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1597: Error: The function "__filbuf"
> must have a prototype.
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1677: Error: The function "__flsbuf"
> must have a prototype.
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1834: Warning (Anachronism): Formal
> argument 4 of type extern "C" int(*)(const void*,const void*) in call to
> std::qsort(void*, unsigned, unsigned, extern "C" int(*)(const void*,const
> void*)) is being pa
> ssed int(*)(const void*,const void*).
> "/tmp/gcc-4.8.0/libcpp/files.c", line 1932: Warning (Anachronism): Formal
> argument 5 of type extern "C" int(*)(const void*,const void*) in call to
> std::bsearch(const void*, const void*, unsigned, unsigned, extern "C"
> int(*)(const void*,cons
> t void*)) is being passed int(*)(const void*,const void*).
> 7 Error(s) and 11 Warning(s) detected.
> make[3]: *** [Makefile:223: files.o] Error 7
> make[3]: Leaving directory '/tmp/gcc-4.8.0/objdir/libcpp'
> make[2]: *** [Makefile:9816: all-stage1-libcpp] Error 2
> make[2]: Leaving directory '/tmp/gcc-4.8.0/objdir'
> make[1]: *** [Makefile:20357: stage1-bubble] Error 2
> make[1]: Leaving directory '/tmp/gcc-4.8.0/objdir'
> make: *** [Makefile:889: all] Error 2

From the format of the error messages I suppose you've been trying to
use some version of the Studio compilers?  If so, you'll probably have a
hard time with anything newer than GCC 4.7 which is the last version
that can be compiled with a C90 compiler.  While in theory GCC 4.8 and
up should work with any C++98 compiler, this hasn't been tried with
anything but g++ (and probably clang++) in a long time, so you're almost
guaranteed to run into lots of problems.

On Solaris 9, I'd strongly suggest to either build GCC 4.7 with a
preexisting version of gcc (pretty much any version should do) or
probably even Studio cc.  If you like (and I'd recommend to try this),
you should use this freshly built version of gcc 4.7 to bootstrap GCC
4.9 (the last version supporting Solaris 9).

On Solaris 10, you have a preinstalled version of gcc 3.4.3 in
/usr/sfw/bin to start from.   In theory (I haven't tried this myself),
this should be good enough to build even GCC 9, the last version
supported on Solaris 10.  If that fails for some reason, you can try to
go via some intermediate version of gcc instead.

In both cases I strongly recommend you thoroughly review the
installation docs for the version of gcc you're building not to fall
into traps that are already known.

Besides, unless you're strictly wedded to GCC 4.8 for some reason, it's
in your best interest to go for the last version of GCC supported on
your Solaris versions which are certain to have all sorts of bugs
already fixed.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

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

* Re: Fwd: Eorror compiling GCC-4.8.0 for Solaris 2.9 and 2.10
  2019-10-01 13:51 ` Rainer Orth
@ 2019-10-01 15:33   ` Jonathan Wakely
  2019-10-01 20:57     ` Dennis Clarke
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2019-10-01 15:33 UTC (permalink / raw)
  To: Lincoln; +Cc: gcc-help, Rainer Orth

On Tue, 1 Oct 2019 at 14:51, Rainer Orth wrote:
> Besides, unless you're strictly wedded to GCC 4.8 for some reason, it's
> in your best interest to go for the last version of GCC supported on
> your Solaris versions which are certain to have all sorts of bugs
> already fixed.

And even if you need GCC 4.8, choosing 4.8.0 rather than 4.8.5 is a
very bad choice.

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

* Re: Fwd: Eorror compiling GCC-4.8.0 for Solaris 2.9 and 2.10
  2019-10-01 15:33   ` Jonathan Wakely
@ 2019-10-01 20:57     ` Dennis Clarke
  2019-10-02  9:16       ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Dennis Clarke @ 2019-10-01 20:57 UTC (permalink / raw)
  To: gcc-help

On 10/1/19 11:33 AM, Jonathan Wakely wrote:
> On Tue, 1 Oct 2019 at 14:51, Rainer Orth wrote:
>> Besides, unless you're strictly wedded to GCC 4.8 for some reason, it's
>> in your best interest to go for the last version of GCC supported on
>> your Solaris versions which are certain to have all sorts of bugs
>> already fixed.
> 
> And even if you need GCC 4.8, choosing 4.8.0 rather than 4.8.5 is a
> very bad choice.
> 

Not certain but I think GCC 8.2.0 works on Solaris 9 still.
Or am I thinking Solaris 10 ?

I think Rainer announced the situation a while back :

     Obsolete Solaris 10 support
     https://gcc.gnu.org/ml/gcc/2018-10/msg00139.html

Sad given that there is a lot of that out there still. Well, not a lot 
but certianly a bunch.  Some.  There are some out there still chugging.


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional



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

* Re: Fwd: Eorror compiling GCC-4.8.0 for Solaris 2.9 and 2.10
  2019-10-01 20:57     ` Dennis Clarke
@ 2019-10-02  9:16       ` Jonathan Wakely
  2019-10-02 14:49         ` Dennis Clarke
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2019-10-02  9:16 UTC (permalink / raw)
  To: Dennis Clarke; +Cc: gcc-help

On Tue, 1 Oct 2019 at 21:57, Dennis Clarke wrote:
>
> On 10/1/19 11:33 AM, Jonathan Wakely wrote:
> > On Tue, 1 Oct 2019 at 14:51, Rainer Orth wrote:
> >> Besides, unless you're strictly wedded to GCC 4.8 for some reason, it's
> >> in your best interest to go for the last version of GCC supported on
> >> your Solaris versions which are certain to have all sorts of bugs
> >> already fixed.
> >
> > And even if you need GCC 4.8, choosing 4.8.0 rather than 4.8.5 is a
> > very bad choice.
> >
>
> Not certain but I think GCC 8.2.0 works on Solaris 9 still.
> Or am I thinking Solaris 10 ?

Solaris 9 is obsolete since GCC 4.9:
https://gcc.gnu.org/gcc-4.9/changes.html

Solaris 10 is obsolete since GCC 9:
https://gcc.gnu.org/gcc-9/changes.html

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

* Re: Fwd: Eorror compiling GCC-4.8.0 for Solaris 2.9 and 2.10
  2019-10-02  9:16       ` Jonathan Wakely
@ 2019-10-02 14:49         ` Dennis Clarke
  0 siblings, 0 replies; 6+ messages in thread
From: Dennis Clarke @ 2019-10-02 14:49 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

On 10/2/19 5:16 AM, Jonathan Wakely wrote:
> On Tue, 1 Oct 2019 at 21:57, Dennis Clarke wrote:
>>
>> On 10/1/19 11:33 AM, Jonathan Wakely wrote:
>>> On Tue, 1 Oct 2019 at 14:51, Rainer Orth wrote:
>>>> Besides, unless you're strictly wedded to GCC 4.8 for some reason, it's
>>>> in your best interest to go for the last version of GCC supported on
>>>> your Solaris versions which are certain to have all sorts of bugs
>>>> already fixed.
>>>
>>> And even if you need GCC 4.8, choosing 4.8.0 rather than 4.8.5 is a
>>> very bad choice.
>>>
>>
>> Not certain but I think GCC 8.2.0 works on Solaris 9 still.
>> Or am I thinking Solaris 10 ?
> 
> Solaris 9 is obsolete since GCC 4.9:
> https://gcc.gnu.org/gcc-4.9/changes.html
> 
> Solaris 10 is obsolete since GCC 9:
> https://gcc.gnu.org/gcc-9/changes.html
> 

Right.  So 8.3.0 should work just fine.


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional

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

end of thread, other threads:[~2019-10-02 14:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-30 15:47 Fwd: Eorror compiling GCC-4.8.0 for Solaris 2.9 and 2.10 Lincoln
2019-10-01 13:51 ` Rainer Orth
2019-10-01 15:33   ` Jonathan Wakely
2019-10-01 20:57     ` Dennis Clarke
2019-10-02  9:16       ` Jonathan Wakely
2019-10-02 14:49         ` Dennis Clarke

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).