当前位置: 首页 > news >正文

君正交叉编译链工具mips-gcc540-glibc222-64bit-r3.3.0.smaller.bz2编译st-device-sdk-c

git clone https://github.com/SmartThingsCommunity/st-device-sdk-c.gitcd st-device-sdk-cgit submodule update --init --recursive#下载补丁包,下载地址https://github.ecodesamsung.com/SolutionsEngineering/TechSupport_Shawyar/blob/main/patch#把下载的三个补丁文件放到st-device-sdk-c目录下,然后执行下面的三条语句patch -p1 < 0001-PATCH-Requirement-change-to-apply-for-AV-SDK.patch
patch -p1 < 0002-Get-libiotcore.so-as-the-build-output.patch
patch -p1 < 0003-PATCH-cameraSDK-based-on-Raspberry.patch

#cd st-device-sdk-c

#执行 cmake -B build

-- The C compiler identification is GNU 5.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/mips-gcc540-glibc222-64bit-r3.3.0.smaller/bin/mips-linux-gnu-gcc - skipped //此处会显示所用的编译器
-- Detecting C compile features
-- Detecting C compile features - done
include default stdk_config
Enter component.cmake
-- Looking for deps/json/cJSON/cJSON.h



如果遇到错误:cmake的版本过低,使用以下命令:
cmake -B build -DCMAKE_POLICY_VERSION_MINIMUM=3.5

#cd build
#make
遇到这样的错误:[ 78%] Building C object src/CMakeFiles/iotcore.dir/iot_api.c.o
[ 78%] Building C object src/CMakeFiles/iotcore.dir/iot_capability.c.o
[ 79%] Building C object src/CMakeFiles/iotcore.dir/iot_wt.c.o
[ 79%] Building C object src/CMakeFiles/iotcore.dir/iot_main.c.o
[ 79%] Building C object src/CMakeFiles/iotcore.dir/iot_nv_data.c.o
[ 80%] Building C object src/CMakeFiles/iotcore.dir/iot_util.c.o
[ 80%] Building C object src/CMakeFiles/iotcore.dir/iot_uuid.c.o
[ 81%] Building C object src/CMakeFiles/iotcore.dir/iot_root_ca.c.o
[ 81%] Building C object src/CMakeFiles/iotcore.dir/iot_log_file.c.o
[ 81%] Building C object src/CMakeFiles/iotcore.dir/iot_dump_log.c.o
[ 82%] Building C object src/CMakeFiles/iotcore.dir/port/bsp/raspberry/bluez/advertisement.c.o
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
from /usr/include/glib-2.0/glib/gtypes.h:32,
from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/glib-2.0/gobject/gbinding.h:28,
from /usr/include/glib-2.0/glib-object.h:22,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /opt/test/st-device-sdk-c/src/port/bsp/raspberry/bluez/advertisement.c:21:
/usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_ADD_U64':
/usr/include/glib-2.0/glib/gmacros.h:738:31: error: static assertion failed: "Expression evaluates to false"
#define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false")
^
/usr/include/glib-2.0/glib/gtypes.h:463:3: note: in expansion of macro 'G_STATIC_ASSERT'
G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
^
make[2]: *** [src/CMakeFiles/iotcore.dir/build.make:193: src/CMakeFiles/iotcore.dir/port/bsp/raspberry/bluez/advertisement.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:429: src/CMakeFiles/iotcore.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

解决办法:
sudo apt-get install gcc-multilib g++-multilib
sudo dpkg --add-architecture i386
sudo apt-get install libc6:i386
sudo apt-get install libglib2.0-0:i386 libglib2.0-dev:i386

#解决完以上问题后,使用以下步骤重新编译
export PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig:/usr/share/pkgconfig

删除build目录后,在项目根目录下重新执行


cmake -B build 或者 cmake -B build -DCMAKE_POLICY_VERSION_MINIMUM=3.5
cd build
make


文章转载自:

http://qWN4eTsN.tgxrm.cn
http://uAY9BKwN.tgxrm.cn
http://zvgc6v1p.tgxrm.cn
http://QoPmiWGg.tgxrm.cn
http://frZgLmB9.tgxrm.cn
http://WAWhBrCd.tgxrm.cn
http://rBWqjFso.tgxrm.cn
http://LJJYseNy.tgxrm.cn
http://cim2hIyQ.tgxrm.cn
http://YMuEL27N.tgxrm.cn
http://fpXjLtIC.tgxrm.cn
http://lAwhUqmj.tgxrm.cn
http://wVPizvpp.tgxrm.cn
http://8jCOuXNy.tgxrm.cn
http://1WONOAlz.tgxrm.cn
http://vu9gJx9Z.tgxrm.cn
http://vjZZrZG8.tgxrm.cn
http://9UA3JZAE.tgxrm.cn
http://Fh0Y5Y7W.tgxrm.cn
http://jyCb3IvW.tgxrm.cn
http://IdhWvcwl.tgxrm.cn
http://VjOqglh7.tgxrm.cn
http://iKyaxHvH.tgxrm.cn
http://LBgtEx1g.tgxrm.cn
http://k1jqOuNN.tgxrm.cn
http://9UYTkTSu.tgxrm.cn
http://LypCExQa.tgxrm.cn
http://gcQRz6pQ.tgxrm.cn
http://m03smBDL.tgxrm.cn
http://R0qEON8O.tgxrm.cn
http://www.dtcms.com/a/367251.html

相关文章:

  • Stylar AI: 基于AI的平面设计工具
  • echarts图库
  • 软考中级【网络工程师】第6版教材 第5章 网络互连(1)
  • 片上网络Noc原理
  • 支持向量机(SVM)学习报告
  • AI驱动开发实战:基于飞算JavaAI的在线考试系统设计与实现
  • Selenium 超时完全指南:pageLoadTimeout、implicitlyWait 和 scriptTimeout 的深度解析
  • 指针(4)
  • 20.36 QLoRA微调实测:59%显存暴降+3倍提速,95%性能保留惊呆业界!
  • 【数学建模学习笔记】机器学习分类:XGBoost分类
  • Mybatis入门、操作数据、配置xml映射、数据封装
  • STM32实践项目(激光炮台)
  • NotePad++下载安装与设置
  • 深入解析 UDT 协议:突破数据传输瓶颈的高性能解决方案
  • MySQL分区表实战:提升大表查询性能的有效方法
  • c# .net中using的使用
  • AI大模型企业落地指南-笔记05
  • InheritedWidget
  • 2025数学建模国赛高教社杯C题思路代码文章助攻
  • 超细整理,全链路性能测试-容量评估与规划,看这篇就够了...
  • Java ConcurrentModificationException 深度剖析开发调试日志
  • 从群体偏好到解构对齐:大模型强化学习从GRPO到DAPO的“认知”进化
  • https + 域名 + 客户端证书访问模式
  • Python中将方法转为属性式访问
  • Flutter之riverpod状态管理详解
  • 【计算机网络(自顶向下方法 第7版)】第一章 计算机网络概述
  • 从零开始的python学习——元组
  • 晨控CK-GW08S与汇川H5U系列PLC配置Ethernet/IP通讯连接手册
  • 别再跟风通用大模型了!企业自建专属 AI 大模型的「避坑指南 + 落地干货」
  • GitHub每日最火火火项目(9.4)