public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling gcc-4.2 on 64 bit Ubuntu
@ 2007-02-27 20:18 Terry Frankcombe
  2007-02-28 13:22 ` Andrew Haley
  2007-03-01 17:13 ` Terry Frankcombe
  0 siblings, 2 replies; 3+ messages in thread
From: Terry Frankcombe @ 2007-02-27 20:18 UTC (permalink / raw)
  To: gcc-help

Hi folks

I've run into trouble trying to compile gcc 4.2 (gcc-4.2-20070221) on an
amd64 machine running 64 bit Ubuntu.  I configure with:

./configure --disable-multilibs --enable-languages=fortran

then doing a make gets as far as compiling ../.././gcc/crtstuff.c in
gcc-4.2-20070221/host-x86_64-unknown-linux-gnu/gcc.  /usr/include/gnu/stubs.h is included which then tries to include gnu/stubs-32.h, which doesn't exist, rather than gnu/stubs-64.h, which does.  Thus apparently __WORDSIZE is defined as 32.

Now Ubuntu has 64 bit libraries in /usr/lib and 32 bit libraries
in /usr/lib32 (with a simlink from /usr/lib64 to /usr/lib).

Any ideas about how I can coerce configure to set things up correctly to
build a 64 bit compiler?

Ciao
Terry

-- 
Dr Terry Frankcombe
Physical Chemistry, Department of Chemistry
Göteborgs Universitet
SE-412 96 Göteborg Sweden
Ph: +46 76 224 0887   Skype: terry.frankcombe
<terry@chem.gu.se>

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

* Re: Compiling gcc-4.2 on 64 bit Ubuntu
  2007-02-27 20:18 Compiling gcc-4.2 on 64 bit Ubuntu Terry Frankcombe
@ 2007-02-28 13:22 ` Andrew Haley
  2007-03-01 17:13 ` Terry Frankcombe
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Haley @ 2007-02-28 13:22 UTC (permalink / raw)
  To: Terry Frankcombe; +Cc: gcc-help

Terry Frankcombe writes:
 > 
 > I've run into trouble trying to compile gcc 4.2 (gcc-4.2-20070221) on an
 > amd64 machine running 64 bit Ubuntu.  I configure with:
 > 
 > ./configure --disable-multilibs --enable-languages=fortran
 > 
 > then doing a make gets as far as compiling ../.././gcc/crtstuff.c in
 > gcc-4.2-20070221/host-x86_64-unknown-linux-gnu/gcc.  /usr/include/gnu/stubs.h is included which then tries to include gnu/stubs-32.h, which doesn't exist, rather than gnu/stubs-64.h, which does.  Thus apparently __WORDSIZE is defined as 32.

Neither of these files are part of gcc.

 > Now Ubuntu has 64 bit libraries in /usr/lib and 32 bit libraries
 > in /usr/lib32 (with a simlink from /usr/lib64 to /usr/lib).

Well, that is totally broken.  Blame Ubuntu.

 > Any ideas about how I can coerce configure to set things up correctly to
 > build a 64 bit compiler?

Get a suitable set of sources for Ubuntu.  I suggest that they can be
downloaded from the Ubuntu web site.

Andrew.

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

* Re: Compiling gcc-4.2 on 64 bit Ubuntu
  2007-02-27 20:18 Compiling gcc-4.2 on 64 bit Ubuntu Terry Frankcombe
  2007-02-28 13:22 ` Andrew Haley
@ 2007-03-01 17:13 ` Terry Frankcombe
  1 sibling, 0 replies; 3+ messages in thread
From: Terry Frankcombe @ 2007-03-01 17:13 UTC (permalink / raw)
  To: gcc-help

[Posted for completeness]


After no useful help here or through the Ubuntu forums, I worked it out.

Solution was simple:  set CFLAGS to -m64 before configure.

Strange, as the previously installed gcc produced 64 bit execs by
default.




On Tue, 2007-02-27 at 19:47 +0100, Terry Frankcombe wrote:
> Hi folks
> 
> I've run into trouble trying to compile gcc 4.2 (gcc-4.2-20070221) on an
> amd64 machine running 64 bit Ubuntu.  I configure with:
> 
> ./configure --disable-multilibs --enable-languages=fortran
> 
> then doing a make gets as far as compiling ../.././gcc/crtstuff.c in
> gcc-4.2-20070221/host-x86_64-unknown-linux-gnu/gcc.  /usr/include/gnu/stubs.h is included which then tries to include gnu/stubs-32.h, which doesn't exist, rather than gnu/stubs-64.h, which does.  Thus apparently __WORDSIZE is defined as 32.
> 
> Now Ubuntu has 64 bit libraries in /usr/lib and 32 bit libraries
> in /usr/lib32 (with a simlink from /usr/lib64 to /usr/lib).
> 
> Any ideas about how I can coerce configure to set things up correctly to
> build a 64 bit compiler?
> 
> Ciao
> Terry
> 

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

end of thread, other threads:[~2007-03-01 17:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-27 20:18 Compiling gcc-4.2 on 64 bit Ubuntu Terry Frankcombe
2007-02-28 13:22 ` Andrew Haley
2007-03-01 17:13 ` Terry Frankcombe

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