-
Notifications
You must be signed in to change notification settings - Fork 449
collect2.exe: error: ld returned 1 exit status #344
Comments
After make clean and re build, it works but Please help or hint, thanks a lot. |
There is no toolchain in riscv-tools. I'm assuming that you are building riscv-gnu-toolchain instread. If you don't have gdb at the end, then the build failed. This may not be obvious if you are doing a parallel make build. If you run make again, you will see it doing work if the build failed, as it will try to rebuild the part that failed. We do our windows builds on Ubuntu using cross compilers. Building on windows should work but is not well tested or supported. This problem looks like There is another discussion of the problem here This is really a gdb problem not a riscv-gnu-toolchain problem. You might want to discuss it upstream with the FSF GDB maintainers. If there is a fix upstream, we can backport it to riscv-gnu-toolchain. |
Yes, after run with $make not make -j4, there are errors related to gdb on my MSYS2. C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.3.0/../../../../i686-w64-mingw32/bin/ld.exe: C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.3.0/../../../../lib/libncursesw.a(lib_termcap.o):(.bss+0x4): multiple definition of I verified this with another run on ubuntu 18.04, the gdb was generated successfully so I guess it is specific in MSYS2 and maybe there are some workaround need to be took. Could you please give me any hint? Thanks a lot. |
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.3.0/../../../../i686-w64-mingw32/bin/ld.exe: ../gnulib/import/libgnu.a(getrandom.o): in function
getrandom': C:/msys64/home/nicol/riscv-gnu-toolchain/riscv-gdb/gnulib/import/getrandom.c:129: undefined reference to
BCryptGenRandom@16'collect2.exe: error: ld returned 1 exit status
make[3]: *** [Makefile:1866: gdb.exe] Error 1
make[3]: Leaving directory '/home/nicol/riscv-gnu-toolchain/build-gdb-newlib/gdb'
make[2]: *** [Makefile:10078: all-gdb] Error 2
make[2]: Leaving directory '/home/nicol/riscv-gnu-toolchain/build-gdb-newlib'
make[1]: *** [Makefile:866: all] Error 2
make[1]: Leaving directory '/home/nicol/riscv-gnu-toolchain/build-gdb-newlib'
make: *** [Makefile:499: stamps/build-gdb-newlib] Error 2
nicol@LAPTOP-M1F3S9SG MINGW32 ~/riscv-gnu-toolchain
I already added the following according to the previous issues discussion, but it still happened.
readline/readline/terminal.c to add "#define NEED_EXTERN_PC"
The text was updated successfully, but these errors were encountered: