LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 12-13-2007, 05:43 PM   #1
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Rep: Reputation: 40
Installing gcc.4.2.2


HI there ,

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.

so your help is required here...again.


and thanks.
 
Old 12-13-2007, 06:00 PM   #2
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
You need to be more specific, and even better of if you provide listing of the errors.
 
Old 12-13-2007, 06:25 PM   #3
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453

Original Poster
Blog Entries: 3

Rep: Reputation: 40
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

so what should i do more?
 
Old 12-13-2007, 06:42 PM   #4
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
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"
 
Old 12-13-2007, 06:48 PM   #5
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
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.
 
Old 12-13-2007, 07:10 PM   #6
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453

Original Poster
Blog Entries: 3

Rep: Reputation: 40
Quote:
Originally Posted by rsashok View Post
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?
 
Old 12-13-2007, 07:33 PM   #7
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installing gcc Geminias Linux - Newbie 5 01-10-2006 04:12 AM
Installing GCC holyfeces Linux - Newbie 5 01-10-2005 02:35 PM
Installing gcc beep Linux - Software 1 06-12-2004 04:13 PM
Installing GCC sovietpower Linux - Newbie 1 06-01-2003 05:28 PM
Installing GCC 3.1 over GCC 2.96...? aaronluke Linux - General 3 09-27-2002 05:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration