LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-25-2009, 12:11 PM   #1
vidar
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Rep: Reputation: 0
Troubles compiling GCC v4.3.3 / 4.4.0


Hello,
I currently have GCC 4.1.2 installed and working. Unfortunately, this version does not seem to support OpenMP, so I try to install some GCC that does. So far , I tried to compile v. 4.3.3 and v. 4.4.0 , but both encounter the same error
([EDIT:] Since yesterday, I have tried all versions from 4.4.0 through 4.1.2, with every version above 4.1.2 failing with the same error message):

4.1.2 compiled just fine.
configuration was done via
../gcc-4.4.0/configure --prefix=/home/mibeer/prog --enable-threads --with-arch=pentium4 --with-tune=pentium4 --enable-languages=c,c++,fortran --with-gmp=/home/mibeer/prog --with-mpfr=/home/mibeer/prog

I used a separate directory for configuration/compilation. I also tried it without the 'with-arch'/'with-tune' switches, but without success.

Then compilation was started by
make bootstrap

What I get is
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.4.0/gcc -I../../gcc-4.4.0/gcc/. -I../../gcc-4.4.0/gcc/../include -I../../gcc-4.4.0/gcc/../libcpp/include -I/home/mibeer/prog/include -I/home/mibeer/prog/include -I../../gcc-4.4.0/gcc/../libdecnumber -I../../gcc-4.4.0/gcc/../libdecnumber/bid -I../libdecnumber ../../gcc-4.4.0/gcc/c-lang.c -o c-lang.o
In file included from ../../gcc-4.4.0/gcc/input.h:25,
from ../../gcc-4.4.0/gcc/tree.h:27,
from ../../gcc-4.4.0/gcc/c-lang.c:27:
../../gcc-4.4.0/gcc/../libcpp/include/line-map.h:67: Fehler: »CHAR_BIT« ist hier nicht deklariert (nicht in einer Funktion)

I found out, that compilation just continues if I change line 61 in gcc-4.4.0//libcpp/include/line-map.h from:
struct line_map GTY(())
to:
struct line_map GTY()

Unfortunately, then it fails some time later on complaining:
build/gengtype ../../gcc-4.4.0/gcc gtyp-input.list
../../gcc-4.4.0/gcc/../libcpp/include/line-map.h:61: parse error: expected '(', have ')'../../gcc-4.4.0/gcc/../libcpp/include/line-map.h:62: parse error: expected an option keyword, have '{'../../gcc-4.4.0/gcc/../libcpp/include/line-map.h:63: parse error: expected ')', have 'char'../../gcc-4.4.0/gcc/../libcpp/include/line-map.h:63: parse error: expected ')', have '*'make[3]: *** [s-gtype] Fehler 1

I tried to just switch from the '(())' to the '()' version back and forth, but at a certain point there was no further advance ( and I guess the resulting compiler would not have worked that fine...)
I am using Suse Linux 10.2 on a Xeon/P4 box. I cant upgrade the box as do not have the privileges (that is why I install the compilers into my local directory - I did this with GCC 4.1.2 as well). This particular Suse version does not seem to bring a GCC version that supports OpenMP...
Has anyone an idea why this happens and how one could solve this?

Thank you
Michael

Last edited by vidar; 05-26-2009 at 05:47 AM.
 
Old 05-29-2009, 03:50 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You need to have correct build toolchain for successful compile of gcc, binutils, and glibc.
See the sites for help compiling gcc:
www.diy-linux.org
Reference build section
and
www.linuxfromscratch.org
Read section
 
Old 05-30-2009, 02:22 PM   #3
vidar
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you for your reply!
If I understand you correctly, one or several of the toolchain are soneway inept for compiling recent versions? This seems quite plausible to me, too, but the configure -skript does not complain about anything - well, I am going to check the links you supplied and see whether there is any incompatibility (did I spell this one right?). Ill post the result as soon as I will be back to the failing machine.

Thank you!
Michael
PS: If you want to look at the documentation for installing gcc shipped with the tarball, do you need to create the compiler firstly BEFORE being able to create the documentation telling you how to do this? I tried tried it through
Code:
make doc
and what I got was something like
Code:
xgcc unable to create executables
( I am not at the particular machine right now so I cant post the actual error message)
Perhaps I mess things up a little bit right now, but if I do not, it seems strange that one needs the compiler be built before being able to access the documentation telling one how it could be built!? (The INSTALL - text file just refers to the documentation you have to build...)
Anyway, this is beyond the scope of this thread
 
  


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
How to selectively use GCC 3.4 -OR- GCC 4.1 in FC6 when compiling? rylan76 Fedora 2 11-21-2006 11:36 PM
Error compiling gcc 3.3.6 with 64bit gcc 4.0.3 cs-cam Linux - Software 0 04-22-2006 05:20 AM
Kernel compiling: gcc-3.3 is 586, should be gcc-3.3 386 Erik Plaggenmar Linux - Software 0 10-01-2004 11:38 AM
Various Compiling Errors (GCC compiling Openal, GUIlib, xmms-wma) gregorya Linux - Software 2 08-27-2004 05:03 AM
GCC RPM troubles..... J_Bone Linux - Newbie 11 11-04-2003 06:08 PM

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

All times are GMT -5. The time now is 12:10 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