当前位置:   article > 正文

交叉编译amazon-kinesis-video-streams-webrtc-sdk-c

amazon-kinesis-video-streams-webrtc-sdk-c

一、平台信息

Ubuntu 18.04
君正T31
mips-linux-gnu-gcc gcc version 4.7.2,使用uclibc

二、获取SDK

git clone https://gitee.com/renpf08/amazon-kinesis-video-streams-webrtc-sdk-c.git
  • 1

三、交叉编译脚本

#!/bin/bash

# T31
mkdir -p build_t31
cd build_t31
export CC="mips-linux-uclibc-gnu-gcc -march=mips32r2 -std=gnu99" CXX=mips-linux-uclibc-gnu-g++ AR=mips-linux-uclibc-gnu-ar
cmake ..
make

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

运行脚本开始编译

四、遇到的问题

  • amazon-kinesis-video-streams/amazon-kinesis-video-streams-webrtc-sdk-c_2/open-source/libmbedtls/build/src/project_libmbedtls/programs/ssl/ssl_mail_client.c:664:9: error: implicit declaration of function 'gethostname' [-Werror=implicit-function-declaration] cc1: all warnings being treated as errors programs/ssl/CMakeFiles/ssl_mail_client.dir/build.make:62: recipe for target 'programs/ssl/CMakeFiles/ssl_mail_client.dir/ssl_mail_client.c.o' failed make[5]: *** [programs/ssl/CMakeFiles/ssl_mail_client.dir/ssl_mail_client.c.o] Error 1 CMakeFiles/Makefile2:2498: recipe for target 'programs/ssl/CMakeFiles/ssl_mail_client.dir/all' failed make[4]: *** [programs/ssl/CMakeFiles/ssl_mail_client.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make[3]: *** [all] Error 2 CMakeFiles/project_libmbedtls.dir/build.make:111: recipe for target 'build/src/project_libmbedtls-stamp/project_libmbedtls-build' failed make[2]: *** [build/src/project_libmbedtls-stamp/project_libmbedtls-build] Error 2 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/project_libmbedtls.dir/all' failed make[1]: *** [CMakeFiles/project_libmbedtls.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 CMake Error at CMake/Utilities.cmake:61 (message): CMake step for libmbedtls failed: 2 Call Stack (most recent call first): CMakeLists.txt:82 (build_dependency)

这是由于gethostname被弃用,会产生警告。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/612893
推荐阅读
相关标签
  

闽ICP备14008679号