Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

how could I install gcc-4.2.0 in my debian, Thanks!

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
wilson_wang
Posts: 2
Joined: 2014-12-11 23:53

how could I install gcc-4.2.0 in my debian, Thanks!

#1 Post by wilson_wang »

Hi, I just started to play with Linux for a very short while. Recently, I am working to install some older version of gcc in order to compile some older version Kernel (such as Kernel_2.6.34).

Here is my system info with uname -a command. Linux Richard 3.2.0-4-486 #1 Debian 3.2.63-2+deb7u1 i686 GNU/Linux

After I installed pre-requisites packages, I can install gcc-4.9.2 pretty smoothly. I also did some practice with kernel upgrade, which went also very smoothly.
However, when I tried to install gcc-4.2.0, I had troubles. First, something like "stubs-32.h missing" popped up. I made a soft link. It was solved. However, second time I ran "make bootstrap". The process ended up with message like "cannot find crti.o".

I just hope that someone can give me some input regarding this issue. This problem troubled me for a quite while.

Thanks!

:oops:

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: how could I install gcc-4.2.0 in my debian, Thanks!

#2 Post by Segfault »

GCC and GLIBC and some other parts of toolchain are tied together and cannot be downgraded that easy. Anyhow, downgrading really does not work in FOSS world. You either keep up with upgrades or you will be dropped sooner or later.

If you _absolutely_ need to run some exotic ancient software consider installing an ancient distro in a virtual machine.

User avatar
hadrons123
Posts: 59
Joined: 2012-01-31 09:58
Location: NYC

Re: how could I install gcc-4.2.0 in my debian, Thanks!

#3 Post by hadrons123 »

@OP create this link

Code: Select all

 ln -s /usr/lib/x86_64-linux-gnu /usr/lib64
LENOVO Y580 CORE i7 3630QM|8 GB RAM |16GB Sandisk SSD| Debian, Fedora, ARCH

Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: how could I install gcc-4.2.0 in my debian, Thanks!

#4 Post by stevepusser »

Why do you think you need an older gcc to compile that kernel version?
MX Linux packager and developer

wilson_wang
Posts: 2
Joined: 2014-12-11 23:53

Re: how could I install gcc-4.2.0 in my debian, Thanks!

#5 Post by wilson_wang »

First, I would like to thank all of you giving advice on my question!

Why I would like to install the older version of GCC is because I tried to study the Linux System 2.6.34. By chance, I found that there is one book studying the guts of Linux_2.6.34. Yes, I definitely can take a closer look at the current system structure. I guess that it might be better for a novice like me to stick with a textbook. Therefore, I tried to install an older version of Linux Kernel. While compiling the older version Kernel, compiling process always had problem. As suggested by other online info, it is not always a good idea to compile the previous version Kernel by using a updated GCC. Therefore, I got interested in installing one much older version GCC (4.2.0).

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: how could I install gcc-4.2.0 in my debian, Thanks!

#6 Post by stevepusser »

Online info is often baloney, just look how many sites tell you to install PPA repositories in stable Debian. Or how wonderful this guy thinks Xubuntu color scheme is: http://www.dedoimedo.com/computers/xubuntu-utopic.html
Or how the Xubuntu xfce desktop is only using 300 MB--marvelous!

I think you would be better off learning about a more modern version of gcc than one that is old and rarely used. You should be able to build older kernels without any problems using a modern version of gcc.
MX Linux packager and developer

ohZeishi
Posts: 88
Joined: 2014-12-05 19:51

Re: how could I install gcc-4.2.0 in my debian, Thanks!

#7 Post by ohZeishi »

stevepusser wrote:You should be able to build older kernels without any problems using a modern version of gcc.
But unfortunately that's not always true: A couple of days ago, I compiled a 3.0-armhf-kernel with gcc 4.9.2 and got strange crashes on boot (which is especially fun if you're using a device where you have use a soldering iron to get a serial console). Some googling led to this commit https://github.com/torvalds/linux/commi ... cb469942b5.
I wouldn't be surprised to run into simliar issues on i686.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: how could I install gcc-4.2.0 in my debian, Thanks!

#8 Post by stevepusser »

I have heard that gcc 4.9 has rather odd bugs, I'd stick to 4.8 for building anything!
MX Linux packager and developer

ohZeishi
Posts: 88
Joined: 2014-12-05 19:51

Re: how could I install gcc-4.2.0 in my debian, Thanks!

#9 Post by ohZeishi »

Most of the time, those aren't really bugs. But rather optimizations that are technically allowed by the standards, but that some programmers didn't expect. Like that Flash/memcpy-thing a few years back (although that was in glibc and not directly in gcc).

Oh, and that specific commit I linked to explicitly mentions gcc 4.7.2, so using 4.8 wouldn't save you ;)

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: how could I install gcc-4.2.0 in my debian, Thanks!

#10 Post by Segfault »

stevepusser wrote:I have heard that gcc 4.9 has rather odd bugs, I'd stick to 4.8 for building anything!
Have to agree with this statement. Most of my boxes run Gentoo testing version - means compiling, compiling ... GCC version is 4.8.3.

Post Reply