LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-03-2012, 01:38 AM   #1
lohith.nayak
LQ Newbie
 
Registered: Sep 2012
Posts: 12

Rep: Reputation: Disabled
Segmentation error while compiling GCC 4.2.4


Hello all,

I am new to Linux and GCC.
I am facing compilation error while compiling GCC.
I followed following steps for ubuntu 10.04 (ubuntu-10.04.1-desktop-i386.iso) on virtual box (VirtualBox-4.0.0-69151-Win.exe).
1. Untarred file gcc-core-4.2.4.tar.bzip2
2. Created new dir "objdir" inside gcc-2.4.2
3. cd objdir.
4. ../configure --prefix=/usr/local/gnu-program-suffix=-4.2.4
5. gave command time make bootstrap

I am receiving following error for the same.

make[5]: Entering directory `/home/gmdn/tmp/gcc-4.2.4/objdir/i686-pc-linux-gnu/libgomp'
if [ -z "" ]; then \
true; \
else \
rootpre=`${PWDCMD-pwd}`/; export rootpre; \
srcrootpre=`cd ../../../libgomp; ${PWDCMD-pwd}`/; export srcrootpre; \
lib=`echo ${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$,\1,'`; \
compiler="/home/gmdn/tmp/gcc-4.2.4/objdir/./gcc/xgcc -B/home/gmdn/tmp/gcc-4.2.4/objdir/./gcc/ -B/usr/local/gnu--program-suffix=-4.2.4/i686-pc-linux-gnu/bin/ -B/usr/local/gnu--program-suffix=-4.2.4/i686-pc-linux-gnu/lib/ -isystem /usr/local/gnu--program-suffix=-4.2.4/i686-pc-linux-gnu/include -isystem /usr/local/gnu--program-suffix=-4.2.4/i686-pc-linux-gnu/sys-include"; \
for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
dir=`echo $i | sed -e 's/;.*$//'`; \
if [ "${dir}" = "." ]; then \
true; \
else \
if [ -d ../${dir}/${lib} ]; then \
flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../${dir}/${lib}; make \
CFLAGS="-O2 -g -O2 ${flags}" \
CCASFLAGS=" ${flags}" \
FCFLAGS="-Wall ${flags}" \
FFLAGS=" ${flags}" \
ADAFLAGS=" ${flags}" \
prefix="/usr/local/gnu--program-suffix=-4.2.4" \
exec_prefix="/usr/local/gnu--program-suffix=-4.2.4" \
GCJFLAGS=" ${flags}" \
CXXFLAGS="-g -O2 -D_GNU_SOURCE ${flags}" \
LIBCFLAGS="-O2 -g -O2 ${flags}" \
LIBCXXFLAGS="-g -O2 -D_GNU_SOURCE -fno-implicit-templates ${flags}" \
LDFLAGS=" ${flags}" \
MULTIFLAGS="${flags}" \
DESTDIR="" \
INSTALL="/usr/bin/install -c" \
INSTALL_DATA="/usr/bin/install -c -m 644" \
INSTALL_PROGRAM="/usr/bin/install -c" \
INSTALL_SCRIPT="/usr/bin/install -c" \
all); then \
true; \
else \
exit 1; \
fi; \
else true; \
fi; \
fi; \
done; \
fi
make[5]: Leaving directory `/home/gmdn/tmp/gcc-4.2.4/objdir/i686-pc-linux-gnu/libgomp'
make[4]: Leaving directory `/home/gmdn/tmp/gcc-4.2.4/objdir/i686-pc-linux-gnu/libgomp'
make[3]: Leaving directory `/home/gmdn/tmp/gcc-4.2.4/objdir/i686-pc-linux-gnu/libgomp'
make[2]: Leaving directory `/home/gmdn/tmp/gcc-4.2.4/objdir/i686-pc-linux-gnu/libgomp'
make[1]: Leaving directory `/home/gmdn/tmp/gcc-4.2.4/objdir'
1525.89user 720.60system 40:36.39elapsed 92%CPU (0avgtext+0avgdata 849040maxresident)k
93392inputs+2567424outputs (1218major+29593861minor)pagefaults 0swaps

I am unable to trace the error. I have disk space of 20GB. Could you please help me how to overcome this problem.

Thanks in advance,
best regards,
Lohith Nayak
 
Old 09-03-2012, 03:23 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Note : Be aware that gcc-core creates gcc only, no g++, c++ etc.
A build folder (objdir) outside the gcc-4.2.4/ source folder is the default method.
Then a "minimum" configure line for gcc-core can be like :
../gcc-4.2.4/configure --prefix=/usr/local/gcc42 --program-suffix=42 --enable-shared --enable-threads=posix --enable-__cxa_atexit

But why build it yourself ? gcc-4.2.3 is available in Synaptic :
> Settings > Repositories > Other Software : Hardy Heron .
... Then refresh, and install 'gcc-4.2'.

Or : gcc42-compat version 4.2.4 : sudo dpkg -i gcc42-compat-4.2.4_i386.deb
https://docs.google.com/open?id=0B7S...VlMjk4OTI5NGVk

( g++42-compat https://docs.google.com/open?id=0B7S...FlODA4YWFiMTcx )

.
 
Old 09-03-2012, 04:10 AM   #3
lohith.nayak
LQ Newbie
 
Registered: Sep 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Smile

Thanks a lot.
I will try out this option.

best regards,
Lohith Nayak
 
  


Reply

Tags
gcc42-compat, gcc424



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
gcc throws Segmentation fault runtime error mrajdeep Programming 9 08-22-2011 02:30 PM
Error compiling gcc 3.3.6 with 64bit gcc 4.0.3 cs-cam Linux - Software 0 04-22-2006 05:20 AM
compiling in gcc goes well, gives segmentation fault jshine Programming 6 12-19-2004 01:08 AM
Slackwaer 9.1 GCC Compiling Segmentation Fault kdepa Slackware 2 03-15-2004 06:31 PM
[gcc] internal error: segmentation fault fskmh Slackware 3 01-22-2003 05:36 PM

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

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