public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* compiling gcc 2.95.3 under ubuntu 10.04.2, x86_64
@ 2012-04-02 17:29 Roman Suvorov
  2012-04-03 10:21 ` Andrew Haley
  0 siblings, 1 reply; 4+ messages in thread
From: Roman Suvorov @ 2012-04-02 17:29 UTC (permalink / raw)
  To: gcc

Hello everyone,
Not sure if this is the right place to ask this question, feel free to point me in the right direction.
I'm looking into the evolution of Linux kernel and this requires me to build some ancient releases (as old as 2.4.0) from source using GCC. I have gcc 4.4.3-4ubuntu5 installed on my lab machine but it's incompatible with these old sources, and the "lowest common denominator" would be gcc 2.95.3, so I've been trying to compile it from source - so far with little success.
It's hard but not impossible - done before by this guy: http://www.trevorpounds.com/blog/?p=111&cpage=1#comment-102. I followed all of his suggestions but so far hasn't had much luck - most recent attempt dies with the following message:
/usr/bin/ld.bfd.real: error in pic/cstrmain.o(.eh_frame); no .eh_frame_hdr table will be created.

The URL above contains a link to my stdout/stderr logs too. Has anyone here tried compiling such an old version of GCC? Any advice/help would be greatly appreciated.

Regards,
Roman.

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

* Re: compiling gcc 2.95.3 under ubuntu 10.04.2, x86_64
  2012-04-02 17:29 compiling gcc 2.95.3 under ubuntu 10.04.2, x86_64 Roman Suvorov
@ 2012-04-03 10:21 ` Andrew Haley
  2012-04-03 10:30   ` Richard Guenther
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Haley @ 2012-04-03 10:21 UTC (permalink / raw)
  To: Roman Suvorov; +Cc: gcc

On 04/02/2012 06:29 PM, Roman Suvorov wrote:
> Hello everyone,
> Not sure if this is the right place to ask this question, feel free to point me in the right direction.

Redirect to gcc-help.

> I'm looking into the evolution of Linux kernel and this requires me
> to build some ancient releases (as old as 2.4.0) from source using
> GCC. I have gcc 4.4.3-4ubuntu5 installed on my lab machine but it's
> incompatible with these old sources, and the "lowest common
> denominator" would be gcc 2.95.3, so I've been trying to compile it
> from source - so far with little success.

> It's hard but not impossible - done before by this guy:
> http://www.trevorpounds.com/blog/?p=111&cpage=1#comment-102. I
> followed all of his suggestions but so far hasn't had much luck -
> most recent attempt dies with the following message:

> /usr/bin/ld.bfd.real: error in pic/cstrmain.o(.eh_frame); no .eh_frame_hdr table will be created.
> 
> The URL above contains a link to my stdout/stderr logs too. Has anyone here tried compiling such an old version of GCC? Any advice/help would be greatly appreciated.

It's going to be hard.  gcc 2.95 doesn't support using x86_64 as a host,
so you're going to have to build in in a 32-bit virtual machine or by
using mock.

You'll have other problems too.  gcc back then wasn't so standards-
clean as it is now; we have a lot of warnings and better diagnostics
that have allowed us to clean up gcc.  I don't know why you got that
particular message, and as I said I can't look at your logs.  I might
have a try myself to build gcc 2.95 later today.

Andrew.

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

* Re: compiling gcc 2.95.3 under ubuntu 10.04.2, x86_64
  2012-04-03 10:21 ` Andrew Haley
@ 2012-04-03 10:30   ` Richard Guenther
  2012-04-03 17:54     ` Roman Suvorov
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Guenther @ 2012-04-03 10:30 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Roman Suvorov, gcc

On Tue, Apr 3, 2012 at 12:21 PM, Andrew Haley <aph@redhat.com> wrote:
> On 04/02/2012 06:29 PM, Roman Suvorov wrote:
>> Hello everyone,
>> Not sure if this is the right place to ask this question, feel free to point me in the right direction.
>
> Redirect to gcc-help.
>
>> I'm looking into the evolution of Linux kernel and this requires me
>> to build some ancient releases (as old as 2.4.0) from source using
>> GCC. I have gcc 4.4.3-4ubuntu5 installed on my lab machine but it's
>> incompatible with these old sources, and the "lowest common
>> denominator" would be gcc 2.95.3, so I've been trying to compile it
>> from source - so far with little success.
>
>> It's hard but not impossible - done before by this guy:
>> http://www.trevorpounds.com/blog/?p=111&cpage=1#comment-102. I
>> followed all of his suggestions but so far hasn't had much luck -
>> most recent attempt dies with the following message:
>
>> /usr/bin/ld.bfd.real: error in pic/cstrmain.o(.eh_frame); no .eh_frame_hdr table will be created.
>>
>> The URL above contains a link to my stdout/stderr logs too. Has anyone here tried compiling such an old version of GCC? Any advice/help would be greatly appreciated.
>
> It's going to be hard.  gcc 2.95 doesn't support using x86_64 as a host,
> so you're going to have to build in in a 32-bit virtual machine or by
> using mock.
>
> You'll have other problems too.  gcc back then wasn't so standards-
> clean as it is now; we have a lot of warnings and better diagnostics
> that have allowed us to clean up gcc.  I don't know why you got that
> particular message, and as I said I can't look at your logs.  I might
> have a try myself to build gcc 2.95 later today.

You can have success with only minor patching when you stage a 3.x
release inbetween and use that to compile 2.95.  At least that is how
I created my 2.95 build ;)

Richard.

> Andrew.

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

* Re: compiling gcc 2.95.3 under ubuntu 10.04.2, x86_64
  2012-04-03 10:30   ` Richard Guenther
@ 2012-04-03 17:54     ` Roman Suvorov
  0 siblings, 0 replies; 4+ messages in thread
From: Roman Suvorov @ 2012-04-03 17:54 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc

Hi Richard,
Could you please provide some more instructions on how you got your 2.95 build using GCC 3?

I just tried using GCC 3.4.6 (from http://packages.ubuntu.com/hardy/amd64/gcc-3.4-base/download) and build from source using this command:
CC=../gcc-3.4/bin/gcc-3.4 CFLAGS=-D_FORTIFY_SOURCE=0 ./configure --prefix=~/gcc-2.95.3 --enable-languages=c,c++ --enable-threads=posix --enable-shared --host i386-pc-linux-gnu
It dies right away because it can't find cc1. I got the cc1 executable from the corresponding cpp 3.4.6 package (http://packages.ubuntu.com/hardy/amd64/cpp-3.4/download) and placed it in the same bin directory as the gcc-3.4 executable, but still nothing.
As you can probably guess I've never build GCC from source before.. but I can right away spot that the target host is i386 - I'm assuming that's due to the fact that GCC 2.95 doesn't even support x86_64?

Regards,
Roman.

On 03-Apr-2012, at 6:30 , Richard Guenther wrote:

> On Tue, Apr 3, 2012 at 12:21 PM, Andrew Haley <aph@redhat.com> wrote:
>> On 04/02/2012 06:29 PM, Roman Suvorov wrote:
>>> Hello everyone,
>>> Not sure if this is the right place to ask this question, feel free to point me in the right direction.
>> 
>> Redirect to gcc-help.
>> 
>>> I'm looking into the evolution of Linux kernel and this requires me
>>> to build some ancient releases (as old as 2.4.0) from source using
>>> GCC. I have gcc 4.4.3-4ubuntu5 installed on my lab machine but it's
>>> incompatible with these old sources, and the "lowest common
>>> denominator" would be gcc 2.95.3, so I've been trying to compile it
>>> from source - so far with little success.
>> 
>>> It's hard but not impossible - done before by this guy:
>>> http://www.trevorpounds.com/blog/?p=111&cpage=1#comment-102. I
>>> followed all of his suggestions but so far hasn't had much luck -
>>> most recent attempt dies with the following message:
>> 
>>> /usr/bin/ld.bfd.real: error in pic/cstrmain.o(.eh_frame); no .eh_frame_hdr table will be created.
>>> 
>>> The URL above contains a link to my stdout/stderr logs too. Has anyone here tried compiling such an old version of GCC? Any advice/help would be greatly appreciated.
>> 
>> It's going to be hard.  gcc 2.95 doesn't support using x86_64 as a host,
>> so you're going to have to build in in a 32-bit virtual machine or by
>> using mock.
>> 
>> You'll have other problems too.  gcc back then wasn't so standards-
>> clean as it is now; we have a lot of warnings and better diagnostics
>> that have allowed us to clean up gcc.  I don't know why you got that
>> particular message, and as I said I can't look at your logs.  I might
>> have a try myself to build gcc 2.95 later today.
> 
> You can have success with only minor patching when you stage a 3.x
> release inbetween and use that to compile 2.95.  At least that is how
> I created my 2.95 build ;)
> 
> Richard.
> 
>> Andrew.

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

end of thread, other threads:[~2012-04-03 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-02 17:29 compiling gcc 2.95.3 under ubuntu 10.04.2, x86_64 Roman Suvorov
2012-04-03 10:21 ` Andrew Haley
2012-04-03 10:30   ` Richard Guenther
2012-04-03 17:54     ` Roman Suvorov

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