Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-17-2002, 04:08 PM   #1
LQ Newbie
Registered: Dec 2002
Distribution: Slackware
Posts: 1

Rep: Reputation: 0
make and gcc compile errors

I'm trying to compile GCC 3.2.1 in slackware to try and take advantage of the optimisations since the default package is only i386.

I'm getting various compile errors. One was crtsuff.c Internal error: Seg fault . The most recent one I didn't write down but it had to do w/ linking to an object file. I'm not on my linux box so I can't paste the error messages in here. I've tried only compiling "c" instead of objc and c++ w/ the "--enable-language=" flag. Here are the params I've tried when compiling. My guess is they're too agressive which is why it's messing up. Here's the command I've tried typing in w/o "":

"./configure --host=i686-linux-gnu --enable-language=c,c++,objc --enable-shared --disable-multilib"

then "make"

I don't have a comp sci degree but I have programmed before to some extent before; what I'm trying to say is I'm just looking at the compile flags and choosing the ones I think fit.

I've also tried doing a make clean after the compile errors which didn't seem to help. ./configure doesn't report any errors and it does compile for a few mintues before spitting out an error. I'm also guessing when I do a make install it will copy the libs to the right directory or should I specify it w/ flags during the ./configure.

Anything I should try?
Thanks for the help.
Old 12-18-2002, 03:56 AM   #2
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Well this is how the LFS book explains how to compile it:

patch -Np1 -i ../gcc-3.2.patch &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.2/configure --prefix=/usr --enable-shared \
--enable-languages=c,c++ --enable-threads=posix \
--with-slibdir=/lib --enable-__cxa_atexit \
--enable-clocale=gnu &&
make bootstrap &&
make install &&
ln -s ../usr/bin/cpp /lib &&
ln -s ../bin/cpp /usr/lib &&
ln -s gcc /usr/bin/cc

--enable-threads=posix: This enables C++ exception handling for multithreaded code.

--enable-__cxa_atexit: This option will result in C++ shared libraries and C++ programs that are interoperable with other linux distributions.

--enable-clocale=gnu: There is a risk that some people will build ABI incompatible C++ libraries if they didn't install all of the glibc localedata. Using --enable-clocale=gnu ensures that the "right thing" is done in all cases. If you don't wish to use this option, then at least build the de_DE locale. When GCC finds this specific locale, then the correct locale mode (gnu) is implemented.

You might need to change a few of those commands to get it setup properly afterwards to fit your slackware distribution.
It adds a patch which might be necessary to get it to compile properly. Also you should be careful when doing optimistations by setting the CFLAGS and CXXFLAGS. It worked fine when I compiled it but if you get segmentation faults you should unset these variables.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nvu by gcc 4.0 .. compile errors! TokyoYank Linux - Software 0 11-01-2005 03:15 AM
kernel compile errors with gcc 3.4.2 MarleyGPN Linux - Software 0 09-29-2004 08:03 PM
'Make' needs 'Gcc' to compile but 'Gcc' needs 'Make'??? Qwirt Linux - Software 1 07-14-2004 11:54 PM
gcc-3.3.1 compile errors RTT Linux From Scratch 1 02-28-2004 07:53 PM
gcc compile errors ? qwijibow Linux - Newbie 2 07-21-2003 08:20 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:33 PM.

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