求助,Tina-sdk编译不通过
-
在ubuntu16.04 虚拟机中执行 :
source build/envsetup.sh lunch make
编译报错:
drivers/input/init-input.c: In function 'input_set_power_enable': drivers/input/init-input.c:750:4: error: implicit declaration of function '__gpio_set_value'; did you mean 'gpio_set_value'? [-Werror=implicit-function-declaration] __gpio_set_value(power_io, 1); ^~~~~~~~~~~~~~~~ gpio_set_value cc1: some warnings being treated as errors scripts/Makefile.build:286: recipe for target 'drivers/input/init-input.o' failed make[7]: *** [drivers/input/init-input.o] Error 1 scripts/Makefile.build:556: recipe for target 'drivers/input' failed make[6]: *** [drivers/input] Error 2 Makefile:1810: recipe for target 'drivers' failed make[5]: *** [drivers] Error 2 make[5]: Leaving directory '/home/zyj/riscv/tina-D1-H/lichee/linux-5.4' Makefile:28: recipe for target '/home/zyj/riscv/tina-D1-H/out/d1-h-nezha/compile_dir/target/linux-d1-h-nezha/linux-5.4.61/.modules' failed make[4]: *** [/home/zyj/riscv/tina-D1-H/out/d1-h-nezha/compile_dir/target/linux-d1-h-nezha/linux-5.4.61/.modules] Error 2 make[4]: Leaving directory '/home/zyj/riscv/tina-D1-H/target/allwinner/d1-h-nezha' Makefile:13: recipe for target 'compile' failed make[3]: *** [compile] Error 2 make[3]: Leaving directory '/home/zyj/riscv/tina-D1-H/target/allwinner' target/Makefile:21: recipe for target 'target/allwinner/compile' failed make[2]: *** [target/allwinner/compile] Error 2 make[2]: Leaving directory '/home/zyj/riscv/tina-D1-H' target/Makefile:16: recipe for target '/home/zyj/riscv/tina-D1-H/out/d1-h-nezha/staging_dir/target/stamp/.target_compile' failed make[1]: *** [/home/zyj/riscv/tina-D1-H/out/d1-h-nezha/staging_dir/target/stamp/.target_compile] Error 2 make[1]: Leaving directory '/home/zyj/riscv/tina-D1-H' /home/zyj/riscv/tina-D1-H/build/toplevel.mk:304: recipe for target 'world' failed make: *** [world] Error 2 #### make failed to build some targets (43:47 (mm:ss)) ####
-
-
@yuzukitsuru 在 求助,Tina-sdk编译不通过 中说:
gpio_set_value
改完 gpio_set_value 之后又有新的报错,而且这次提示要替换的方法看起来并不是同一个方法
make[5]: Entering directory '/home/zyj/riscv/tina-D1-H/lichee/linux-5.4' scripts/Makefile.asm-generic:25: redundant generic-y found in arch/riscv/include/asm/Kbuild: device.h CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh CC [M] drivers/input/init-input.o CC [M] drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.o drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c: In function 'hdmi_pin_configure': drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:431:11: error: implicit declaration of function 'pinctrl_lookup_state'; did you mean 'inc_node_state'? [-Werror=implicit-function-declaration] state = pinctrl_lookup_state(hdmi_drv->pctl, DDC_PIN_ACTIVE); ^~~~~~~~~~~~~~~~~~~~ inc_node_state drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:431:9: warning: assignment to 'struct pinctrl_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion] state = pinctrl_lookup_state(hdmi_drv->pctl, DDC_PIN_ACTIVE); ^ drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:437:9: error: implicit declaration of function 'pinctrl_select_state'; did you mean 'pinctrl_dev_get_name'? [-Werror=implicit-function-declaration] ret = pinctrl_select_state(hdmi_drv->pctl, state); ^~~~~~~~~~~~~~~~~~~~ pinctrl_dev_get_name drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:444:13: warning: assignment to 'struct pinctrl_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion] cec_state = pinctrl_lookup_state(hdmi_drv->pctl, CEC_PIN_ACTIVE); ^ drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c: In function 'hdmi_resume_pin_configure': drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:475:9: warning: assignment to 'struct pinctrl_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion] state = pinctrl_lookup_state(hdmi_drv->pctl, DDC_PIN_ACTIVE); ^ drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:489:14: warning: assignment to 'struct pinctrl_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion] cec_state = pinctrl_lookup_state(hdmi_drv->pctl, CEC_PIN_ACTIVE); ^ drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c: In function 'hdmi_pin_release': drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:518:9: warning: assignment to 'struct pinctrl_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion] state = pinctrl_lookup_state(hdmi_drv->pctl, DDC_PIN_SLEEP); ^ drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:531:9: warning: assignment to 'struct pinctrl_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion] state = pinctrl_lookup_state(hdmi_drv->pctl, CEC_PIN_SLEEP); ^ drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c: In function 'hdmi_suspend_pin_release': drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:559:9: warning: assignment to 'struct pinctrl_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion] state = pinctrl_lookup_state(hdmi_drv->pctl, DDC_PIN_SLEEP); ^ drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:573:10: warning: assignment to 'struct pinctrl_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion] state = pinctrl_lookup_state(hdmi_drv->pctl, CEC_PIN_SLEEP); ^ drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c: In function 'hdmi_dts_parse_pin_config': drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:1321:19: error: implicit declaration of function 'pinctrl_get'; did you mean 'of_pinctrl_get'? [-Werror=implicit-function-declaration] hdmi_drv->pctl = pinctrl_get(&pdev->dev); ^~~~~~~~~~~ of_pinctrl_get drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.c:1321:17: warning: assignment to 'struct pinctrl *' from 'int' makes pointer from integer without a cast [-Wint-conversion] hdmi_drv->pctl = pinctrl_get(&pdev->dev); ^ cc1: some warnings being treated as errors scripts/Makefile.build:286: recipe for target 'drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.o' failed make[10]: *** [drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_tx.o] Error 1 scripts/Makefile.build:556: recipe for target 'drivers/video/fbdev/sunxi/disp2/hdmi2' failed make[9]: *** [drivers/video/fbdev/sunxi/disp2/hdmi2] Error 2 scripts/Makefile.build:556: recipe for target 'drivers/video/fbdev/sunxi' failed make[8]: *** [drivers/video/fbdev/sunxi] Error 2 scripts/Makefile.build:556: recipe for target 'drivers/video/fbdev' failed make[7]: *** [drivers/video/fbdev] Error 2 scripts/Makefile.build:556: recipe for target 'drivers/video' failed make[6]: *** [drivers/video] Error 2 Makefile:1810: recipe for target 'drivers' failed make[5]: *** [drivers] Error 2 make[5]: Leaving directory '/home/zyj/riscv/tina-D1-H/lichee/linux-5.4' Makefile:28: recipe for target '/home/zyj/riscv/tina-D1-H/out/d1-h-nezha/compile_dir/target/linux-d1-h-nezha/linux-5.4.61/.modules' failed make[4]: *** [/home/zyj/riscv/tina-D1-H/out/d1-h-nezha/compile_dir/target/linux-d1-h-nezha/linux-5.4.61/.modules] Error 2 make[4]: Leaving directory '/home/zyj/riscv/tina-D1-H/target/allwinner/d1-h-nezha' Makefile:13: recipe for target 'compile' failed make[3]: *** [compile] Error 2 make[3]: Leaving directory '/home/zyj/riscv/tina-D1-H/target/allwinner' target/Makefile:21: recipe for target 'target/allwinner/compile' failed make[2]: *** [target/allwinner/compile] Error 2 make[2]: Leaving directory '/home/zyj/riscv/tina-D1-H' target/Makefile:16: recipe for target '/home/zyj/riscv/tina-D1-H/out/d1-h-nezha/staging_dir/target/stamp/.target_compile' failed make[1]: *** [/home/zyj/riscv/tina-D1-H/out/d1-h-nezha/staging_dir/target/stamp/.target_compile] Error 2 make[1]: Leaving directory '/home/zyj/riscv/tina-D1-H' /home/zyj/riscv/tina-D1-H/build/toplevel.mk:304: recipe for target 'world' failed make: *** [world] Error 2 [2]+ 已完成 $T/tools/build/buildserver --path $T 2> /dev/null 1>&2
-
重新尝试编译最小化的 d1-h_nezha_min-tina 后,报错
"recipe for target 'libnl-tiny.so' failed"riscv64-unknown-linux-gnu-gcc -Wall -c -o unl.o -Iinclude -Os -pipe -mcmodel=medany -mabi=lp64d -march=rv64gcxthead -g3 -fno-caller-saves -Wno-format-truncation -Wno-unused-result -Wformat -Werror=format-security -Wl,-z,now -Wl,-z,relro -fpic unl.c riscv64-unknown-linux-gnu-gcc -Os -pipe -mcmodel=medany -mabi=lp64d -march=rv64gcxthead -g3 -fno-caller-saves -Wno-format-truncation -Wno-unused-result -Wformat -Werror=format-security -Wl,-z,now -Wl,-z,relro -fpic -Wl,-Bsymbolic-functions -shared -o libnl-tiny.so nl.o handlers.o msg.o attr.o cache.o cache_mngt.o object.o socket.o error.o genl.o genl_family.o genl_ctrl.o genl_mngt.o unl.o /home/zyj/riscv/tina-D1-H/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin/../lib/gcc/riscv64-unknown-linux-gnu/8.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/zyj/riscv/tina-D1-H/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin/../libexec/gcc/riscv64-unknown-linux-gnu/8.1.0/liblto_plugin.so: error loading plugin: /home/zyj/riscv/tina-D1-H/prebuilt/gcc/linux-x86/riscv/toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/bin/../libexec/gcc/riscv64-unknown-linux-gnu/8.1.0/liblto_plugin.so: invalid ELF header collect2: error: ld returned 1 exit status Makefile:17: recipe for target 'libnl-tiny.so' failed make[4]: *** [libnl-tiny.so] Error 1 make[4]: Leaving directory '/home/zyj/riscv/tina-D1-H/out/d1-h-nezha_min/compile_dir/target/libnl-tiny-0.1' Makefile:55: recipe for target '/home/zyj/riscv/tina-D1-H/out/d1-h-nezha_min/compile_dir/target/libnl-tiny-0.1/.built' failed make[3]: *** [/home/zyj/riscv/tina-D1-H/out/d1-h-nezha_min/compile_dir/target/libnl-tiny-0.1/.built] Error 2 make[3]: Leaving directory '/home/zyj/riscv/tina-D1-H/package/libs/libnl-tiny' package/Makefile:192: recipe for target 'package/libs/libnl-tiny/compile' failed make[2]: *** [package/libs/libnl-tiny/compile] Error 2 make[2]: Leaving directory '/home/zyj/riscv/tina-D1-H' package/Makefile:189: recipe for target '/home/zyj/riscv/tina-D1-H/out/d1-h-nezha_min/staging_dir/target/stamp/.package_compile' failed make[1]: *** [/home/zyj/riscv/tina-D1-H/out/d1-h-nezha_min/staging_dir/target/stamp/.package_compile] Error 2
-
@zhayujie 兄弟,这种环境的问题还是放弃折腾吧,老老实实用虚拟机。我已经搭进去一周时间折腾了,因为我用的是ubuntu22.04真机,不想在win下面开发,所以先后试过docker 18.04 docker 16.04 ,确实也解决了一些问题,但是没法解决全部的问题,最接近的一次是编译都过了,打包又异常。后来没办法在win下面装了虚拟机,放弃了折腾,太耽误时间了
-
检查一下sdk是否完整
-
@yelong98 兄弟,我刚刚终于解决了,在mac上用的parallel 重新装了个ubuntu14.04就好了, 之前16.04的一直不成功。
-
@yuzukitsuru sdk是好的,换成ubuntu14.04后ok了
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号