Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I've been trying to install gcc 4.2.2 from the sources.
did download the tarballs and compilation went without any complications but when i try to compile something i get a hell load of errors complaining about missing headers , libs and everything else associated with it .
I'm suspecting that some enviroment variables have to be setup but i've no clue which one or what to fill them with.
Alright here are the errors , but beware of the length
Code:
In file included from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/c++config.h:41,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iostream:44,
from test.cpp:1:
/s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/os_defines.h:44:22: error: features.h: No such file or directory
In file included from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/c++locale.h:47,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iosfwd:45,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ios:43,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ostream:45,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iostream:45,
from test.cpp:1:
/s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/cstring:52:20: error: string.h: No such file or directory
In file included from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/c++locale.h:48,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iosfwd:45,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ios:43,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ostream:45,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iostream:45,
from test.cpp:1:
/s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/cstdio:53:19: error: stdio.h: No such file or directory
In file included from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/c++locale.h:49,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iosfwd:45,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ios:43,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ostream:45,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iostream:45,
from test.cpp:1:
/s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/clocale:51:20: error: locale.h: No such file or directory
In file included from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iosfwd:45,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ios:43,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ostream:45,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iostream:45,
from test.cpp:1:
/s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/c++locale.h:50:38: error: langinfo.h: No such file or directory
/s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/c++locale.h:51:56: error: iconv.h: No such file or directory
/s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/c++locale.h:52:39: error: libintl.h: No such file or directory
In file included from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/gthr.h:114,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/c++io.h:43,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iosfwd:46,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ios:43,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ostream:45,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iostream:45,
from test.cpp:1:
/s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/gthr-default.h:43:21: error: pthread.h: No such file or directory
/s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/i686-pc-linux-gnu/bits/gthr-default.h:44:20: error: unistd.h: No such file or directory
In file included from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/iosfwd:47,
from /s/lib/gcc/i686-pc-linux-gnu/4.2.2/../../../../include/c++/4.2.2/ios:43,
.
.
.
.
.
.
.
.
.
.
I've cut the rest because it's really long and doesn't fit in a post.
As I said before it's complaining about missing headers but i don't know why , since i've got all the tarballs and followed all the steps on gcc.gnu.org
These files should be part of your Linux distribution, and not the 'gcc' tarball.
You might want to check if these files are there by going to /usr/src directory, and trying to find lets say "unistd.h". One way of doing it:
One more thing, check if there is a '[Rr]eadme' file in the tarball which would tell you if you need to tweak makefile. Meanwhile, you might want to consider installing binary rpm for gcc4.2.2 as a fallback, while you're figuring out compilation problems.
These files should be part of your Linux distribution, and not the 'gcc' tarball.
You might want to check if these files are there by going to /usr/src directory, and trying to find lets say "unistd.h". One way of doing it:
Code:
find . -type f -name "unistd.h"
Aha , now that takes us a step closer to the problem.
the point is that , I'm using a stripped linux version not a major distro , it's basically a boot up cd called sysrescuecd .
btw , I've found unistd.h but only at a non-standard path , so what should i do know to tell gcc about the new headers?
or even better where can i get those headers from so that i can compile anyuthing with gcc regardless of the linux flavor?
I am not sure about your distribution, 'sysrescurecd' - sounds like a live CD. I never tried doing anything with those except booting up. But it should have kernel sources, and if it is, then they are located in standard directories somewhere in /usr/src/.../.../.. . It is where your makefile will be looking for them. You might try to modify makefile, for that you need to find a variable which holds include paths, I can't tell exact name, but most likely it will include "INC" as part of the name, and look close to: LINUXINCLUDE = -Iinclude. And then you need to add a line below:
LINUXINCLUDE += -Iyour-non-standard-path.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.