[3.0 critical] Make fixproto deal with assert.h (bootstrap fails)

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Sat May 12 05:59:00 GMT 2001


FYI, I just got a bootstrap failure on the trunk after this patch went
in on mips-sgi-irix6.2.
http://gcc.gnu.org/ml/gcc-patches/2001-05/msg00567.html


 > stage1/xgcc -Bstage1/ -B/usr/local/mips-sgi-irix6.2/bin/ -DIN_GCC -g
 >   -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
 >   -DHAVE_CONFIG_H -DGENERATOR_FILE -o f/fini f/fini.o f/proj-h.o
 >   safe-ctype.o
 > ld32: ERROR 33: Unresolved text symbol "__eprintf" -- 1st referenced by f/fini.o.
 >         Use linker option -v to see when and which objects, archives
 > 	and dsos are loaded.
 > ld32: INFO 152: Output file removed because of error.
 > collect2: ld returned 2 exit status
 > make[2]: *** [f/fini] Error 1

I tracked this down to a local installation problem.  There is an old
copy of gcc's assert.h in /usr/local/include and of course its
defining assert() in terms of __eprintf.  That assert.h may have been
placed there by an older version of gcc (2.7.x?/2.8.x?) that got
installed on that system.

Even though its a local system issue, there are two reasons I mention
this:

1.  I'm probably not the only person who has an old copy of gcc
    installed on their platform.  We'll get lots of bug reports
    against it, so I think we should have a workaround.  (Wasn't there
    a similar recurring problem with a header installed by libg++?)

2.  Say my irix6 box is a guest account and I can't diddle with
    /usr/local/include.  How can I tell gcc to ignore just that
    include directory to get bootstrap to proceed?  If I use -nostdinc
    it deletes all systems headers and I'd have to readd them back by
    hand.  I don't know if there's more than one.  Would "-nostdinc
    -isystem /usr/include" be safe enough as a general solution?  I
    think some systems define STANDARD_INCLUDE_DIR to something else
    and/or a platform may have more than one place one has to look. (?)

3.  Answering #2 only solves the problem during bootstrap, when we
    install gcc, it'll still use the assert.h from /usr/local/include.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions



More information about the Gcc-patches mailing list