This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

"token too long" errors building 2.95.2 with native CX/UX C compiler


I have been attempting to build 2.95.2 with the ANSI standard C
compiler for CX/UX 7.1.  CX/UX is the SVR4-based Unix for Concurrent
(formerly Harris) NightHawk real-time M88K based computers.

The problem is that GCC source includes tokens that exceed the
allowable length on the native compiler's preprocessor, making it
impossible to bootstrap GCC.  I provide examples below.

I have had an unrelated but similar problem when the make process
tries to build texinfo (even though I already have the latest version
built and installed):  The recursive make passes an argument list too
long for execvp on this system.  My workaround is to move the texinfo
directory out of the way so configure doesn't find it.

I have two questions:

(1) The practical question: Is there a work-around, a configuration
option perhaps, that I can use to get source code to compile?

(2) The theoretical question: Why does GCC source include such long
strings that will break older C preprocessors?  Is the latest version
only test-built using the previous version of GCC?  Shouldn't GCC be
test-built against a minimal ISO-compliant compiler, with no extra
frills?  Doesn't the standard specify a minimum number for maximum
token length?  If I'm to build 2.95.2, will I have to go back to a
much earlier version of GCC, get that to build, then use that to build
the next version and so on down the line?  What is the most recent
version that stays within reasonable limits for token length?

(3) The despairing question: Or am I just stuck?

Here is the first file with which I had this problem, gcc.c:

--------

.
.
.

cc  -DIN_GCC     -g  -DHAVE_CONFIG_H    -I. -I../../gcc-2.95.2-patched/gcc -I../../gcc-2.95.2-patched/gcc/config -I../../gcc-2.95.2-patched/gcc/../include \
  -DSTANDARD_STARTFILE_PREFIX=\"/usr/local/lib/\" -DSTANDARD_EXEC_PREFIX=\"/usr/local/lib/gcc-lib/\" -DDEFAULT_TARGET_VERSION=\"2.95.2\" -DDEFAULT_TARGET_MACHINE=\"m88k-harris-cxux7\" -DTOOLDIR_BASE_PREFIX=\"/usr/local/\" \
  -c `echo ../../gcc-2.95.2-patched/gcc/gcc.c | sed 's,^\./,,'`
"../../gcc-2.95.2-patched/gcc/gcc.c", line 624: token too long
cc: Errors in the pre-processor pass, status = 1
make[2]: *** [gcc.o] Error 1
make[2]: Leaving directory `/tmp_mnt/net-app/5913/SCS/DEV/CSG/mikeb/GCC/gccbuild/gcc'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory `/tmp_mnt/net-app/5913/SCS/DEV/CSG/mikeb/GCC/gccbuild/gcc'
make: *** [bootstrap] Error 2

--------

I manually changed the file to break the token (a very long string) in
two concatenated strings and got it to compile, but got stuck again
later on cppinit.c:

../gcc-2.95.2-patched/gcc/config -I../../gcc-2.95.2-patched/gcc/../include \
  -DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m88k-harris-cxux7/2.95.2/include\" \
  -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m88k-harris-cxux7/2.95.2/../../../..`echo /usr/local | sed -e 's|^/usr/local||' -e 's|/[^/]*|/..|g'`/include/g++-3\" \
  -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
  -DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m88k-harris-cxux7/2.95.2/../../../../m88k-harris-cxux7/sys-include\" \
  -DTOOL_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m88k-harris-cxux7/2.95.2/../../../../m88k-harris-cxux7/include\" \
  -c `echo ../../gcc-2.95.2-patched/gcc/cppinit.c | sed 's,^\./,,'`
"../../gcc-2.95.2-patched/gcc/cppinit.c", line 1735: token too long
"../../gcc-2.95.2-patched/gcc/cppinit.c", line 1750: token too long
"../../gcc-2.95.2-patched/gcc/cppinit.c", line 1766: token too long
"../../gcc-2.95.2-patched/gcc/cppinit.c", line 1778: _: actuals too long
cc: Fatal error, "Segmentation fault" in cpp, core dumped
make[1]: *** [cppinit.o] Error 2
make[1]: Leaving directory `/tmp_mnt/net-app/5913/SCS/DEV/CSG/mikeb/GCC/gccbuild/gcc'
make: *** [bootstrap] Error 2

--------

The string that the compiler choked on is a preprocessor usage
message, a string of about 4400 characters.  When I tried to break
this up into concatenated strings, it didn't work, probably because of
some funky stuff involving a macro definition.


Any suggestions or insights will be greatly appreciated.

-------------------------------------------------------------------------
Mike Bates                                 FlightSafety Simulation
Staff Engineer          mikeb@ssd.fsi.com  2700 North Hemlock Circle
Computer Systems Group  918-259-5598       Broken Arrow, Oklahoma 74012
-------------------------------------------------------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]