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 |
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 ) . |
Thanks a lot.
I will try out this option. best regards, Lohith Nayak |
All times are GMT -5. The time now is 03:46 PM. |