pulp-platform / ara

The PULP Ara is a 64-bit Vector Unit, compatible with the RISC-V Vector Extension Version 1.0, working as a coprocessor to CORE-V's CVA6 core
Other
365 stars 129 forks source link

'string.h' file not found when make bin/hello_world #363

Open hypertseng opened 1 week ago

hypertseng commented 1 week ago
(base) root@88d591aaa016:/data1/zzx/ara/apps# make bin/hello_world
cd hello_world && if [ -d script ]; then python3 script/gen_data.py  > data.S ; else touch data.S; fi
/data1/zzx/ara/install/riscv-llvm/bin/clang -march=rv64gcv_zfh_zvfh0p1 -menable-experimental-extensions -mabi=lp64d -mno-relax -fuse-ld=lld -fno-vectorize -mllvm -scalable-vectorization=off -mllvm -riscv-v-vector-bits-min=0 -Xclang -target-feature -Xclang +no-optimized-zero-stride-load -mcmodel=medany -I/data1/zzx/ara/apps/common -std=gnu99 -O3 -ffast-math -fno-common -fno-builtin-printf  -DNR_LANES=4 -DVLEN=4096 -Wunused-variable -Wall -Wextra -Wno-unused-command-line-argument  -ffunction-sections -fdata-sections -c hello_world/data.S -o hello_world/data.S.o
chmod +x /data1/zzx/ara/apps/common/script/align_sections.sh
rm -f /data1/zzx/ara/apps/common/link.ld && cp /data1/zzx/ara/apps/common/arch.link.ld /data1/zzx/ara/apps/common/link.ld
/data1/zzx/ara/apps/common/script/align_sections.sh 4 /data1/zzx/ara/apps/common/link.ld
/data1/zzx/ara/install/riscv-llvm/bin/clang -march=rv64gcv_zfh_zvfh0p1 -menable-experimental-extensions -mabi=lp64d -mno-relax -fuse-ld=lld -fno-vectorize -mllvm -scalable-vectorization=off -mllvm -riscv-v-vector-bits-min=0 -Xclang -target-feature -Xclang +no-optimized-zero-stride-load -mcmodel=medany -I/data1/zzx/ara/apps/common -std=gnu99 -O3 -ffast-math -fno-common -fno-builtin-printf  -DNR_LANES=4 -DVLEN=4096 -Wunused-variable -Wall -Wextra -Wno-unused-command-line-argument  -ffunction-sections -fdata-sections -c hello_world/main.c -o hello_world/main.c.o
hello_world/main.c:20:10: fatal error: 'string.h' file not found
#include <string.h>
         ^~~~~~~~~~
1 error generated.
make: *** [/data1/zzx/ara/apps/common/runtime.mk:132: hello_world/main.c.o] Error 1
hypertseng commented 1 week ago

After I re-build toolchain-llvm-newlib, /data1/zzx/ara/install/riscv-llvm/riscv64-unknown-elf appears, it indicates that the make process is not going as expected(toolchain-llvm-main=>toolchain-llvm-newlib=>toolchain-llvm-rt). So I add the include path manually with export C_INCLUDE_PATH=/data1/zzx/ara/install/riscv-llvm/riscv64-unknown-elf/include, then this problem is solved, but a new problem arises as follows:

image

I re-build toolchain-llvm-rt, but works nothing.