# Problem compiling FAST with gfortran on Windows

**URL:** <https://forums.nlr.gov/t/problem-compiling-fast-with-gfortran-on-windows/897>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [April 22, 2014, 5:49pm UTC](https://forums.nlr.gov/t/problem-compiling-fast-with-gfortran-on-windows/897 "2014-04-22T17:49:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon.Breton](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@Simon.Breton](https://forums.nlr.gov/u/Simon.Breton)\
**Post date:** [April 22, 2014, 5:49pm UTC](https://forums.nlr.gov/t/problem-compiling-fast-with-gfortran-on-windows/897/1 "2014-04-22T17:49:17Z")

</div>

Dear all,

I have been trying to compile FAST with gfortran on Windows 7 64-bit. I have been trying many different options.

I have tried with gfortran 4.6.3 and have obtained the same error as an earlier post, ([Compiling FAST under Windows 7 with gfortran](http://forums.nlr.gov/t/compiling-fast-under-windows-7-with-gfortran/658/1)), i.e.,

“C:\Users\simonphilippeb\Documents\FAST\Compiling\>make  
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng  
th-none -c ./NWTCsource/Source/NWTC\_IO.f90 -o Obj\_win32/NWTC\_IO.obj -J Obj\_win32  
./NWTCsource/Source/NWTC\_IO.f90: In function ‘checkargs’:  
./NWTCsource/Source/NWTC\_IO.f90:854:0: internal compiler error: in gfc\_get\_symbo  
l\_decl, at fortran/trans-decl.c:1444  
END SUBROUTINE ChkRealFmtStr ! ( RealFmt, TrapErrors )  
^  
libbacktrace could not find executable to open  
Please submit a full bug report,  
with preprocessed source if appropriate.  
See [http://gcc.gnu.org/bugs.html](http://gcc.gnu.org/bugs.html) for instructions.  
make: \*\*\* [NWTC\_IO.obj] Error 1”

The person on this earlier post solved his problem by using gfortran 4.6.1 instead. I have tried it but it did not work either. I have then obtained  
“C:\Users\name\Documents\ProgramFiles\gcc-4.6.1-tdm64-1-fortran\bin\>make  
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng  
th-none -c C:/Users/name/Documents/ProgramFiles/gcc-4.6.1-tdm64-1-fortran/Ot  
her/Source/SingPrec.f90 -o Obj\_win32/SingPrec.obj -J Obj\_win32  
make: \*\*\* [SingPrec.obj] Error 1”

I have also tried with several different versions of gfortran (from 4.6.2 to 4.8.1) by using mingw-builds-install (that allows to create different “mingw-builds” from which “make” can be called in the directory where the makefile is located), but I did not manage either.

When using make, I obtained:  
“gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng  
th-none -c ./NWTCsource/Source/NWTC\_IO.f90 -o Obj\_win32/NWTC\_IO.obj -J Obj\_win32  
./NWTCsource/Source/NWTC\_IO.f90: In function ‘checkargs’:  
./NWTCsource/Source/NWTC\_IO.f90:854:0: internal compiler error: in gfc\_get\_symbo  
l\_decl, at fortran/trans-decl.c:1444  
END SUBROUTINE ChkRealFmtStr ! ( RealFmt, TrapErrors )  
^  
libbacktrace could not find executable to open  
Please submit a full bug report,  
with preprocessed source if appropriate.  
See [http://gcc.gnu.org/bugs.html](http://gcc.gnu.org/bugs.html) for instructions.  
make: \*\*\* [NWTC\_IO.obj] Error 1”

while when using “mingw32-make” (following a suggestion from the earlier post), I obtained:

“gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng  
th-none -c ./NWTCsource/Source/SingPrec.f90 -o Obj\_win32/SingPrec.obj -J Obj\_win  
32  
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng  
th-none -c ./NWTCsource/Source/SysGnuWin.f90 -o Obj\_win32/SysGnuWin.obj -J Obj\_w  
in32  
gfortran -O2 -m32 -fbacktrace -finit-local-zero -fno-automatic -ffree-line-leng  
th-none -c ./NWTCsource/Source/NWTC\_IO.f90 -o Obj\_win32/NWTC\_IO.obj -J Obj\_win32  
./NWTCsource/Source/NWTC\_IO.f90: In function ‘checkargs’:  
./NWTCsource/Source/NWTC\_IO.f90:854:0: internal compiler error: in gfc\_get\_symbo  
l\_decl, at fortran/trans-decl.c:1444  
END SUBROUTINE ChkRealFmtStr ! ( RealFmt, TrapErrors )  
^  
libbacktrace could not find executable to open  
Please submit a full bug report,  
with preprocessed source if appropriate.  
See [http://gcc.gnu.org/bugs.html](http://gcc.gnu.org/bugs.html) for instructions.  
makefile:165: recipe for target ‘NWTC\_IO.obj’ failed  
mingw32-make: \*\*\* [NWTC\_IO.obj] Error 1”

Would somebody have an idea as to what the problem is?

I have included the files I have been using, in a zip folder, that could be tried for compilation to see if this works for another user.

Thanks very much in advance,

Simon  
[gfortranCompilation.zip](https://forums.nlr.gov/uploads/short-url/9PeG6F6GRw6SMbBviyHbHKZqnOu.zip) (2.93 MB)

---

<div class="post-metadata">

**Author:** ![Bonnie.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/bonnie.jonkman/32/3230_2.png) [@Bonnie.Jonkman](https://forums.nlr.gov/u/Bonnie.Jonkman)\
**Post date:** [April 23, 2014, 3:39pm UTC](https://forums.nlr.gov/t/problem-compiling-fast-with-gfortran-on-windows/897/2 "2014-04-23T15:39:02Z")

</div>

Hi Simon.

I have not experienced the issue you are having, but I did receive an email from someone several months ago, describing a similar problem. Here’s what he said:

> [@](#):
>
> In the NWTC Subroutine Library and the file NWTC\_IO.f90 the subroutine CheckArgs allocates the size of the Arg parameter based on the length of one of the Input parameters. This causes GFortran 4.8.1 to crash with “internal compiler error: in gfc\_get\_symbol\_decl, at fortran/trans-decl.c:1444”,  
> if you use the -finit-local-zero -fno-automatic flags. My workaround was to just allocate the size of the Arg parameter after it was declared.

I don’t think we have any strings longer than 1024 characters anywhere in the code, so instead of making it allocatable, you could also try to change this line in CheckArgs` CHARACTER(LEN(InputFile)) :: Arg ! A command-line argument.
`to ` CHARACTER(1024) :: Arg ! A command-line argument.
`

---

<div class="post-metadata">

**Author:** ![Simon.Breton](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@Simon.Breton](https://forums.nlr.gov/u/Simon.Breton)\
**Post date:** [May 1, 2014, 1:08pm UTC](https://forums.nlr.gov/t/problem-compiling-fast-with-gfortran-on-windows/897/3 "2014-05-01T13:08:04Z")

</div>

Dear Bonnie,  
Thank you very much for your help, this fixed my problem!  
Best regards,  
Simon
