I need gcc-3.4 to compile some softwares on my Ubuntu 11.10 (32-bit). So I downloaded:

cpp-3.4_3.4.6-6ubuntu5_i386.deb
gcc-3.4-base_3.4.6-6ubuntu5_i386.deb
gcc-3.4_3.4.6-6ubuntu5_i386.deb

and installed them using sudo dpkg -i *.deb. Then I tried to compile a "Hello World" program using gcc-3.4 hello.c, but it told me:

In file included from /usr/include/features.h:388,
                 from /usr/include/stdio.h:28,
                 from test.c:1:
/usr/include/gnu/stubs.h:7:27: gnu/stubs-32.h: No such file or directory

I've did the same thing on Ubuntu 10.10 and I successed. So what should I do on Ubuntu 11.10?

link|improve this question
Nevermind my previous comment, this probably requires some self-compilation of the following source package: packages.ubuntu.com/source/hardy/gcc-3.4, which is a hassle. Another option is trying to get the package from the source, gcc.gnu.org/gcc-3.4 (ftp.nluug.nl/mirror/languages/gcc/releases/gcc-3.4.6). – Legolas Oct 28 '11 at 10:10
feedback

migrated from stackoverflow.com Oct 29 '11 at 1:36

This question came from our site for professional and enthusiast programmers.

1 Answer

Try to install the development package libc6-dev.

It contains the stubs-32.h file as shown in the file list.

Use -I dir to add the directory to the include search path, where headers are looked for...

link|improve this answer
Thank you for the advice, but I've installed it and it was not helpful. – lqhl Oct 28 '11 at 10:16
When I look at the contents of the package it should work. Exactly the same error? (packages.ubuntu.com/oneiric/i386/libc6-dev/filelist) – Michel Oct 28 '11 at 10:45
yes, exactly and i have the file /usr/include/i386-linux-gnu/gnu/stubs-32.h in my computer. but gcc-3.4 still cannot find it. can i ask gcc-3.4 search the path /usr/include/i386-linux-gnu/ for *.h files. – lqhl Oct 28 '11 at 10:52
-I dir Add the directory dir to the list of directories to be searched for header files. – Michel Oct 28 '11 at 11:44
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.