我正试图将泽诺 协议移植到RIOT。我让它使用RIOT的本机仿真器,但是没有为一个委员会编译代码。
问题在于,当我使用CMAKE构建git时。当我使用用于linux的gcc和g++编译器编译它时,一切都很完美。
但是,当我使用arm-none-eabi-gcc,编译repos时,构建失败了。repo ZHe给出以下错误“致命错误: netinet/in.h:没有这样的文件或目录”.#包括上网/in.h>
repo Zenoh-C给出了以下错误:
-寻找pthread_create -找不到“.”找不到线程(丢失: Threads_FOUND)
Zenoh-C回购错误
-- Check for working C compiler: /bin/arm-none-eabi-gcc
-- Check for working C compiler: /bin/arm-none-eabi-gcc -- works
.....
-- Check for working CXX compiler: /bin/arm-none-eabi-g++
-- Check for working CXX compiler: /bin/arm-none-eabi-g++ -- works
...
-- Configuring on/for Generic
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - no
...
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.13/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:70 (find_package)
-- Configuring incomplete, errors occurred!
**//ZHe Repo Error**
/home/brenton/Downloads/zhe-master/example/platform/platform-udp.h:4:10: fatal error: netinet/in.h: No such file or directory
#include netinet/in.h>
compilation terminated.发布于 2019-07-26 18:24:42
免责声明:我是新来的防暴操作系统。
arm-none-eabi工具链应该是目标裸金属环境.
这意味着您的目标环境可能没有线程库,也没有与TCP/IP相关的头文件。您试图移植的软件的构建过程可能假定存在p线程库,并且所需的头文件位于标准位置(从Linux的角度来看)。
看来您很幸运,RIOT有一个p线程库,并在sys/posix目录中列出了sys/posix头文件。
这可能意味着您将需要修改Zenoh包的CMakeLists.txt,以便包含和库目录将指向riod-OSlibp线程.a库和OS包含目录。
https://stackoverflow.com/questions/57219916
复制相似问题