Hello!
I had the same problem as above when tryed to build redboot, but when I added the "-G0" Option to fix the problen, another error occured:
make: Entering directory `/cygdrive/c/test_redboot/redboot4nios2_build/redboot/current'
nios2-elf-gcc -c -I/cygdrive/c/test_redboot/redboot4nios2_install/include -I/cygdrive/c/altera/kits/nios2_51/components/ecos/ecos-current/packages/redboot/current -I/cygdrive/c/altera/kits/nios2_51/components/ecos/ecos-current/packages/redboot/current/src -I/cygdrive/c/altera/kits/nios2_51/components/ecos/ecos-current/packages/redboot/current/tests -I. -finline-limit=7000 -G0 -g -O3 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mno-hw-mulx -mno-hw-div -o /cygdrive/c/test_redboot/redboot4nios2_install/lib/version.o /cygdrive/c/altera/kits/nios2_51/components/ecos/ecos-current/packages/redboot/current/src/version.c
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
nios2-elf-gcc -g -nostdlib -Wl,--gc-sections -Wl,-static -mhw-mul -mno-hw-mulx -mno-hw-div -L/cygdrive/c/test_redboot/redboot4nios2_install/lib -Ttarget.ld -o /cygdrive/c/test_redboot/redboot4nios2_install/bin/redboot.elf /cygdrive/c/test_redboot/redboot4nios2_install/lib/version.o
make: Leaving directory `/cygdrive/c/test_redboot/redboot4nios2_build/redboot/current'
/cygdrive/c/test_redboot/redboot4nios2_install/lib/extras.o(.text.altera_avalon_lan91c111_get_esa_wrapper+0x88): In function `altera_avalon_lan91c111_get_esa_wrapper':
make: Leaving directory `/cygdrive/c/test_redboot/redboot4nios2_build'
/cygdrive/c/test_redboot/redboot4nios2_install/include/cyg/sopc/altera_avalon_lan91c111.inl:137: undefined reference to `perror'
/cygdrive/c/test_redboot/redboot4nios2_install/lib/extras.o(.text.altera_avalon_lan91c111_get_esa_wrapper+0x94):/cygdrive/c/test_redboot/redboot4nios2_install/include/cyg/sopc/altera_avalon_lan91c111.inl:138: undefined reference to `perror'
/cygdrive/c/test_redboot/redboot4nios2_install/lib/extras.o(.text.altera_avalon_lan91c111_get_esa_wrapper+0xa0):/cygdrive/c/test_redboot/redboot4nios2_install/include/cyg/sopc/altera_avalon_lan91c111.inl:139: undefined reference to `perror'
collect2: ld returned 1 exit status
make: *** Error 1
make: *** Error 2
I do not understand following:
collect2: ld returned 1 exit status
Does anyone know what went wrong or what I did wrong?
Being very thankful for any help!
Note: I have installed NIOS2 5.1, SP1.