luokuipeng@luokuipeng-virtual-machine:~/AliOS-Things$ aos make helloworld@linuxhost -c config && aos make aos-cube version: 0.3.11 Creating .defconfig ... Creating .config ...
Checking config output: .config ... aos-cube version: 0.3.11
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) | ~~~~~ | | | 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)); | ^ 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"~ | | | 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, | ^^ 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)); | ^
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
在您尝试使用aos make helloworld@linuxhost -c config
命令时,看起来您正尝试为helloworld
示例在linuxhost
平台上配置编译选项。根据提供的知识库资料,这里是如何操作的详细指南:
问题描述: 您希望在AliOS Things环境中为helloworld
示例项目配置linuxhost
平台的编译设置。
解决方案步骤:
确认工作环境:确保当前目录位于已通过aos init
初始化的工作区中,并且您的环境已经正确设置了AliOS Things开发工具链。
执行配置命令:您已经尝试使用的命令aos make helloworld@linuxhost -c config
是正确的途径来为特定solution(这里是helloworld
)和目标board(这里是linuxhost
)生成配置文件。此命令会在当前目录下生成或更新.config
文件,其中包含了编译该solution所需的配置信息。
检查配置结果:执行上述命令后,如果没有错误信息,说明配置成功。您可以查看生成的.config
文件来确认配置细节,如果需要手动调整某些配置项,可直接编辑这个文件。
注意事项:
helloworld
示例支持linuxhost
平台。虽然大多数示例适用于多种硬件平台,但特定示例可能有平台限制。aos install
命令正确安装,特别是对于特定平台的依赖。验证与测试:
aos make
来编译项目。如果一切配置无误,编译应能顺利进行。进一步支持: 如果在配置或编译过程中遇到任何错误或警告,首先查阅.config
文件以确认配置是否符合预期,其次检查终端输出的错误信息,这通常会提供解决问题的线索。如需更进一步的帮助,可以收集详细的错误日志并寻求社区或技术支持。
请按照上述步骤操作,如果在任一环节遇到困难,及时检查相关文档或提交具体问题以便获得针对性的协助。