Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reent.h: No such file or directory #16

Open
lhmax2010 opened this issue Sep 12, 2023 · 2 comments
Open

reent.h: No such file or directory #16

lhmax2010 opened this issue Sep 12, 2023 · 2 comments

Comments

@lhmax2010
Copy link

我们依照这个方法在LicheePi4A的板子上面进行编译的

apt install git make cmake binutils-riscv64-unknown-elf gcc-riscv64-unknown-elf picolibc-riscv64-unknown-elf
git clone https://github.com/sipeed/RV-Debugger-BL702
git submodule update --init
cd RV-Debugger-BL702/firmware/bl_mcu_sdk
echo "add_compile_options(-specs=picolibc.specs)" >> tools/cmake/compiler_flags.cmake
echo "add_link_options(-specs=picolibc.specs)" >> tools/cmake/compiler_flags.cmake
make

结果报错了
[ 97%] Building C object samples/usb2uartjtag/CMakeFiles/usb2uartjtag_bl702.elf.dir/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/bsp/bsp_common/platform/syscalls.c.obj
/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/bsp/bsp_common/platform/syscalls.c:1:10: fatal error: reent.h: No such file or directory
1 | #include <reent.h>
| ^~~~~~~~~
compilation terminated.
make[3]: *** [samples/usb2uartjtag/CMakeFiles/usb2uartjtag_bl702.elf.dir/build.make:174: samples/usb2uartjtag/CMakeFiles/usb2uartjtag_bl702.elf.dir/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/bsp/bsp_common/platform/syscalls.c.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/build'
make[2]: *** [CMakeFiles/Makefile2:153: samples/usb2uartjtag/CMakeFiles/usb2uartjtag_bl702.elf.dir/all] Error 2
make[2]: Leaving directory '/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/build'
make[1]: *** [Makefile:91: all] Error 2
make[1]: Leaving directory '/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/build'
make: *** [Makefile:52: build] Error 2

能看下是什么原因么?

@lhmax2010
Copy link
Author

After remove the
echo "add_compile_options(-specs=picolibc.specs)" >> tools/cmake/compiler_flags.cmake
echo "add_link_options(-specs=picolibc.specs)" >> tools/cmake/compiler_flags.cmake
And then we move to compile with the latest riscv64 toolchain, it compile success.
But we met the new issue with link

/home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-malloc.o): ABI is incompatible with that of the selected emulation:
target emulation elf64-littleriscv' does not match elf32-littleriscv'
/home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-malloc.o)
/home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-memcpy-asm.o): ABI is incompatible with that of the selected emulation:
target emulation elf64-littleriscv' does not match elf32-littleriscv'
/home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-memcpy-asm.o)
/home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-memset.o): ABI is incompatible with that of the selected emulation:
target emulation elf64-littleriscv' does not match elf32-littleriscv'

It seemed that the project has something conflict with the 64bits riscv toolchain.

@Bestoa
Copy link

Bestoa commented Sep 27, 2024

换编译器,装的版本不能用,下个FreedomStudio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants