If your SOPC system includes VIC (vectored interrupt controller), nios2-bsp command ( Nios® II EDS 10.0SP1 ) will not work. The build will always end with the above error.
The root cause of this error is that nios2-bsp wrongly generates the altera_vic_0_vector_tbl.c file to VIC IP directory instead of software project directory.
In order to avoid this error, specify the absolute path as the bsp path. For example if the original command line is "nios2-bsp hal software/cyclone_bsp sopc_top.sopcinfo", change it to "nios2-bsp hal <FPGA project folder>/software/cyclone_bsp sopc_top.sopcinfo".