public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problems running GCC on Solaris (include files)
@ 2001-11-02 23:35 Max Heffler
  2001-11-03 16:13 ` Rupert Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Max Heffler @ 2001-11-02 23:35 UTC (permalink / raw)
  To: gcc-help

I have built GCC on Solaris 2.6. I can build and run 
hello.c, but if I add any system include file 
(types.h, stdio.h), I get storage class messages 
followed by parse errors (probably from B_FALSE 
undeclared) and the program no longer builds. I had 
this same behavior using the pre-built binaries and 
Solaris 8. The stage compares succeeded without 
error. I used the SparcWorks C compiler and built 
with prefix=/apps/gnu.

I can run a compile in the object tree's gcc 
directory successfully; however, attempting to use 
the same compiler flags does not work with hello.c if 
I have a single <sys/types.h> or <stdio.h>.

Any ideas? Thanks in advance.

On another note, after configuring, I had to make a 
few changes to complete the build. There were 
complaints about "inline" so I changed the 
definitions to "#define inline /**/" since no other 
options seemed to satisfy the compiler. There were 
also some incorrect macros for some lwp varilables I 
had to comment out.

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

* RE: Problems running GCC on Solaris (include files)
  2001-11-02 23:35 Problems running GCC on Solaris (include files) Max Heffler
@ 2001-11-03 16:13 ` Rupert Wood
       [not found]   ` <me@rupey.net>
  0 siblings, 1 reply; 3+ messages in thread
From: Rupert Wood @ 2001-11-03 16:13 UTC (permalink / raw)
  To: 'Max Heffler'; +Cc: gcc-help

Max Heffler wrote:

> On another note, after configuring, I had to make a few changes to
> complete the build. There were complaints about "inline" so I
> changed the definitions to "#define inline /**/" since no other 
> options seemed to satisfy the compiler.

This sounds like you're building the guts of GCC with Sun cc. This
shouldn't happen; the system compiler should only be used to build GCC's
C compiler in stage1 of the bootstrap. The stage1 compiler should then
be used to build the rest and it accepts 'inline' in plain C.

May I check that you built GCC with 'make bootstrap' and not 'make'?

(As a side note, I don't think you needed the "/**/"; you can get away
with "#define inline". The last time I had to make this hack for Sun
Forte, though, I think I used "#define inline static": you won't be
relying on a function defined inline in a sourcefile to export, and if a
function defined inline in a header exports then you'll hit problems.)

I have no experience of Solaris 2.6 myself but it sounds like your other
problems should have been covered by GCC's 'fixincludes'. It might not
pick these up properly if you didn't bootstrap the compiler or didn't
"make install" it. If you don't want to install it, you'll need to add
an include path to the fixed headers in the gcc build tree (although I'm
afraid I forget exactly where).

Good luck,
Rup.

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

* RE: Problems running GCC on Solaris (include files)
       [not found]   ` <me@rupey.net>
@ 2001-11-04  8:45     ` Max Heffler
  0 siblings, 0 replies; 3+ messages in thread
From: Max Heffler @ 2001-11-04  8:45 UTC (permalink / raw)
  To: gcc-help

Only the first stage was built using Sun's cc and 
using "make bootstrap." The other stages built 
correctly using xgcc. At the end, I did "make 
install." Both the installed gcc and the working xgcc 
have the same issue with the include files when I try 
to compile my hello.c, but not when the xgcc is 
compiling its own code. Here is the "configure --
help:"

# This directory was configured as follows:
../gcc-3.0.2/configure --with-gcc-version-
trigger=/nfs/users1/mgheffl/gnu/gcc-
3.0.2/gcc/version.c --host=sparc-sun-solaris2.6 --
prefix=/apps/gnu --with-local-prefix=/apps/gnu --with-
gnu-as --with-as=/apps/gnu/bin/as --with-gnu-ld --
with-ld=/apps/gnu/bin/ld.exe --norecursion 
# using "mh-frag"

Any other ideas? Thanks.


---- Rupert Wood <me@rupey.net> wrote:
> Max Heffler wrote:
> 
> > On another note, after configuring, I had to make 
a few changes to
> > complete the build. There were complaints 
about "inline" so I
> > changed the definitions to "#define inline /**/" 
since no other 
> > options seemed to satisfy the compiler.
> 
> This sounds like you're building the guts of GCC 
with Sun cc. This
> shouldn't happen; the system compiler should only 
be used to build GCC's
> C compiler in stage1 of the bootstrap. The stage1 
compiler should then
> be used to build the rest and it accepts 'inline' 
in plain C.
> 
> May I check that you built GCC with 'make 
bootstrap' and not 'make'?
> 
> (As a side note, I don't think you needed 
the "/**/"; you can get away
> with "#define inline". The last time I had to make 
this hack for Sun
> Forte, though, I think I used "#define inline 
static": you won't be
> relying on a function defined inline in a 
sourcefile to export, and if a
> function defined inline in a header exports then 
you'll hit problems.)
> 
> I have no experience of Solaris 2.6 myself but it 
sounds like your other
> problems should have been covered by 
GCC's 'fixincludes'. It might not
> pick these up properly if you didn't bootstrap the 
compiler or didn't
> "make install" it. If you don't want to install it, 
you'll need to add
> an include path to the fixed headers in the gcc 
build tree (although I'm
> afraid I forget exactly where).
> 
> Good luck,
> Rup.
> 
> 
> 

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-02 23:35 Problems running GCC on Solaris (include files) Max Heffler
2001-11-03 16:13 ` Rupert Wood
     [not found]   ` <me@rupey.net>
2001-11-04  8:45     ` Max Heffler

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