The error is likely caused by having incompatible versions of cygwin installed on your computer.
To resolve the following error:
c:\altera\61\nios2eds\bin\nios2-gnutools\H-i686-pc-cygwin\bin\nios2-elf-gcc.exe (3796): *** proc magic mismatch detected - 0x3A24DB6A/0xD079E02.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
.
.
.
Run the following commands in the Nios® II command shell and you will get a list of all versions of cygwin installed on your computer.
[SOPC Builder]$ cygcheck -s -v -r > cygcheck.out
[SOPC Builder]$ grep cygwin1.dll cygcheck.out
You can then find all the copies of the cygwin installed on your machine and remove them from your computer.