public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: ARM native gcc-2.95.2
@ 2001-03-09  3:15 David Korn
  2001-03-09 11:31 ` bkohlen
  0 siblings, 1 reply; 6+ messages in thread
From: David Korn @ 2001-03-09  3:15 UTC (permalink / raw)
  To: 'bkohlen@intrinsyc.com', gcc-help

>-----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
**********************************************************************

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

* Re: ARM native gcc-2.95.2
  2001-03-09  3:15 ARM native gcc-2.95.2 David Korn
@ 2001-03-09 11:31 ` bkohlen
  2001-03-09 20:04   ` Alexandre Oliva
  0 siblings, 1 reply; 6+ messages in thread
From: bkohlen @ 2001-03-09 11:31 UTC (permalink / raw)
  To: gcc-help

>
>   So, to diagnose the problem, let's start by having a look at
>
> 1) your PATH setting

/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

>
> 2) the directory listings of $prefix/lib/gcc-lib/$target/$version and
>    $prefix/bin

$ ls /usr/lib/gcc-lib/arm-linux/2.95.2
SYSCALLS.c.X  cc1plus   cpp         crtbeginS.o  crtendS.o  libgcc.a
specs
cc1           collect2  crtbegin.o  crtend.o     include    libstdc++.a
$ ls /usr/bin
hrm... do you really want to see my whole /usr/bin? if your just wondering
whether or not it contains "cpp", it does, along with gcc, g++, ranlib...

>
> 3) the output from "gcc -v -print-search-dirs"

(i've s/:/:\n/ to make it easier to read)
install:
/tmp/gcc-2.95.2-isolated///usr/lib/gcc-lib/arm-linux/2.95.2/
programs: /tmp/gcc-2.95.2-isolated///usr/lib/gcc-lib/arm-linux/2.95.2/:
/tmp/gcc-2.95.2-isolated///usr/lib/gcc-lib/arm-linux/:
/usr/lib/gcc/arm-linux/2.95.2/:/usr/lib/gcc/arm-linux/:
/tmp/gcc-2.95.2-isolated///usr/arm-linux/bin/arm-linux/2.95.2/:
/tmp/gcc-2.95.2-isolated///usr/arm-linux/bin/
libraries: /tmp/gcc-2.95.2-isolated///usr/lib/gcc-lib/arm-linux/2.95.2/:
/usr/lib/gcc/arm-linux/2.95.2/:
/tmp/gcc-2.95.2-isolated///usr/arm-linux/lib/arm-linux/2.95.2/:
/tmp/gcc-2.95.2-isolated///usr/arm-linux/lib/:
/tmp/gcc-2.95.2-isolated///usr/lib/arm-linux/2.95.2/:
/tmp/gcc-2.95.2-isolated///usr/lib/:/lib/arm-linux/2.95.2/:
/lib/:
/usr/lib/arm-linux/2.95.2/:
/usr/lib/


>
> 4) If you still have the info available, the *exact* command lines you
>    used to configure and build gcc.

CC=arm-linux-gcc ../gcc-2.95.2/configure --enable-languages=c,c++ \
    --prefix=/tmp/gcc-2.95.2-isolated/usr --build=i386-linux
--host=arm-linux
# after this, i edited gcc/arm/linux-elf[26].h so the compiler would use
the  same
# emulation modes that binutils-2.10 does, then ran the exact same configure

# command over again - probably not important for you to know, but
anyways...
make
make install
# following this, i tar/gzipped the contents of /tmp/gcc-2.95.2-isolated/
up, and
# transported it to the arm machine from my pc, and untarred it from /. in
other
# words, the compiler is not actually installed at the same $prefix it was
compiled
# with, it is installed with the /tmp/gcc-2.95.2-isolated/ stripped off.

>
>
>   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
> **********************************************************************

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

* Re: ARM native gcc-2.95.2
  2001-03-09 11:31 ` bkohlen
@ 2001-03-09 20:04   ` Alexandre Oliva
  2001-03-12 18:31     ` bkohlen
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandre Oliva @ 2001-03-09 20:04 UTC (permalink / raw)
  To: bkohlen; +Cc: gcc-help

On Mar  9, 2001, bkohlen@intrinsyc.com wrote:

> # following this, i tar/gzipped the contents of /tmp/gcc-2.95.2-isolated/
> up, and
> # transported it to the arm machine from my pc, and untarred it from /. in
> other
> # words, the compiler is not actually installed at the same $prefix it was
> compiled
> # with, it is installed with the /tmp/gcc-2.95.2-isolated/ stripped off.

That would be a problem.  AFAIK, GCC 2.95.2 has to be configured with
the actual prefix it's going to have at run-time.  It's ok to `make
install prefix=/somewhere/else', then tar it up and install it in the
configured place, though.

To avoid rebuilding, look for GCC_EXEC_PREFIX or the -B command-line
flag in the GCC manual.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* Re: ARM native gcc-2.95.2
  2001-03-09 20:04   ` Alexandre Oliva
@ 2001-03-12 18:31     ` bkohlen
  2001-03-12 21:11       ` Alexandre Oliva
  0 siblings, 1 reply; 6+ messages in thread
From: bkohlen @ 2001-03-12 18:31 UTC (permalink / raw)
  To: gcc-help

> That would be a problem.  AFAIK, GCC 2.95.2 has to be configured with
> the actual prefix it's going to have at run-time.  It's ok to `make
> install prefix=/somewhere/else', then tar it up and install it in the
> configured place, though.

OK, i specified '--prefix=/usr' at the "./configure" step, and
'prefix=/tmp/isolated-gcc-2.95.2/usr' at the "make install" step.  I cd'd to
/tmp/isolated-gcc-2.95.2/, and tarred up everything, including the /usr
directory.  Then i untarred the entire thing to /. (overwriting my previously
installed cross-compiler).  Now the config.guess script that comes with all
autoconf projects wont work, insisting that It cannot guess my host, and I must
specify it instead.

Please help.  It is important for me that ./configure can guess my host type,
as a whole wack of scripts i've written will be broke if it cannot.

Thanks,
Ben

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

* Re: ARM native gcc-2.95.2
  2001-03-12 18:31     ` bkohlen
@ 2001-03-12 21:11       ` Alexandre Oliva
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2001-03-12 21:11 UTC (permalink / raw)
  To: bkohlen; +Cc: gcc-help

On Mar 12, 2001, bkohlen@intrinsyc.com wrote:

> Now the config.guess script that comes with all autoconf projects
> wont work, insisting that It cannot guess my host, and I must
> specify it instead.

Can you compile anything with the newly-installed GCC?  If you can,
then you're just missing the link from cc to gcc.  Otherwise,
something went wrong in the installation.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* ARM native gcc-2.95.2
@ 2001-03-08 16:32 bkohlen
  0 siblings, 0 replies; 6+ messages in thread
From: bkohlen @ 2001-03-08 16:32 UTC (permalink / raw)
  To: gcc-help

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.

If you have any advice, please CC me, as I'm not subscribed to the list.

Thanks,
Ben

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

end of thread, other threads:[~2001-03-12 21:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-09  3:15 ARM native gcc-2.95.2 David Korn
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

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