[SOLVED] how to install an old gcc 3.3 in UBUNTU 20.04
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello Every one.
I want to install an old compiler (gcc 3.0, 3.1, 3.2 or 3.3) in UBUNTU 20.04
I tried with
sudo apt-get install gcc-3
But I get an error "E: Unable to locate package gcc-3"
and sudo apt-get install g++-3 gives me :
"E: Unable to correct problems, you have held broken packages"
I googled it and I add some sources to source.list
but nothing
the whole thing is that I add an old script (created in 2002) to my NS2.35 and when I try to compile it with "make" or "./install" it gives me problems like
(list.h no such file or directory) I searched for this header and I find one in "usr/src/linux-headers-5.4.0-48/scripts/kconfig/list.h" but when I use it it still gives me errors with some variables like "‘visitlist_’ was not declared in this scope" etc..
can anyone help me.
Hello Every one.
I want to install an old compiler (gcc 3.0, 3.1, 3.2 or 3.3) in UBUNTU 20.04
I tried with
sudo apt-get install gcc-3
But I get an error "E: Unable to locate package gcc-3"
and sudo apt-get install g++-3 gives me :
"E: Unable to correct problems, you have held broken packages"
I googled it and I add some sources to source.list
but nothing
the whole thing is that I add an old script (created in 2002) to my NS2.35 and when I try to compile it with "make" or "./install" it gives me problems like
(list.h no such file or directory) I searched for this header and I find one in "usr/src/linux-headers-5.4.0-48/scripts/kconfig/list.h" but when I use it it still gives me errors with some variables like "‘visitlist_’ was not declared in this scope" etc..
can anyone help me.
Recommend you download the source for the version you want, build it, and install it. There's a readme file which will tell you what to do and any pre-requisites needed. Typically you will run a configure script, run make, then run a make install using sudo:
Recommend you download the source for the version you want, build it, and install it. There's a readme file which will tell you what to do and any pre-requisites needed. Typically you will run a configure script, run make, then run a make install using sudo:
Code:
./configure
make
sudo make install
can you give a link where I can download the GCC 3.0 source?
Yes, because the model that I want to add to NS2, cannot be compiled only with an old version of GCC, as I said above some Headers does not exist in the latest version,
I will be very greatful if you give any other solution
The easiest way is probably to fetch the source from Debian Archive:
Code:
dget -u http://archive.debian.org/debian/pool/main/g/gcc-3.3/gcc-3.3_3.3.6ds1-27.2.dsc
cd gcc-3.3-*
sed -i '/DH_COMPAT/s/=2$/=5/' debian/rules
sed -i '/= gcc /s/gcc/&-7/' debian/rules2
sed -i 's/realpath[^,]*/gcc-7/' debian/control
pdebuild
But the problem is you cannot build gcc 3.3 with any gcc compiler present in Ubuntu 20.04 repos. As you can see above, I tried gcc-7 which is the oldest version available there. Nevertheless, I got
Code:
../../src/gcc/unwind-dw2.c: In function `uw_frame_state_for':
../../src/gcc/unwind-dw2.c:954: error: dereferencing pointer to incomplete type
You may try to directly install binary deb files for gcc 3.3 from Debian Archive. If that won't do the trick, you'll be left with two options: either patch GCC sources so it can be built with at least gcc-7 (unfortunately, the fix referenced there, is not available anymore), or bootstrap it by building say gcc-5 first, and then gcc-3 with freshly built gcc-5.
The easiest way is probably to fetch the source from Debian Archive:
Code:
dget -u http://archive.debian.org/debian/pool/main/g/gcc-3.3/gcc-3.3_3.3.6ds1-27.2.dsc
cd gcc-3.3-*
sed -i '/DH_COMPAT/s/=2$/=5/' debian/rules
sed -i '/= gcc /s/gcc/&-7/' debian/rules2
sed -i 's/realpath[^,]*/gcc-7/' debian/control
pdebuild
But the problem is you cannot build gcc 3.3 with any gcc compiler present in Ubuntu 20.04 repos. As you can see above, I tried gcc-7 which is the oldest version available there. Nevertheless, I got
Code:
../../src/gcc/unwind-dw2.c: In function `uw_frame_state_for':
../../src/gcc/unwind-dw2.c:954: error: dereferencing pointer to incomplete type
You may try to directly install binary deb files for gcc 3.3 from Debian Archive. If that won't do the trick, you'll be left with two options: either patch GCC sources so it can be built with at least gcc-7 (unfortunately, the fix referenced there, is not available anymore), or bootstrap it by building say gcc-5 first, and then gcc-3 with freshly built gcc-5.
Thank you!
I had download the package, and I am now adding the headers one by one and recompile.
is this the right way?
when I finish it I will tell you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.