public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Building GCC 4.2.0 fails on Linux x86-64
@ 2007-05-25 11:38 Alexander Wieder
  2007-05-25 11:40 ` Andrew Haley
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Alexander Wieder @ 2007-05-25 11:38 UTC (permalink / raw)
  To: gcc-help

Hi!

I tried to build GCC 4.2 (core and g++) on my linux box (Ubuntu 7.04,
amd64). Except a program-suffix and an install prefix, I used no
configure options. Building failed with the following messages:

> [...]
> checking for x86_64-unknown-linux-gnu-gcc... /home/alexx/tmp/gcc-build/./gcc/xgcc -B/home/alexx/tmp/gcc-build/./gcc/ -B/home/alexx/local/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/alexx/local/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/alexx/local/gcc/x86_64-unknown-linux-gnu/include -isystem /home/alexx/local/gcc/x86_64-unknown-linux-gnu/sys-include  -m32
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... configure: error: cannot run C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details.
> make[1]: *** [configure-target-libmudflap] Error 1
> make[1]: Leaving directory `/home/alexx/tmp/gcc-build'
> make: *** [all] Error 2

Has anyone an idea why GCC is obviously unable to produce runnable C
programs in my configuration?


Best regards,

Alexander Wieder


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

* Re: Building GCC 4.2.0 fails on Linux x86-64
  2007-05-25 11:38 Building GCC 4.2.0 fails on Linux x86-64 Alexander Wieder
@ 2007-05-25 11:40 ` Andrew Haley
  2007-05-25 14:13   ` Alexander Wieder
  2007-05-25 11:57 ` Thomas Mittelstaedt
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Andrew Haley @ 2007-05-25 11:40 UTC (permalink / raw)
  To: Alexander Wieder; +Cc: gcc-help

Alexander Wieder writes:
 > Hi!
 > 
 > I tried to build GCC 4.2 (core and g++) on my linux box (Ubuntu 7.04,
 > amd64). Except a program-suffix and an install prefix, I used no
 > configure options. Building failed with the following messages:
 > 
 > > [...]
 > > checking for x86_64-unknown-linux-gnu-gcc... /home/alexx/tmp/gcc-build/./gcc/xgcc -B/home/alexx/tmp/gcc-build/./gcc/ -B/home/alexx/local/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/alexx/local/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/alexx/local/gcc/x86_64-unknown-linux-gnu/include -isystem /home/alexx/local/gcc/x86_64-unknown-linux-gnu/sys-include  -m32
 > > checking for C compiler default output file name... a.out
 > > checking whether the C compiler works... configure: error: cannot run C compiled programs.
 > > If you meant to cross compile, use `--host'.
 > > See `config.log' for more details.
 > > make[1]: *** [configure-target-libmudflap] Error 1
 > > make[1]: Leaving directory `/home/alexx/tmp/gcc-build'
 > > make: *** [all] Error 2
 > 
 > Has anyone an idea why GCC is obviously unable to produce runnable C
 > programs in my configuration?

See `config.log' for more details.

Andrew.

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

* Re: Building GCC 4.2.0 fails on Linux x86-64
  2007-05-25 11:38 Building GCC 4.2.0 fails on Linux x86-64 Alexander Wieder
  2007-05-25 11:40 ` Andrew Haley
@ 2007-05-25 11:57 ` Thomas Mittelstaedt
  2007-05-25 13:03 ` John Love-Jensen
  2007-05-25 21:37 ` Brian Dessent
  3 siblings, 0 replies; 9+ messages in thread
From: Thomas Mittelstaedt @ 2007-05-25 11:57 UTC (permalink / raw)
  To: gcc-help

> See `config.log' for more details.

See this file. See the exact compile line of the test program. Maybe a library could not be found.



Alexander Wieder schrieb:
> Hi!
>
> I tried to build GCC 4.2 (core and g++) on my linux box (Ubuntu 7.04,
> amd64). Except a program-suffix and an install prefix, I used no
> configure options. Building failed with the following messages:
>
>   
>> [...]
>> checking for x86_64-unknown-linux-gnu-gcc... /home/alexx/tmp/gcc-build/./gcc/xgcc -B/home/alexx/tmp/gcc-build/./gcc/ -B/home/alexx/local/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/alexx/local/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/alexx/local/gcc/x86_64-unknown-linux-gnu/include -isystem /home/alexx/local/gcc/x86_64-unknown-linux-gnu/sys-include  -m32
>> checking for C compiler default output file name... a.out
>> checking whether the C compiler works... configure: error: cannot run C compiled programs.
>> If you meant to cross compile, use `--host'.
>> See `config.log' for more details.
>> make[1]: *** [configure-target-libmudflap] Error 1
>> make[1]: Leaving directory `/home/alexx/tmp/gcc-build'
>> make: *** [all] Error 2
>>     
>
> Has anyone an idea why GCC is obviously unable to produce runnable C
> programs in my configuration?
>
>
> Best regards,
>
> Alexander Wieder
>
>
>   

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

* Re: Building GCC 4.2.0 fails on Linux x86-64
  2007-05-25 11:38 Building GCC 4.2.0 fails on Linux x86-64 Alexander Wieder
  2007-05-25 11:40 ` Andrew Haley
  2007-05-25 11:57 ` Thomas Mittelstaedt
@ 2007-05-25 13:03 ` John Love-Jensen
  2007-05-25 14:36   ` Alexander Wieder
  2007-05-25 21:37 ` Brian Dessent
  3 siblings, 1 reply; 9+ messages in thread
From: John Love-Jensen @ 2007-05-25 13:03 UTC (permalink / raw)
  To: Alexander Wieder, MSX to GCC

Hi Alexander,

Did you follow these instructions...

http://gcc.gnu.org/install/configure.html

...?

In particular, the part that states...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
First, we highly recommend that GCC be built into a separate directory than
the sources which does not reside within the source tree. This is how we
generally build GCC; building where srcdir == objdir should still work, but
doesn't get extensive testing; building where objdir is a subdirectory of
srcdir is unsupported.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

In my experience, when srcdir is the same as objdir, I have never
successfully been able to build GCC.

HTH,
--Eljay

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

* Re: Building GCC 4.2.0 fails on Linux x86-64
  2007-05-25 11:40 ` Andrew Haley
@ 2007-05-25 14:13   ` Alexander Wieder
  2007-05-25 14:49     ` Andrew Haley
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Wieder @ 2007-05-25 14:13 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Alexander Wieder, gcc-help

Hi!

Andrew Haley wrote:
> See `config.log' for more details.
Good point. I'll try to really *read* error messages next time..

However, according to the log, two libraries were in fact missing:
libgmp and libmpfr. This seems a bit odd to me since GCC 4.2.0 compiled
just fine on OSX where these libs are definitely not installed. After
installing these libraries, the build still fails with the same error
and there are no errors or warnings in the config.log. The last entry in
the config.log says:
	
	configure:7345: gcc -c -g -O2 -fkeep-inline-functions  conftest.c 1>&5

So I guess, this is the command which failed to produce a runnable
binary. I wanted to take a look at this conftest.c, but there is no such
file in the source tree.

Hints?


Best regards,

Alexander Wieder

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

* Re: Building GCC 4.2.0 fails on Linux x86-64
  2007-05-25 13:03 ` John Love-Jensen
@ 2007-05-25 14:36   ` Alexander Wieder
  0 siblings, 0 replies; 9+ messages in thread
From: Alexander Wieder @ 2007-05-25 14:36 UTC (permalink / raw)
  To: John Love-Jensen; +Cc: MSX to GCC

Hi!

John Love-Jensen wrote:
> http://gcc.gnu.org/install/configure.html
Yes, I did.

> In my experience, when srcdir is the same as objdir, I have never
> successfully been able to build GCC.
I did use a seperate directory for building. The path appearing in the
message I provided (/home/alexx/tmp/gcc-build/) is my build directory
while the source resides in /home/alexx/tmp/gcc-4.2.0/.


Best regards,

Alexander Wieder

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

* Re: Building GCC 4.2.0 fails on Linux x86-64
  2007-05-25 14:13   ` Alexander Wieder
@ 2007-05-25 14:49     ` Andrew Haley
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Haley @ 2007-05-25 14:49 UTC (permalink / raw)
  To: Alexander Wieder; +Cc: gcc-help

Alexander Wieder writes:
 > Hi!
 > 
 > Andrew Haley wrote:
 > > See `config.log' for more details.
 > Good point. I'll try to really *read* error messages next time..
 > 
 > However, according to the log, two libraries were in fact missing:
 > libgmp and libmpfr. This seems a bit odd to me since GCC 4.2.0 compiled
 > just fine on OSX where these libs are definitely not installed. After
 > installing these libraries, the build still fails with the same error
 > and there are no errors or warnings in the config.log. The last entry in
 > the config.log says:
 > 	
 > 	configure:7345: gcc -c -g -O2 -fkeep-inline-functions  conftest.c 1>&5
 > 
 > So I guess, this is the command which failed to produce a runnable
 > binary. I wanted to take a look at this conftest.c, but there is no such
 > file in the source tree.

look at line 7345 in configure.  You'll see something like

cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <stdlib.h>
int
main ()
{
char* tmp;
	    	  strtof("gnu", &tmp);
		  strtold("gnu", &tmp);
	          strtoll("gnu", &tmp, 10);
	          strtoull("gnu", &tmp, 10);
	          llabs(10);
		  lldiv(10,1);
		  atoll("10");
		  _Exit(0);
		  lldiv_t mydivt;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>conftest.er1

That's your test program.

Andrew.

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

* Re: Building GCC 4.2.0 fails on Linux x86-64
  2007-05-25 11:38 Building GCC 4.2.0 fails on Linux x86-64 Alexander Wieder
                   ` (2 preceding siblings ...)
  2007-05-25 13:03 ` John Love-Jensen
@ 2007-05-25 21:37 ` Brian Dessent
  2007-05-26 11:14   ` Alexander Wieder
  3 siblings, 1 reply; 9+ messages in thread
From: Brian Dessent @ 2007-05-25 21:37 UTC (permalink / raw)
  To: Alexander Wieder; +Cc: gcc-help

Alexander Wieder wrote:

> I tried to build GCC 4.2 (core and g++) on my linux box (Ubuntu 7.04,
> amd64). Except a program-suffix and an install prefix, I used no
> configure options. Building failed with the following messages:
> 
> > [...]
> > checking for x86_64-unknown-linux-gnu-gcc... /home/alexx/tmp/gcc-build/./gcc/xgcc -B/home/alexx/tmp/gcc-build/./gcc/ -B/home/alexx/local/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/alexx/local/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/alexx/local/gcc/x86_64-unknown-linux-gnu/include -isystem /home/alexx/local/gcc/x86_64-unknown-linux-gnu/sys-include  -m32
> > checking for C compiler default output file name... a.out
> > checking whether the C compiler works... configure: error: cannot run C compiled programs.
> > If you meant to cross compile, use `--host'.
> > See `config.log' for more details.
> > make[1]: *** [configure-target-libmudflap] Error 1
> > make[1]: Leaving directory `/home/alexx/tmp/gcc-build'
> > make: *** [all] Error 2

I wonder if you are running into the problem where debian-based distros
use the non-standard 64 bit /usr/lib and 32 bit /usr/lib32, whereas the
rest of the world uses 64 bit /usr/lib64 and 32 bit /usr/lib.  I think
this makes it impossible to build a multilib gcc without patches on such
systems.  You can --disable-multilib and see if that fixes the problem.

Brian

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

* Re: Building GCC 4.2.0 fails on Linux x86-64
  2007-05-25 21:37 ` Brian Dessent
@ 2007-05-26 11:14   ` Alexander Wieder
  0 siblings, 0 replies; 9+ messages in thread
From: Alexander Wieder @ 2007-05-26 11:14 UTC (permalink / raw)
  To: gcc-help

Hi!

Brian Dessent wrote:
> I wonder if you are running into the problem where debian-based distros
> use the non-standard 64 bit /usr/lib and 32 bit /usr/lib32, whereas the
> rest of the world uses 64 bit /usr/lib64 and 32 bit /usr/lib.  I think
> this makes it impossible to build a multilib gcc without patches on such
> systems.  You can --disable-multilib and see if that fixes the problem.

This works for me. Thanks very much!
I'm a bit disappointed that the docs give (at least as far as I have
seen) no hint about this kind of problems. If e.g. all Debian-based
distros behave like this, this issue might be worth mentioning somewhere
in the docs.


Best regards,

Alexander Wieder

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

end of thread, other threads:[~2007-05-26  8:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-25 11:38 Building GCC 4.2.0 fails on Linux x86-64 Alexander Wieder
2007-05-25 11:40 ` Andrew Haley
2007-05-25 14:13   ` Alexander Wieder
2007-05-25 14:49     ` Andrew Haley
2007-05-25 11:57 ` Thomas Mittelstaedt
2007-05-25 13:03 ` John Love-Jensen
2007-05-25 14:36   ` Alexander Wieder
2007-05-25 21:37 ` Brian Dessent
2007-05-26 11:14   ` Alexander Wieder

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