# Installation of GCC 4.2.4 on FreeBSD 10.2



## erdem (Nov 19, 2015)

I want to install GCC 4.2.4 and found the source code of it from this mirror and tried to install using this documentation. However, it gave me the following error when I run `make` command. 


```
srcdir="/home/samet/gcc/objdir/../gcc-4.2.4/fixincludes" /bin/sh /home/samet/gcc/objdir/../gcc-4.2.4/fixincludes/mkfixinc.sh i386-unknown-freebsd10.2
sed -e 's/@gcc_version@//' <  > mkheadersT
Syntax error: redirection unexpected (expecting word)
*** Error code 2
Stop.
make[3]: stopped in /usr/home/samet/gcc/objdir/build-i386-unknown-freebsd10.2/fixincludes
*** Error code 1
```

I need this old version because there is a huge code written with this version and new version (I tried 4.4-5-6) because problem that I couldn't solve. The problem with the code is probably because of GCC because the program was working on FreeBSD 9.0. (I'm 99% sure problem is GCC)

How can I solve the problem? 
Thanks in advance,


----------



## wblock@ (Nov 20, 2015)

Could be just that it needs to be run in a sh(1) or with devel/gmake.  What is the program you are trying to compile?


----------



## erdem (Nov 20, 2015)

The program is not an online program, it is written by some of the old students of my prof.

When I run `gmake`


```
redefinition of 'extern inline ' function `'exact log2' is not supported in C99 mode, recipe for
target toplev.o failed
```


----------

