public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup
@ 2003-10-14  2:52 rrr6399 at futuretek dot com
  2003-10-14  3:08 ` [Bug bootstrap/12611] " rrr6399 at futuretek dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: rrr6399 at futuretek dot com @ 2003-10-14  2:52 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611

           Summary: Gcc doesn't handle SGI's modularized compiler setup
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rrr6399 at futuretek dot com
                CC: gcc-bugs at gcc dot gnu dot org

I'm attempting to get gcc 3.3.1 compiled on an SGI Origin with IRIX 6.5
and MIPSpro 7.4 compilers. On this system, they allow access to 
various versions of the compiler using the "module" command, such
as 
module load MIPSpro.7313b
or 
module load MIPSpro.74

Unfortunately this creates havoc for gcc who'd like to see the
files in /usr/include. For instance, the bootstrap compiler 
fails when it can't find math.h:

stage1/xgcc -Bstage1/ -B/u/ba/rrr6399/opt/gcc-3.3.1/mips-sgi-irix6.5/bin/   -g
-O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wtraditional -pedantic -Wno-long-long   -DHAVE_CONFIG_H  -o jvgenmain
java/jvgenmain.o java/mangle_name.o errors.o ./intl/libintl.a  
../libiberty/libiberty.a
ld32: WARNING 84 : ./intl/libintl.a is not used for resolving any symbol.
stage1/xgcc -Bstage1/ -B/u/ba/rrr6399/opt/gcc-3.3.1/mips-sgi-irix6.5/bin/ -c  
-g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes    -DHAVE_CONFIG_H    -I. -Ijava -I. -I./java -I./config
-I./../include java/gjavah.c -o java/gjavah.o
java/gjavah.c:29:18: math.h: No such file or directory
gmake[2]: *** [java/gjavah.o] Error 1

Apparently, the bootstrap gcc compiler is confused by the "module" setup on this
Origin.

The include files for MIPSPro7.4 are in /opt/MIPSPro/74/usr/include. I've tried 
specifying the location of the compiler include files using:

-I/opt/MIPSpro/74/usr/include 

such as:

stage1/xgcc -Bstage1/ -B/u/ba/rrr6399/opt/gcc-3.3.1/mips-sgi-irix6.5/bin/ -c  -g
-O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
   -DHAVE_CONFIG_H  -I/opt/MIPSpro/74/usr/include  -I. -Ijava -I. -I./java
-I./config -I./../include java/gjavah.c -o java/gjavah.o

But end up with all of these errors:

In file included from system.h:45,
                 from java/gjavah.c:28:
/opt/MIPSpro/74/usr/include/stdio.h:235: warning: conflicting types for built-in
function `snprintf'
/opt/MIPSpro/74/usr/include/stdio.h:244: warning: conflicting types for built-in
function `vsnprintf'
/opt/MIPSpro/74/usr/include/stdio.h:269: warning: ignoring #pragma
int_to_unsigned fread
/opt/MIPSpro/74/usr/include/stdio.h:271: warning: ignoring #pragma
int_to_unsigned fwrite
In file included from /opt/MIPSpro/74/usr/include/ulocks.h:295,
                 from /opt/MIPSpro/74/usr/include/malloc.h:85,
                 from system.h:313,
                 from java/gjavah.c:28:
/opt/MIPSpro/74/usr/include/task.h:123: warning: function declaration isn't a
prototype
java/gjavah.c:2257: error: elements of array `options' have incomplete type
java/gjavah.c:2259: warning: excess elements in struct initializer
java/gjavah.c:2259: warning: (near initialization for `options[0]')
java/gjavah.c:2259: error: `required_argument' undeclared here (not in a function)
java/gjavah.c:2259: warning: excess elements in struct initializer
java/gjavah.c:2259: warning: (near initialization for `options[0]')
java/gjavah.c:2259: warning: excess elements in struct initializer
java/gjavah.c:2259: warning: (near initialization for `options[0]')
java/gjavah.c:2259: warning: excess elements in struct initializer
java/gjavah.c:2259: warning: (near initialization for `options[0]')
java/gjavah.c:2260: warning: excess elements in struct initializer
java/gjavah.c:2260: warning: (near initialization for `options[1]')
java/gjavah.c:2260: error: `required_argument' undeclared here (not in a function)
java/gjavah.c:2260: warning: excess elements in struct initializer
java/gjavah.c:2260: warning: (near initialization for `options[1]')
java/gjavah.c:2260: warning: excess elements in struct initializer
java/gjavah.c:2260: warning: (near initialization for `options[1]')
java/gjavah.c:2260: warning: excess elements in struct initializer
java/gjavah.c:2260: warning: (near initialization for `options[1]')
java/gjavah.c:2261: warning: excess elements in struct initializer
java/gjavah.c:2261: warning: (near initialization for `options[2]')
java/gjavah.c:2261: error: `required_argument' undeclared here (not in a function)
java/gjavah.c:2261: warning: excess elements in struct initializer
java/gjavah.c:2261: warning: (near initialization for `options[2]')
java/gjavah.c:2261: warning: excess elements in struct initializer
java/gjavah.c:2261: warning: (near initialization for `options[2]')
java/gjavah.c:2261: warning: excess elements in struct initializer
java/gjavah.c:2261: warning: (near initialization for `options[2]')
java/gjavah.c:2262: warning: excess elements in struct initializer
java/gjavah.c:2262: warning: (near initialization for `options[3]')
java/gjavah.c:2262: error: `required_argument' undeclared here (not in a function)
java/gjavah.c:2262: warning: excess elements in struct initializer
java/gjavah.c:2262: warning: (near initialization for `options[3]')
java/gjavah.c:2262: warning: excess elements in struct initializer
java/gjavah.c:2262: warning: (near initialization for `options[3]')
java/gjavah.c:2262: warning: excess elements in struct initializer
java/gjavah.c:2262: warning: (near initialization for `options[3]')
java/gjavah.c:2263: warning: excess elements in struct initializer
java/gjavah.c:2263: warning: (near initialization for `options[4]')
java/gjavah.c:2263: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2263: warning: excess elements in struct initializer
java/gjavah.c:2263: warning: (near initialization for `options[4]')
java/gjavah.c:2263: warning: excess elements in struct initializer
java/gjavah.c:2263: warning: (near initialization for `options[4]')
java/gjavah.c:2263: warning: excess elements in struct initializer
java/gjavah.c:2263: warning: (near initialization for `options[4]')
java/gjavah.c:2264: warning: excess elements in struct initializer
java/gjavah.c:2264: warning: (near initialization for `options[5]')
java/gjavah.c:2264: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2264: warning: excess elements in struct initializer
java/gjavah.c:2264: warning: (near initialization for `options[5]')
java/gjavah.c:2264: warning: excess elements in struct initializer
java/gjavah.c:2264: warning: (near initialization for `options[5]')
java/gjavah.c:2264: warning: excess elements in struct initializer
java/gjavah.c:2264: warning: (near initialization for `options[5]')
java/gjavah.c:2265: warning: excess elements in struct initializer
java/gjavah.c:2265: warning: (near initialization for `options[6]')
java/gjavah.c:2265: error: `required_argument' undeclared here (not in a function)
java/gjavah.c:2265: warning: excess elements in struct initializer
java/gjavah.c:2265: warning: (near initialization for `options[6]')
java/gjavah.c:2265: warning: excess elements in struct initializer
java/gjavah.c:2265: warning: (near initialization for `options[6]')
java/gjavah.c:2265: warning: excess elements in struct initializer
java/gjavah.c:2265: warning: (near initialization for `options[6]')
java/gjavah.c:2266: warning: excess elements in struct initializer
java/gjavah.c:2266: warning: (near initialization for `options[7]')
java/gjavah.c:2266: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2266: warning: excess elements in struct initializer
java/gjavah.c:2266: warning: (near initialization for `options[7]')
java/gjavah.c:2266: warning: excess elements in struct initializer
java/gjavah.c:2266: warning: (near initialization for `options[7]')
java/gjavah.c:2266: warning: excess elements in struct initializer
java/gjavah.c:2266: warning: (near initialization for `options[7]')
java/gjavah.c:2267: warning: excess elements in struct initializer
java/gjavah.c:2267: warning: (near initialization for `options[8]')
java/gjavah.c:2267: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2267: warning: excess elements in struct initializer
java/gjavah.c:2267: warning: (near initialization for `options[8]')
java/gjavah.c:2267: warning: excess elements in struct initializer
java/gjavah.c:2267: warning: (near initialization for `options[8]')
java/gjavah.c:2267: warning: excess elements in struct initializer
java/gjavah.c:2267: warning: (near initialization for `options[8]')
java/gjavah.c:2268: warning: excess elements in struct initializer
java/gjavah.c:2268: warning: (near initialization for `options[9]')
java/gjavah.c:2268: error: `required_argument' undeclared here (not in a function)
java/gjavah.c:2268: warning: excess elements in struct initializer
java/gjavah.c:2268: warning: (near initialization for `options[9]')
java/gjavah.c:2268: warning: excess elements in struct initializer
java/gjavah.c:2268: warning: (near initialization for `options[9]')
java/gjavah.c:2268: warning: excess elements in struct initializer
java/gjavah.c:2268: warning: (near initialization for `options[9]')
java/gjavah.c:2269: warning: excess elements in struct initializer
java/gjavah.c:2269: warning: (near initialization for `options[10]')
java/gjavah.c:2269: error: `required_argument' undeclared here (not in a function)
java/gjavah.c:2269: warning: excess elements in struct initializer
java/gjavah.c:2269: warning: (near initialization for `options[10]')
java/gjavah.c:2269: warning: excess elements in struct initializer
java/gjavah.c:2269: warning: (near initialization for `options[10]')
java/gjavah.c:2269: warning: excess elements in struct initializer
java/gjavah.c:2269: warning: (near initialization for `options[10]')
java/gjavah.c:2270: warning: excess elements in struct initializer
java/gjavah.c:2270: warning: (near initialization for `options[11]')
java/gjavah.c:2270: error: `required_argument' undeclared here (not in a function)
java/gjavah.c:2270: warning: excess elements in struct initializer
java/gjavah.c:2270: warning: (near initialization for `options[11]')
java/gjavah.c:2270: warning: excess elements in struct initializer
java/gjavah.c:2270: warning: (near initialization for `options[11]')
java/gjavah.c:2270: warning: excess elements in struct initializer
java/gjavah.c:2270: warning: (near initialization for `options[11]')
java/gjavah.c:2271: warning: excess elements in struct initializer
java/gjavah.c:2271: warning: (near initialization for `options[12]')
java/gjavah.c:2271: error: `required_argument' undeclared here (not in a function)
java/gjavah.c:2271: warning: excess elements in struct initializer
java/gjavah.c:2271: warning: (near initialization for `options[12]')
java/gjavah.c:2271: warning: excess elements in struct initializer
java/gjavah.c:2271: warning: (near initialization for `options[12]')
java/gjavah.c:2271: warning: excess elements in struct initializer
java/gjavah.c:2271: warning: (near initialization for `options[12]')
java/gjavah.c:2272: warning: excess elements in struct initializer
java/gjavah.c:2272: warning: (near initialization for `options[13]')
java/gjavah.c:2272: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2272: warning: excess elements in struct initializer
java/gjavah.c:2272: warning: (near initialization for `options[13]')
java/gjavah.c:2272: warning: excess elements in struct initializer
java/gjavah.c:2272: warning: (near initialization for `options[13]')
java/gjavah.c:2272: warning: excess elements in struct initializer
java/gjavah.c:2272: warning: (near initialization for `options[13]')
java/gjavah.c:2273: warning: excess elements in struct initializer
java/gjavah.c:2273: warning: (near initialization for `options[14]')
java/gjavah.c:2273: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2273: warning: excess elements in struct initializer
java/gjavah.c:2273: warning: (near initialization for `options[14]')
java/gjavah.c:2273: warning: excess elements in struct initializer
java/gjavah.c:2273: warning: (near initialization for `options[14]')
java/gjavah.c:2273: warning: excess elements in struct initializer
java/gjavah.c:2273: warning: (near initialization for `options[14]')
java/gjavah.c:2274: warning: excess elements in struct initializer
java/gjavah.c:2274: warning: (near initialization for `options[15]')
java/gjavah.c:2274: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2274: warning: excess elements in struct initializer
java/gjavah.c:2274: warning: (near initialization for `options[15]')
java/gjavah.c:2274: warning: excess elements in struct initializer
java/gjavah.c:2274: warning: (near initialization for `options[15]')
java/gjavah.c:2274: warning: excess elements in struct initializer
java/gjavah.c:2274: warning: (near initialization for `options[15]')
java/gjavah.c:2275: warning: excess elements in struct initializer
java/gjavah.c:2275: warning: (near initialization for `options[16]')
java/gjavah.c:2275: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2275: warning: excess elements in struct initializer
java/gjavah.c:2275: warning: (near initialization for `options[16]')
java/gjavah.c:2275: warning: excess elements in struct initializer
java/gjavah.c:2275: warning: (near initialization for `options[16]')
java/gjavah.c:2275: warning: excess elements in struct initializer
java/gjavah.c:2275: warning: (near initialization for `options[16]')
java/gjavah.c:2276: warning: excess elements in struct initializer
java/gjavah.c:2276: warning: (near initialization for `options[17]')
java/gjavah.c:2276: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2276: warning: excess elements in struct initializer
java/gjavah.c:2276: warning: (near initialization for `options[17]')
java/gjavah.c:2276: warning: excess elements in struct initializer
java/gjavah.c:2276: warning: (near initialization for `options[17]')
java/gjavah.c:2276: warning: excess elements in struct initializer
java/gjavah.c:2276: warning: (near initialization for `options[17]')
java/gjavah.c:2277: warning: excess elements in struct initializer
java/gjavah.c:2277: warning: (near initialization for `options[18]')
java/gjavah.c:2277: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2277: warning: excess elements in struct initializer
java/gjavah.c:2277: warning: (near initialization for `options[18]')
java/gjavah.c:2277: warning: excess elements in struct initializer
java/gjavah.c:2277: warning: (near initialization for `options[18]')
java/gjavah.c:2277: warning: excess elements in struct initializer
java/gjavah.c:2277: warning: (near initialization for `options[18]')
java/gjavah.c:2278: warning: excess elements in struct initializer
java/gjavah.c:2278: warning: (near initialization for `options[19]')
java/gjavah.c:2278: error: `no_argument' undeclared here (not in a function)
java/gjavah.c:2278: warning: excess elements in struct initializer
java/gjavah.c:2278: warning: (near initialization for `options[19]')
java/gjavah.c:2278: warning: excess elements in struct initializer
java/gjavah.c:2278: warning: (near initialization for `options[19]')
java/gjavah.c:2278: warning: excess elements in struct initializer
java/gjavah.c:2278: warning: (near initialization for `options[19]')
java/gjavah.c: In function `main':
java/gjavah.c:2356: warning: implicit declaration of function `getopt_long_only'

Any ideas how to best deal with this situation?


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
@ 2003-10-14  3:08 ` rrr6399 at futuretek dot com
  2003-10-14  3:37 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rrr6399 at futuretek dot com @ 2003-10-14  3:08 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611



------- Additional Comments From rrr6399 at futuretek dot com  2003-10-14 03:08 -------
I moved the -I to the end of the list:

stage1/xgcc -Bstage1/ -B/u/ba/rrr6399/opt/gcc-3.3.1/mips-sgi-irix6.5/bin/ -c  -g
-O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
   -DHAVE_CONFIG_H   -I. -Ijava -I. -I./java -I./config -I./../include
-I/opt/MIPSpro/74/usr/include java/gjavah.c -o java/gjavah.o

and got much better results:

In file included from system.h:45,
                 from java/gjavah.c:28:
/opt/MIPSpro/74/usr/include/stdio.h:235: warning: conflicting types for built-in
function `snprintf'
/opt/MIPSpro/74/usr/include/stdio.h:244: warning: conflicting types for built-in
function `vsnprintf'
/opt/MIPSpro/74/usr/include/stdio.h:269: warning: ignoring #pragma
int_to_unsigned fread
/opt/MIPSpro/74/usr/include/stdio.h:271: warning: ignoring #pragma
int_to_unsigned fwrite
In file included from /opt/MIPSpro/74/usr/include/ulocks.h:295,
                 from /opt/MIPSpro/74/usr/include/malloc.h:85,
                 from system.h:313,
                 from java/gjavah.c:28:
/opt/MIPSpro/74/usr/include/task.h:123: warning: function declaration isn't a
prototype


Is there a way to tell gcc to look in /opt/MIPSpro/74/usr/include 
as the last resort?

Thanks,
Rob


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
  2003-10-14  3:08 ` [Bug bootstrap/12611] " rrr6399 at futuretek dot com
@ 2003-10-14  3:37 ` pinskia at gcc dot gnu dot org
  2003-10-14  4:46 ` rrr6399 at futuretek dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-14  3:37 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-14 03:37 -------
try configuring with  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
  2003-10-14  3:08 ` [Bug bootstrap/12611] " rrr6399 at futuretek dot com
  2003-10-14  3:37 ` pinskia at gcc dot gnu dot org
@ 2003-10-14  4:46 ` rrr6399 at futuretek dot com
  2003-10-14  4:49 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rrr6399 at futuretek dot com @ 2003-10-14  4:46 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611



------- Additional Comments From rrr6399 at futuretek dot com  2003-10-14 04:46 -------
Thanks for the response!

I tried configure  --oldincludedir=/opt/MIPSpro/74/usr/include,
but that didn't seem to propagate down to the Makefile in 
the gcc directory. (BTW, that flag isn't documented at:
http://gcc.gnu.org/install/configure.html )

I noticed there is a variable in gcc/Makefile.in 
called OTHER_FIXINCLUDES_DIRS. I'm going to try
OTHER_FIXINCLUDES_DIRS=/opt/MIPSpro/74/usr/include
to see what happens.


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (2 preceding siblings ...)
  2003-10-14  4:46 ` rrr6399 at futuretek dot com
@ 2003-10-14  4:49 ` pinskia at gcc dot gnu dot org
  2003-10-22  6:06 ` wilson at specifixinc dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-14  4:49 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-14 04:48 -------
Really it looks like you want "--with-local-prefix=dirname "


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (3 preceding siblings ...)
  2003-10-14  4:49 ` pinskia at gcc dot gnu dot org
@ 2003-10-22  6:06 ` wilson at specifixinc dot com
  2003-10-24 23:27 ` dhazeghi at yahoo dot com
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: wilson at specifixinc dot com @ 2003-10-22  6:06 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611



------- Additional Comments From wilson at specifixinc dot com  2003-10-22 06:03 -------
Subject: Re:  New: Gcc doesn't handle SGI's modularized
 compiler setup

rrr6399 at futuretek dot com wrote:
> The include files for MIPSPro7.4 are in /opt/MIPSPro/74/usr/include. I've tried 
> specifying the location of the compiler include files using:
> -I/opt/MIPSpro/74/usr/include 

This is a duplicate of a follow on issue mentioned in PR 12579 which I 
already responded to.  I see 12579 was already closed because the 
original bug reported in it was resolved, so it is reasonable to 
continue this discussion here.  Thus I'm including the text I originally 
added to 12579.

Use -isystem instead if -I.  -I will put the directory in the wrong
place in the search path, which will cause gcc to accidentally use
system headers instead of local headers when there are name clashes.
Also, gcc knows that system headers are special, and will give
appropriate warnings for them, which usually means no warning at all.
Gcc will also add implicit extern "C" for some targets which may be
needed to make C++ work right.

You might want to modify gcc sources so it is found automatically.  If
all system header files are in /opt, then I think that modifying
STANDARD_INCLUDE_DIR in cppdefault.c and SYSTEM_HEADER_DIR in
Makefile.in is sufficient.  If you have 2 system header directories,
then in cppdefault.c set SYSTEM_INCLUDE_DIR to the first one and
STANDARD_INCLUDE_DIR to the second one.  In Makefile.in, set
OTHER_FIXINCLUDES_DIR to one and SYSTEM_HEADER_DIR to the other.  This
is a rough guideline of the necessary changes.  You probably need to
experiment a bit to find the right set of changes to make this work.
This is a rare problem, so this stuff is not as clean as it could be.


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (4 preceding siblings ...)
  2003-10-22  6:06 ` wilson at specifixinc dot com
@ 2003-10-24 23:27 ` dhazeghi at yahoo dot com
  2003-10-25  1:39 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-10-24 23:27 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build
           Priority|P1                          |P2


------- Additional Comments From dhazeghi at yahoo dot com  2003-10-24 23:21 -------
And of course, if you could report back whether this works or not, that'd be great.


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (5 preceding siblings ...)
  2003-10-24 23:27 ` dhazeghi at yahoo dot com
@ 2003-10-25  1:39 ` pinskia at gcc dot gnu dot org
  2003-10-28  2:50 ` rrr6399 at futuretek dot com
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-25  1:39 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (6 preceding siblings ...)
  2003-10-25  1:39 ` pinskia at gcc dot gnu dot org
@ 2003-10-28  2:50 ` rrr6399 at futuretek dot com
  2003-10-28  2:56 ` rrr6399 at futuretek dot com
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rrr6399 at futuretek dot com @ 2003-10-28  2:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611



------- Additional Comments From rrr6399 at futuretek dot com  2003-10-28 02:27 -------
I'll have time to try comment #5 this week. None of the previous steps
worked so far.

For some reason now, the Bourne
Shell (sh) is core dumping during the configure of gcc. I'm scratching
my head as to what changed in my environment to cause it to crash.
(It hadn't one it in earlier configures.) Here's what happened, 
in case anybody is interested:

+ eval /bin/sh ./configure --host=mips-sgi-irix6.5 --target=mips-sgi-irix6.5
--prefix=/u/ba/rrr6399/opt/gcc-3.3.1 --with-gcc-ver
sion-trigger=/u/ba/rrr6399/src/gcc-3.3.1/gcc/version.c --disable-shared
--cache-file=../config.cache
+ /bin/sh ./configure --host=mips-sgi-irix6.5 --target=mips-sgi-irix6.5
--prefix=/u/ba/rrr6399/opt/gcc-3.3.1 --with-gcc-version-
trigger=/u/ba/rrr6399/src/gcc-3.3.1/gcc/version.c --disable-shared
--cache-file=../config.cache
loading cache ../config.cache
checking LIBRARY_PATH variable... ok
checking GCC_EXEC_PREFIX variable... ok
checking host system type... mips-sgi-irix6.5
checking target system type... mips-sgi-irix6.5
checking build system type... mips-sgi-irix6.5
checking for gcc... (cached) cc
checking whether the C compiler (cc -g ) works... yes
checking whether the C compiler (cc -g ) is a cross-compiler... no
checking whether we are using GNU C... (cached) no
checking whether cc accepts -g... yes
checking whether cc understands -c and -o together... (cached) yes
checking for gnatbind... no
checking for compiler driver that understands Ada... no
checking whether cc accepts -Wno-long-long... yes
checking how to run the C preprocessor... (cached) cc -E
checking for inline... (cached) __inline
checking for volatile... yes
checking for long double... yes
checking for long long int... yes
checking for __int64... no
checking for built-in _Bool... no
checking size of short... 2
checking size of int... 4
checking size of long... 4
checking size of long long... 8
checking execution character set... ASCII
checking whether make sets ${MAKE}... (cached) yes
checking whether a default assembler was specified... no
checking whether a default linker was specified... no
checking for GNU C library... no
checking for mawk... no
checking for gawk... no
checking for nawk... nawk
checking whether ln works... yes
checking whether ln -s works... yes
checking for ranlib... :
checking for a BSD compatible install... ./../install-sh -c
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking for working stdbool.h... no
checking whether string.h and strings.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
checking for limits.h... (cached) yes
checking for stddef.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for time.h... (cached) yes
checking for fcntl.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/file.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/mman.h... (cached) yes
checking for sys/resource.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for sys/times.h... yes
checking for sys/stat.h... (cached) yes
checking for direct.h... no
checking for malloc.h... (cached) yes
checking for langinfo.h... yes
checking for thread.h... no
checking for pthread.h... yes
checking for CHAR_BIT... yes
checking byte ordering... big-endian
checking floating point format... IEEE (big-endian)
checking for mktemp... no
checking for makeinfo... no
configure: warning: 
*** Makeinfo is missing or too old.
*** Info documentation will not be built.
checking for recent Pod::Man... no
checking for flex... flex
checking for bison... bison
checking for collect2 libraries... none required
checking for library containing exc_resume... -lexc
checking for library containing ldexp... none required
checking for preprocessor stringizing operator... yes
checking for inttypes.h... yes
checking for times... (cached) yes
checking for clock... (cached) yes
checking for dup2... yes
checking for kill... yes
checking for getrlimit... yes
checking for setrlimit... yes
checking for atoll... yes
checking for atoq... no
checking for sysconf... (cached) yes
checking for strsignal... (cached) no
checking for putc_unlocked... yes
checking for fputc_unlocked... no
checking for fputs_unlocked... no
checking for fwrite_unlocked... no
checking for fprintf_unlocked... no
checking for getrusage... (cached) yes
checking for nl_langinfo... yes
checking for lstat... yes
checking for scandir... yes
checking for alphasort... yes
checking for gettimeofday... (cached) yes
checking for mmap... yes
checking for ssize_t... yes
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking whether the printf functions support %p... yes
checking whether read-only mmap of a plain file works... yes
checking whether mmap from /dev/zero works... yes
checking for MAP_ANON(YMOUS)... no
checking for pid_t... (cached) yes
checking for vfork.h... (cached) no
checking for working vfork... (cached) no
checking for iconv... yes
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft,
char * *outbuf, size_t *outbytesleft);
checking whether getenv is declared... yes
checking whether atol is declared... yes
checking whether sbrk is declared... yes
checking whether abort is declared... yes
checking whether atof is declared... yes
checking whether getcwd is declared... yes
checking whether getwd is declared... yes
checking whether strsignal is declared... yes
checking whether putc_unlocked is declared... yes
checking whether fputs_unlocked is declared... no
checking whether fwrite_unlocked is declared... no
checking whether fprintf_unlocked is declared... no
checking whether strstr is declared... yes
checking whether errno is declared... yes
checking whether vasprintf is declared... no
checking whether malloc is declared... yes
checking whether realloc is declared... yes
checking whether calloc is declared... yes
checking whether free is declared... yes
checking whether basename is declared... no
checking whether getopt is declared... no
checking whether clock is declared... yes
./configure[1582]: 166544074 Memory fault(coredump)
+ pwd
+ echo Configure in /u/ba/rrr6399/src/gcc-3.3.1/gcc failed, exiting.
+ 1>& 2
Configure in /u/ba/rrr6399/src/gcc-3.3.1/gcc failed, exiting.
+ exit 1
+ rm -rf Makefile.tem /wrk/tmp/jtmp.165972808/cNf166385126
+ exit 1


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (7 preceding siblings ...)
  2003-10-28  2:50 ` rrr6399 at futuretek dot com
@ 2003-10-28  2:56 ` rrr6399 at futuretek dot com
  2003-11-08 21:09 ` dhazeghi at yahoo dot com
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rrr6399 at futuretek dot com @ 2003-10-28  2:56 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611



------- Additional Comments From rrr6399 at futuretek dot com  2003-10-28 02:49 -------
FYI: As for my core dumping problem with sh, I tried bash instead
by setting this environment variable:

CONFIG_SHELL=/usr/freeware/bin/bash

and the core dump went away.


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (8 preceding siblings ...)
  2003-10-28  2:56 ` rrr6399 at futuretek dot com
@ 2003-11-08 21:09 ` dhazeghi at yahoo dot com
  2003-11-11 14:09 ` rrr6399 at futuretek dot com
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-11-08 21:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dhazeghi at yahoo dot com  2003-11-08 21:09 -------
This sounds more like a /bin/sh bug then. Rob, did the build finish when using
bash? Rainer, have you seen /bin/sh crashes too on Irix? Thanks.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at techfak dot uni-
                   |                            |bielefeld dot de
   GCC host triplet|                            |mips-sgi-irix6.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (9 preceding siblings ...)
  2003-11-08 21:09 ` dhazeghi at yahoo dot com
@ 2003-11-11 14:09 ` rrr6399 at futuretek dot com
  2003-11-12 21:52 ` ro at techfak dot uni-bielefeld dot de
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rrr6399 at futuretek dot com @ 2003-11-11 14:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rrr6399 at futuretek dot com  2003-11-11 14:09 -------
(In reply to comment #9)
> This sounds more like a /bin/sh bug then. Rob, did the build finish when using
> bash? Rainer, have you seen /bin/sh crashes too on Irix? Thanks.

No. I'm still having troubles with gcc finding the system include files
in /opt/MIPSpro/74/usr/include.

I think I need some more details on how to appropriate way to modify 
cppdefault.c suggested by:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611#c5

I'm not sure what to put in the STANDARD_INCLUDE_DIR macro.

BTW, I've switched over to 3.3.2 now too.

Thanks.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (10 preceding siblings ...)
  2003-11-11 14:09 ` rrr6399 at futuretek dot com
@ 2003-11-12 21:52 ` ro at techfak dot uni-bielefeld dot de
  2003-11-13  1:57 ` rrr6399 at futuretek dot com
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ro at techfak dot uni-bielefeld dot de @ 2003-11-12 21:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ro at techfak dot uni-bielefeld dot de  2003-11-12 21:52 -------
Subject: Re:  Gcc doesn't handle SGI's modularized compiler setup

> This sounds more like a /bin/sh bug then. Rob, did the build finish when using
> bash? Rainer, have you seen /bin/sh crashes too on Irix? Thanks.

Not on IRIX 6.5 (but I'm usually running recent releases like 6.5.21f
there, though I haven't seen them in 6.5.10m either), but /bin/sh (or even
/bin/ksh) on IRIX 6.2 have sometimes crashed on me.  I don't recally the
exact circumstances right now (and cannot bootstrap without bash due to PR
bootstrap/12752 right now).

	Rainer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (11 preceding siblings ...)
  2003-11-12 21:52 ` ro at techfak dot uni-bielefeld dot de
@ 2003-11-13  1:57 ` rrr6399 at futuretek dot com
  2004-01-21 18:19 ` dhazeghi at yahoo dot com
  2004-02-21 15:39 ` rrr6399 at futuretek dot com
  14 siblings, 0 replies; 16+ messages in thread
From: rrr6399 at futuretek dot com @ 2003-11-13  1:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rrr6399 at futuretek dot com  2003-11-13 01:57 -------

(In reply to comment #10)

> I think I need some more details on how to appropriate way to modify 
> cppdefault.c suggested by:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611#c5
> 
> I'm not sure what to put in the STANDARD_INCLUDE_DIR macro.

I wanted to clarify this more. I actually need to specify both 
/usr/include and /opt/MIPSpro/74/usr/include in this macro (or some
related macro). I doubt its going to like a space delimitted path, but I could
be wrong. What is the best approach to include both of these paths?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.3.1                       |3.3.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (12 preceding siblings ...)
  2003-11-13  1:57 ` rrr6399 at futuretek dot com
@ 2004-01-21 18:19 ` dhazeghi at yahoo dot com
  2004-02-21 15:39 ` rrr6399 at futuretek dot com
  14 siblings, 0 replies; 16+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-21 18:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dhazeghi at yahoo dot com  2004-01-21 18:19 -------
It looks like one hack to solve this would be in cppdefault.c:

below const struct default_include cpp_include_defaults[] you should be able to add a line along 
the lines of { "/opt/MIPSpro/74/usr/include", "GCC", 0, 0, 0 }

Can you give this a try? Thanks.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611


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

* [Bug bootstrap/12611] Gcc doesn't handle SGI's modularized compiler setup
  2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
                   ` (13 preceding siblings ...)
  2004-01-21 18:19 ` dhazeghi at yahoo dot com
@ 2004-02-21 15:39 ` rrr6399 at futuretek dot com
  14 siblings, 0 replies; 16+ messages in thread
From: rrr6399 at futuretek dot com @ 2004-02-21 15:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rrr6399 at futuretek dot com  2004-02-21 15:39 -------
(In reply to comment #13)
> It looks like one hack to solve this would be in cppdefault.c:
> 
> below const struct default_include cpp_include_defaults[] you should be able
to add a line along 
> the lines of { "/opt/MIPSpro/74/usr/include", "GCC", 0, 0, 0 }
> 
> Can you give this a try? Thanks.
Thanks for the suggestion. I was finally able to get
gcc to work now! 

I went ahead and modified the cppdefault.c
to look like:

....
#ifdef SYSTEM_INCLUDE_DIR
    /* Some systems have an extra dir of include files.  */
    { SYSTEM_INCLUDE_DIR, 0, 0, 0, 1 },
#endif
    { "/opt/MIPSpro/74/usr/include", 0, 0, 0, 0 },
#ifdef STANDARD_INCLUDE_DIR
    /* /usr/include comes dead last.  */
    { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1 },
#endif
    { 0, 0, 0, 0, 0 }
  };
#endif /* no INCLUDE_DEFAULTS */

and then compiled gcc 3.3.3 using this process:

#!/bin/csh -vfx

gmake distclean 
setenv CC "cc -U__INLINE_INTRINSICS"
setenv CONFIG_SHELL /usr/freeware/bin/bash # to avoid core dumps from sh
./configure --prefix=/usr/local/opt/gcc-3.3.3 --enable-shared --enable-threads
--oldincludedir=/opt/MIPSpro/74/usr/include
gmake bootstrap
gmake install

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED
            Version|3.3.2                       |3.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12611


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

end of thread, other threads:[~2004-02-21 15:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-14  2:52 [Bug bootstrap/12611] New: Gcc doesn't handle SGI's modularized compiler setup rrr6399 at futuretek dot com
2003-10-14  3:08 ` [Bug bootstrap/12611] " rrr6399 at futuretek dot com
2003-10-14  3:37 ` pinskia at gcc dot gnu dot org
2003-10-14  4:46 ` rrr6399 at futuretek dot com
2003-10-14  4:49 ` pinskia at gcc dot gnu dot org
2003-10-22  6:06 ` wilson at specifixinc dot com
2003-10-24 23:27 ` dhazeghi at yahoo dot com
2003-10-25  1:39 ` pinskia at gcc dot gnu dot org
2003-10-28  2:50 ` rrr6399 at futuretek dot com
2003-10-28  2:56 ` rrr6399 at futuretek dot com
2003-11-08 21:09 ` dhazeghi at yahoo dot com
2003-11-11 14:09 ` rrr6399 at futuretek dot com
2003-11-12 21:52 ` ro at techfak dot uni-bielefeld dot de
2003-11-13  1:57 ` rrr6399 at futuretek dot com
2004-01-21 18:19 ` dhazeghi at yahoo dot com
2004-02-21 15:39 ` rrr6399 at futuretek dot com

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