public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Korn <dkorn@pixelpower.com>
To: "'bkohlen@intrinsyc.com'" <bkohlen@intrinsyc.com>, gcc-help@gcc.gnu.org
Subject: RE: ARM native gcc-2.95.2
Date: Fri, 09 Mar 2001 03:15:00 -0000	[thread overview]
Message-ID: <718D38CAB6E0D011B2C90060970C28A5642739@EXCHANGESERVER> (raw)

>-----Original Message-----
>From: bkohlen@intrinsyc.com [ mailto:bkohlen@intrinsyc.com ]
>Sent: 09 March 2001 00:39

>OK, I used my existing arm-linux-gcc cross-compiler to build a native
>arm gcc.  When using the arm native gcc to compile a simple C (int
>main(void){return 0;}) program (or a complex one for that matter) it
>hangs for about 30 seconds, and then I repeatedly get the message:
>
>Out of memory: Killed process 553 (cpp)
>
>about 50-100 times.  I have 32M of RAM on the nfs-rooted board I am
>working with, don't see how it could actually be a problem.

  This is some variation of a well known bug that can arise because
of a faulty installation or problems with your path setting.

  The problem arises because the compiler calls out to a subprogram to do
the C pre-processing stage: this subprogram is called 'cpp' and generally
lives in $prefix/lib/gcc-lib/$target/$version.

  There is also a standalone version of the preprocessor provided, which 
is just a simplified variant of the gcc driver program that only calls
out to the pre-processor subprogram, and not to the usual compilation,
assembly and linking stages. 

  The trouble arises because this standalone is also called cpp.  So when
you are compiling a program with gcc, and the driver tries to call cpp,
just a little bad luck can mean it finds the standalone driver instead 
of the actual preprocessor subprogram.  gcc then calls that driver under
the misapprehension that it is the actual preprocessor.  And what's the
first thing that driver does?  It tries to call out to the preprocessor
subprogram!  And since all the gcc-drivers use the same path search
algorithm, it too finds the cpp-driver instead of the cpp-subprogram, and
calls it. 

  The result, as you have seen, is a huge stack of copies of 'cpp'
recursively calling out to itself.

  So, to diagnose the problem, let's start by having a look at

1) your PATH setting
2) the directory listings of $prefix/lib/gcc-lib/$target/$version and
   $prefix/bin
3) the output from "gcc -v -print-search-dirs"
4) If you still have the info available, the *exact* command lines you
   used to configure and build gcc.

  That should help us track it down.



        DaveK
-- 
 All your base are belong to us!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

             reply	other threads:[~2001-03-09  3:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-09  3:15 David Korn [this message]
2001-03-09 11:31 ` bkohlen
2001-03-09 20:04   ` Alexandre Oliva
2001-03-12 18:31     ` bkohlen
2001-03-12 21:11       ` Alexandre Oliva
  -- strict thread matches above, loose matches on Subject: below --
2001-03-08 16:32 bkohlen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=718D38CAB6E0D011B2C90060970C28A5642739@EXCHANGESERVER \
    --to=dkorn@pixelpower.com \
    --cc=bkohlen@intrinsyc.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).