开发者社区> 问答> 正文

Alios things在ubuntu中编译运行出错,如何解决?

luokuipeng@luokuipeng-virtual-machine:~/AliOS-Things$ aos make helloworld@linuxhost -c config && aos make aos-cube version: 0.3.11 Creating .defconfig ... Creating .config ...

configuration written to .config

Checking config output: .config ... aos-cube version: 0.3.11

Build Configuration:

App: helloworld Board: linuxhost

Creating out/config/autoconf.h ... Applying changes made to: out/config/autoconf.h app_version:app-1.0.0-20200218.023828 processing components: helloworld linuxhost *** All Components: helloworld linuxhost osal_aos mcu_linuximpl kernel_init rhino debug arch_linux netmgr ulog kv yloop vfs lib_rbtree *** Config Enabled: lib_rbtree Build AOS Now TOOLCHAIN_PATH= Compiling helloworld Compiling osal_aos Compiling mcu_linuximpl Compiling kernel_init Compiling rhino Compiling debug Compiling arch_linux Compiling netmgr platform/arch/linux/cpu_impl.c:101:14: error: static declaration of ‘gettid’ follows non-static declaration 101 | static pid_t gettid(void) | ^~~~~~ In file included from /usr/include/unistd.h:1170, from platform/arch/linux/cpu_impl.c:13: /usr/include/i386-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here 34 | extern __pid_t gettid (void) __THROW; | ^~~~~~ build/build_rules/aos_target_build.mk:232: recipe for target 'out/helloworld@linuxhost/modules/platform/arch/linux/cpu_impl.o' failed make[1]: *** [out/helloworld@linuxhost/modules/platform/arch/linux/cpu_impl.o] Error 1 make[1]: *** 正在等待未完成的任务.... network/netmgr/src/netmgr.c: In function ‘netmgr_connect’: network/netmgr/src/netmgr.c:56:37: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign] 56 | password == NULL || strlen(password) > MAX_PWD_SIZE) { | ^~~~~~~~ | | | const uint8_t * {aka const unsigned char *} In file included from network/netmgr/src/netmgr.c:6: /usr/include/string.h:384:35: note: expected ‘const char *’ but argument is of type ‘const uint8_t *’ {aka ‘const unsigned char *’} 384 | extern size_t strlen (const char *__s) | ~~~~^ network/netmgr/src/netmgr.c:61:42: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign] 61 | strncpy(config.pwd, password, strlen(password)); | ^~ | | | const uint8_t * {aka const unsigned char *} In file included from network/netmgr/src/netmgr.c:6: /usr/include/string.h:384:35: note: expected ‘const char *’ but argument is of type ‘const uint8_t *’ {aka ‘const unsigned char *’} 384 | extern size_t strlen (const char *__s) | ^ network/netmgr/src/netmgr.c:61:25: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign] 61 | strncpy(config.pwd, password, strlen(password)); | ^~ | | | const uint8_t * {aka const unsigned char *} In file included from /usr/include/features.h:446, from /usr/include/i386-linux-gnu/bits/libc-header-start.h:33, from /usr/include/stdlib.h:25, from network/netmgr/src/netmgr.c:5: /usr/include/i386-linux-gnu/bits/string_fortified.h:103:1: note: expected ‘const char * restrict’ but argument is of type ‘const uint8_t *’ {aka ‘const unsigned char *’} 103 | __NTH (strncpy (char *__restrict __dest, const char *__restrict __src, | ^ build/Makefile:390: recipe for target 'main_app' failed make: *** [main_app] Error 2 [AliOS-Things] ERROR: "/home/luokuipeng/AliOS-Things/build/cmd/linux64/make" returned error code 2. [AliOS-Things] ERROR: Command "/home/luokuipeng/AliOS-Things/build/cmd/linux64/make HOST_OS=Linux64 TOOLS_ROOT=/home/luokuipeng/AliOS-Things/build -e -f build/Makefile" in "/home/luokuipeng/AliOS-Things"

展开
收起
luokuipeng 2020-02-18 03:08:17 2694 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
AliOS Things 电源管理框架 立即下载
AliOS Things快速开发指南 立即下载
低代码开发师(初级)实战教程 立即下载