Open 2536786901 opened 3 years ago
Your riscv64-unknown-elf compiler is broken. Try building a hello world program with it, you will likely get the same error for missing crt0.o. Where did your riscv64 compiler come from? Did you install an OS package, download a tar file, or build it yourself? If you built it yourself, do you still have the build dir and build log? If so, you should look at the build log for errors. If you installed an OS package, what OS are you running and what package did you install? If you downloaded a tar file, where did you download it from?
thank you for your reply I use git clone --recursive https://github.com/riscv/riscv-gnu-toolchain to download on the ubuntu virtual machine. The test can use the riscv64-unknown-elf-gcc command to compile the hello.c file. What is the problem?
------------------ 原始邮件 ------------------ 发件人: "riscv/riscv-tools" @.>; 发送时间: 2021年6月10日(星期四) 晚上11:16 @.>; @.**@.>; 主题: Re: [riscv/riscv-tools] Quickstart failed (#343)
Your riscv64-unknown-elf compiler is broken. Try building a hello world program with it, you will likely get the same error for missing crt0.o. Where did your riscv64 compiler come from? Did you install an OS package, download a tar file, or build it yourself? If you built it yourself, do you still have the build dir and build log? If so, you should look at the build log for errors. If you installed an OS package, what OS are you running and what package did you install? If you downloaded a tar file, where did you download it from?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Something went wrong when building the compiler. The toolchain does an initial compiler build without libraries, a C library build, and then a full compiler build with libraries. It looks like your build failed during the C library build. So you have a compiler, but no C library, and no compiler libraries like libgcc or libstdc++. You need to look at your toolchain build log if you have it. If you still have the build dir, you can just run make again and see what happens. If the build succeeded make won't do anything. if the build did not succeed, then make will try to build the stuff that failed the first time. Pipe the make output to a file, and then look for an error in the make output.
configure:2455: error: in `/home/qiaoguanjie/riscv-tools/riscv-pk/build': configure:2457: error: C compiler cannot create executables what should I do?