On 13 February 2012 21:21, Satya Prakash Prasad wrote: > Thanks for the info. > > I do understand that I should work with GCC 4.5.3 but this is a > generic question / issue for which I seek help. So please let me know > the workaround / fix if the same is applicable for GCC 4.5.3 version. Yes, it's applciable, but since you don't seem to have a good reason to use 4.5.0 you should *really* use 4.5.3 instead, or your developers will encounter a number of bugs that have already been fixed and they will get annoyed at you. > I actually move GMP / MPFR / MPC under gcc-4.5.0 folder: > > Created gmp / mpfr / mcp folders and copied / extracted respective tar > files. Doing this way I was able to successfully build GCC 4.5.0 > > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 > 1003>/x/home/prakash_prasad/shared_scripts/bin/gcc/gcc-4.5.0/configure > --prefix=/x/home/prakash_prasad/shared_scripts/bin/gcc/gcc-4.5.0 Why are you configuring with prefix set to the source directory? > --enable-shared --enable-threads=posix --enable-__cxa_atexit > --enable-clocale=gnu --enable-languages=c,c++ > > However I see the following binaries getting build - > > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1030> find . -name '*gcc' > -perm /u=x,g=x,o=x -type f -exec ls -l \{} \; > -rwxrwxr-x 1 prakash_prasad ppusers 705019 Feb 13 10:04 > ./host-x86_64-unknown-linux-gnu/gcc/xgcc > -rwxrwxr-x 1 prakash_prasad ppusers 513868 Feb 12 18:57 > ./host-x86_64-unknown-linux-gnu/stage1-gcc/xgcc > -rwxrwxr-x 1 prakash_prasad ppusers 300059 Feb 12 19:45 > ./host-x86_64-unknown-linux-gnu/prev-gcc/xgcc > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1031> > > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1031> find . -name 'g++' > -perm /u=x,g=x,o=x -type f -exec ls -l \{} \; > -rwxrwxr-x 1 prakash_prasad ppusers 712422 Feb 13 10:04 > ./host-x86_64-unknown-linux-gnu/gcc/g++ > -rwxrwxr-x 1 prakash_prasad ppusers 304198 Feb 12 19:45 > ./host-x86_64-unknown-linux-gnu/prev-gcc/g++ > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1032> That's expected if you haven't run "make install" yet. > Is gcc executable and xgcc are same? The binaries will be renamed when they are installed. You need to run "make install" for the compiler to be usable. > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1032> cat test.cpp > > #include <iostream> > #include <stdio.h> > > main() > { > printf("Test\n"); > std::cout<<"Test" << std::endl; > } > > And got the below output: > > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1148> > ./host-x86_64-unknown-linux-gnu/gcc/xgcc --version > xgcc (GCC) 4.5.0 > Copyright (C) 2010 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1036> > ./host-x86_64-unknown-linux-gnu/gcc/g++ --version > g++ (GCC) 4.5.0 > Copyright (C) 2010 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1149> > ./host-x86_64-unknown-linux-gnu/gcc/xgcc test.cpp > xgcc: error trying to exec 'cc1plus': execvp: No such file or directory > > Linux:>~/shared_scripts/bin/gcc/gcc-4.5.0 1035> > ./host-x86_64-unknown-linux-gnu/gcc/g++ test.cpp > g++: error trying to exec 'cc1plus': execvp: No such file or directory > > Kindly note that I using stage1 boxes where we do not have permissions > to install anything. I don't know what a stage1 box is, but you need to install the compiler with "make install" or it won't work without setting paths manually. > Will this issue will happen for version GCC 4.5.3 also? Yes. > What is the > fix for same and any workaround for same? You need to install gcc. You haven't finished the installation process, all you've done is build it. > What do I need to install > further, You need to install gcc, you haven't done that. You can install it to a staging area, then copy/move it to its final location, but you must install it to finish the build+installation process. To install to a staging area use e.g. make install DESTDIR=/path/to/staging/area