LinuxQuestions.org
Visit Jeremy's Blog.
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 08-05-2006, 11:42 AM   #1
miggles
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Rep: Reputation: 0
Building gcc under FC4


I am having the worst time trying to build gcc in an FC4 environment. I've built gcc in the past under IRIX, macosx, and even a cross-compiler for mips-tivo, but the FC4 build has me totally stumped. I have read stuff on the net that FC4's gcc is heavily patched and barely works, so maybe this is a futile exercise?


% uname -a
Linux migglespc 2.6.11-1.1369_FC4smp #1 SMP Thu Jun 2 23:16:33 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

% gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)

% mkdir build411
% cd build411
% ../gcc-4.1.1/configure --enable-languages=c,c++ --prefix=${HOME}/gnu --host=x86_64-redhat-linux --enable-shared --enable-__cxa_atexit --with-system-zlib --disable-multilib
% make bootstrap
...
/bin/sh ../../gcc-4.1.1/gcc/mkconfig.sh tconfig.h
./xgcc -B./ -B/home/miggles/gnu/x86_64-redhat-linux/bin/ -isystem /home/miggles/gnu/x86_64-redhat-linux/include -isystem /home/miggles/gnu/x86_64-redhat-linux/sys-include -L/home/miggles/build411/gcc/../ld -O2 -O2 -m64 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc-4.1.1/gcc -I../../gcc-4.1.1/gcc/. -I../../gcc-4.1.1/gcc/../include -I../../gcc-4.1.1/gcc/../libcpp/include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \
-c ../../gcc-4.1.1/gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
xgcc: braced spec body '-masm=intel %n`-mintel-syntax' is deprecated. Use `-masm=' is invalid
make[2]: *** [crtbegin.o] Error 1
make[2]: Leaving directory `/home/miggles/build411/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/home/miggles/build411/gcc'
make: *** [bootstrap] Error 2



I even tried building gcc v4.0.2 using the **exact** configure shown via ``gcc -v'', and it also fails (details omitted):


...
In file included from ../../gcc-4.0.2/gcc/crtstuff.c:67:
../../gcc-4.0.2/gcc/unwind-dw2-fde.h:42: warning: type defaults to ‘int’ in declaration of ‘count’
../../gcc-4.0.2/gcc/unwind-dw2-fde.h:42: warning: data definition has no type or storage class
../../gcc-4.0.2/gcc/unwind-dw2-fde.h:44: error: syntax error before ‘}’ token
../../gcc-4.0.2/gcc/unwind-dw2-fde.h:67: error: syntax error before ‘size_t’


And speaking of gcc barely working on FC4, it looks like the 64-bit libstdc++ is seriously broken while 32-bit compiles seem to work. Even this simple code fails to link:


% cat junk.C
#include <iostream>

int main()
{
std::istream *a;
a->seekg(0, std::ios::beg);
return 0;
}

% g++ junk.C
/tmp/ccBI6HOo.o(.text+0x1e): In function `main':
junk.C: undefined reference to `std::basic_istream<char, std::char_traits<char> >::seekg(long long, std::_Ios_Seekdir)'
collect2: ld returned 1 exit status
% g++ -m32 junk.C


Is FC4 simply not ready for prime time when it comes to x86_64? Is FC5 any better? Thanks.
 
Old 08-05-2006, 05:00 PM   #2
jlo_sandog
Member
 
Registered: Jul 2005
Location: USA
Distribution: F10 (x86_64)
Posts: 549

Rep: Reputation: 32
I just compiled your junk.c file 32 and 62 bit without faults. Not sure what to tell you. I dont compile a lot, but haven't had any problems when I tried.
 
Old 08-07-2006, 12:02 PM   #3
miggles
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Original Poster
Rep: Reputation: 0
jlo, did you compile using -m64? Maybe you are running FC4 on a 32-bit architecture which would default to the -m32.

This really looks to me like FC4 has a bad glibc-headers package.
 
Old 08-08-2006, 02:24 AM   #4
jlo_sandog
Member
 
Registered: Jul 2005
Location: USA
Distribution: F10 (x86_64)
Posts: 549

Rep: Reputation: 32
As I wrote before, I compiled junk.c in 32bit (-m32) and 64 bit (-m64), and I'm running FC5 x86_64.
 
  


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
building gcc slackware jakiel Linux - Newbie 5 01-30-2007 07:19 PM
error in Building gcc-4.0.2 newcomer4 Linux - Software 2 01-31-2006 02:44 AM
Error building GCC Lunar_Lamp Linux From Scratch 1 01-18-2006 05:30 AM
building gcc under cygwins Laplace Linux - General 0 11-12-2003 01:40 AM
Building GCC natesch Linux - Newbie 4 05-09-2002 12:38 AM

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

All times are GMT -5. The time now is 11:48 AM.

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