平头哥编译器找不到stdio.h
-
平头哥编译器找不到stdio.h
friday@f:~/tina-d1-h/linuxdriver/code/chrdev$ make make ARCH=riscv CROSS_COMPILE=/home/friday/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin/riscv64-unknown-linux-gnu- -C /home/friday/tina-d1-h/lichee/linux-5.4 M=/home/friday/tina-d1-h/linuxdriver/code/chrdev modules make[1]: 进入目录“/home/friday/tina-d1-h/lichee/linux-5.4” CC [M] /home/friday/tina-d1-h/linuxdriver/code/chrdev/chrdevApp.o /home/friday/tina-d1-h/linuxdriver/code/chrdev/chrdevApp.c:1:10: fatal error: stdio.h: No such file or directory #include "stdio.h" ^~~~~~~~~ compilation terminated. scripts/Makefile.build:286: recipe for target '/home/friday/tina-d1-h/linuxdriver/code/chrdev/chrdevApp.o' failed make[2]: *** [/home/friday/tina-d1-h/linuxdriver/code/chrdev/chrdevApp.o] Error 1 Makefile:1810: recipe for target '/home/friday/tina-d1-h/linuxdriver/code/chrdev' failed make[1]: *** [/home/friday/tina-d1-h/linuxdriver/code/chrdev] Error 2 make[1]: 离开目录“/home/friday/tina-d1-h/lichee/linux-5.4” Makefile:10: recipe for target 'kernel_modules' failed make: *** [kernel_modules] Error 2
-
没有添加 include 搜索路径 -I 指定下
-
@yuzukitsuru 添加了
make ARCH=riscv CROSS_COMPILE=/home/friday/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin/riscv64-unknown-linux-gnu- -I/home/friday/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/riscv64-unknown-linux-gnu/include/ -C /home/friday/tina-d1-h/lichee/linux-5.4 M=/home/friday/tina-d1-h/linuxdriver/code/chrdev modules make[1]: 进入目录“/home/friday/tina-d1-h/lichee/linux-5.4” CC [M] /home/friday/tina-d1-h/linuxdriver/code/chrdev/chrdevApp.o /home/friday/tina-d1-h/linuxdriver/code/chrdev/chrdevApp.c:1:10: fatal error: stdio.h: No such file or directory #include "stdio.h" ^~~~~~~~~ compilation terminated. scripts/Makefile.build:286: recipe for target '/home/friday/tina-d1-h/linuxdriver/code/chrdev/chrdevApp.o' failed make[2]: *** [/home/friday/tina-d1-h/linuxdriver/code/chrdev/chrdevApp.o] Error 1 Makefile:1810: recipe for target '/home/friday/tina-d1-h/linuxdriver/code/chrdev' failed make[1]: *** [/home/friday/tina-d1-h/linuxdriver/code/chrdev] Error 2 make[1]: 离开目录“/home/friday/tina-d1-h/lichee/linux-5.4” Makefile:10: recipe for target 'kernel_modules' failed make: *** [kernel_modules] Error 2
-
@yuzukitsuru 是不是我路径没指对啊,头秃
friday@f:~/tina-d1-h/linuxdriver/code/chrdev$ find ~/tina-d1-h -name "stdio.h" /home/friday/tina-d1-h/lichee/brandy-2.0/tools/toolchain/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/lib/gcc/arm-linux-gnueabi/7.2.1/include/ssp/stdio.h /home/friday/tina-d1-h/lichee/brandy-2.0/tools/toolchain/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/include/stdio.h /home/friday/tina-d1-h/lichee/brandy-2.0/tools/toolchain/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/include/bits/stdio.h /home/friday/tina-d1-h/lichee/brandy-2.0/tools/toolchain/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/include/c++/7.2.1/tr1/stdio.h /home/friday/tina-d1-h/lichee/brandy-2.0/tools/toolchain/riscv64-linux-x86_64-20200528/riscv64-unknown-linux-gnu/include/c++/8.1.0/tr1/stdio.h /home/friday/tina-d1-h/lichee/brandy-2.0/tools/toolchain/riscv64-linux-x86_64-20200528/sysroot/usr/include/stdio.h /home/friday/tina-d1-h/lichee/brandy-2.0/tools/toolchain/riscv64-linux-x86_64-20200528/sysroot/usr/include/bits/stdio.h /home/friday/tina-d1-h/lichee/brandy-2.0/u-boot-2018/include/stdio.h /home/friday/tina-d1-h/lichee/linux-5.4/tools/perf/include/bpf/stdio.h /home/friday/tina-d1-h/lichee/linux-5.4/arch/powerpc/boot/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/target/u-boot-2018.03/include/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/target/host/gettext-0.19.6/gettext-tools/libgettextpo/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/target/host/gettext-0.19.6/gettext-tools/gnulib-lib/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/target/host/gettext-0.19.6/gettext-runtime/gnulib-lib/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/host/findutils-4.6.0/gl/lib/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/host/patch-2.7.5/lib/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/host/u-boot-2018.03/include/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/host/m4-1.4.18/lib/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/host/tar-1.28/gnu/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/host/bison-3.4.1/lib/stdio.h /home/friday/tina-d1-h/out/d1-h-nezha/compile_dir/host/sed-4.2.2/lib/stdio.h /home/friday/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/riscv64-unknown-linux-gnu/include/stdio.h /home/friday/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/riscv64-unknown-linux-gnu/include/ssp/stdio.h /home/friday/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/riscv64-unknown-linux-gnu/include/sys/stdio.h /home/friday/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/riscv64-unknown-linux-gnu/include/c++/8.1.0/tr1/stdio.h /home/friday/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/sysroot/usr/include/stdio.h /home/friday/tina-d1-h/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/sysroot/usr/include/bits/stdio.h /home/friday/tina-d1-h/package/security/optee-os-dev-kit/dev_kit/arm-plat-sun8iw20p1/export-ta_arm32/include/stdio.h /home/friday/tina-d1-h/package/security/optee-os-dev-kit/dev_kit/arm-plat-sun50iw1p1/export-ta_arm32/include/stdio.h /home/friday/tina-d1-h/package/security/optee-os-dev-kit/dev_kit/arm-plat-sun50iw11p1/export-ta_arm32/include/stdio.h /home/friday/tina-d1-h/package/security/optee-os-dev-kit/dev_kit/arm-plat-sun8iw18p1/export-ta_arm32/include/stdio.h /home/friday/tina-d1-h/package/security/optee-os-dev-kit/dev_kit/arm-plat-sun8iw15p1/export-ta_arm32/include/stdio.h /home/friday/tina-d1-h/package/security/optee-os-dev-kit/dev_kit/arm-plat-sun50iw10p1/export-ta_arm32/include/stdio.h
-
@eddy_i 有可能
-
@yuzukitsuru 试了好多路径都不行
-
可以参考下加入package里用tina编译
-
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号