Help installing gfortran
Jonathan Wakely
jwakely.gcc@gmail.com
Mon Jun 18 07:43:00 GMT 2012
On 18 June 2012 06:38, Ahsan Ali <ahsan.shah@email.com> wrote:
> Dear All,
>
> I have been struggling with the installtion of gfortran, Now I am trying to
> follow the instructions on the link http://gcc.gnu.org/wiki/InstallingGCC
>
>
> tar xzf gcc-4.6.2.tar.gz
> cd gcc-4.6.2
> ./contrib/download_prerequisites
> cd ..
> mkdir objdir
> cd objdir
> $PWD/../gcc-4.6.2/configure --prefix=/opt/gcc-4.6.2
> make
> make instal
>
>
> But I am not able to start configure.
>
> It shows as follows:
>
> [root@pmd03 gcc-4.7.0]# cd ..
> [root@pmd03 ~]# mkdir objdir
> [root@pmd03 ~]# cd objdir/
> [root@pmd03 objdir]# $PWD/ ../gcc-4.7.0/configure
> -bash: /root/objdir/: is a directory
There's a space in the command that shouldn't be there.
> and if I give
> [root@pmd03 objdir]# ../gcc-4.7.0/configure --prefix=/usr/local/
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... x86_64-unknown-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether ln works... yes
> checking whether ln -s works... yes
> checking for a sed that does not truncate output... /bin/sed
> checking for gawk... gawk
> configure: error: building out of tree but ../gcc-4.7.0 contains
> host-x86_64-unknown-linux-gnu.
> Use a pristine source tree when building in a separate tree
It's telling you you've already run configure in the source directory.
Delete the source directory and start again.
More information about the Gcc-help
mailing list