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

linux下交叉编译licensecc

本文章只做个人笔记用

下载地址:

#https://github.com/open-license-manager/licensecc.git
#下面地址下不下来就是用第一个去官网下载git clone --recursive https://github.com/open-license-manager/licensecc.git

编译前准备3个库:openssl,lcc-license-generator ,zlib-1.3.1

这个库需要用到openssl的版本是1.0.0以上,因为版本太低里面的函数没有。编译这个库之前需要编译boost,之前写过编译boots。下载lcc-license-generator

https://github.com/open-license-manager/lcc-license-generator.git

1.默认openssl zlib库编译没问题。开始编译lcc-license-generator:指定安装路径;制定boost路径,指定交叉编译器路径

cd lcc-license-generator-develop/build
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_TOOLCHAIN_FILE=/home/t113_tq.cmake -DBOOST_ROOT=/home/boost_1_78_0
make
make install

 编译结果如下,至此lcc-license-generator编译完成。

axx@axx:/home/code/axx/project_5g_unit/conference/thirdpart/lcc-license-generator-develop/build$ cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_TOOLCHAIN_FILE=/home/code/axx/project_5g_unit/conference/thirdpart/t113_tq.cmake -DBOOST_ROOT=/home/code/axx/project_5g_unit/conference/thirdpart/boost_1_78_0
-- Found openssl version 1.1.1 - generator
CMake Warning at /opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):New Boost version may have incorrect or missing dependencies and importedtargets
Call Stack (most recent call first):/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)CMakeLists.txt:102 (find_package)CMake Warning at /opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):New Boost version may have incorrect or missing dependencies and importedtargets
Call Stack (most recent call first):/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)CMakeLists.txt:102 (find_package)CMake Warning at /opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):New Boost version may have incorrect or missing dependencies and importedtargets
Call Stack (most recent call first):/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)CMakeLists.txt:102 (find_package)CMake Warning at /opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):New Boost version may have incorrect or missing dependencies and importedtargets
Call Stack (most recent call first):/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)CMakeLists.txt:102 (find_package)CMake Warning at /opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):New Boost version may have incorrect or missing dependencies and importedtargets
Call Stack (most recent call first):/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)/opt/cmake-3.18.0/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)CMakeLists.txt:102 (find_package)-- CXX compiler              : /usr/bin/c++
-- CXX compiler flags        : 
-- CXX compiler flags debug  : -g
-- CXX compiler flags release: -O3 -DNDEBUG
-- Install prefix            : /home/code/lixd/project_5g_unit/conference/thirdpart/lcc-license-generator-develop/install
-- External libs             : -lpthread
-- Exporting current build directory
CMake Warning at src/license_generator/CMakeLists.txt:36 (export):Cannot create package registry file:/home/swan/.cmake/packages/lccgen/0a279ca82ac3ae27827040e8592103adNo such file or directory-- Configuring done
-- Generating done
-- Build files have been written to: /home/code/axx/project_5g_unit/conference/thirdpart/lcc-license-generator-develop/build

 2.编译licensecc

cd licensecc
rm -rf ./build
mkdir build
cd buildMyDIR="/home/code/axx/lib"echo "Enter a number between 1 and 2 to select Compilation toolchain"
echo " 1 :gcc "
case $num in1) echo "You entered 1"  cmake \.. \-DCMAKE_TOOLCHAIN_FILE=../t113_tq.cmake \-DCMAKE_INSTALL_PREFIX=$MyDIR/build_t113 \-DBOOST_ROOT=/home/code/axx/project_5g_unit/conference/thirdpart/boost_1_78_0 \;; *)echo "Invalid number";;
esac 
make 
make install

 在使用 CMake 配置 Licensecc 时,可以通过 -DLCC_PROJECT_NAME=<YourProjectName> 指定你的项目名称。这将创建一个以项目名称命名的文件夹,在 licensecc/projects/ 目录下,并包含项目的私钥和公钥

 

 t113_tq.cmake 内容如下:

set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED True)
SET (CMAKE_SYSTEM_NAME Linux)
SET (CMAKE_SYSTEM_PROCESSOR arm)
SET (CMAKE_SYSTEM_VERSION 1)  
SET (CMAKE_C_FLAGS "-I/home/sdk/t113_tq/TQT113_linux_V2.0/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/include")
SET (CMAKE_C_COMPILER /home/sdk/t113_tq/TQT113_linux_V2.0/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc)
SET (CMAKE_CXX_COMPILER /home/sdk/t113_tq/TQT113_linux_V2.0/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-g++)
SET (CMAKE_FIND_ROOT_PATH /home/sdk/t113_tq/TQT113_linux_V2.0/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi)
SET (STAGING_DIR /home/sdk/t113_tq/TQT113_linux_V2.0/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/bin)SET (OPENSSL_ROOT_DIR /home/code/axx/project_5g_unit/conference/lib/build_t113)
SET (OPENSSL_CRYPTO_LIBRARY /home/code/axx/project_5g_unit/conference/lib/build_t113/lib)
SET (OPENSSL_INCLUDE_DIR /home/code/axx/project_5g_unit/conference/lib/build_t113/include)
SET (OPENSSL_SSL_LIBRARY /home/code/axx/project_5g_unit/conference/lib/build_t113/lib)#using for licensecc
include_directories(/home/sdk/t113_tq/TQT113_linux_V2.0/out/t113/evb1_auto/buildroot/buildroot/host/arm-buildroot-linux-gnueabi/sysroot/usr/include)
SET (ZLIB_LIBRARY /home/code/axx/project_5g_unit/conference/lib/build_t113/lib)
SET (ZLIB_INCLUDE_DIR /home/code/axx/project_5g_unit/conference/lib/build_t113/include)SET (lccgen_DIR /home/code/axx/project_5g_unit/conference/thirdpart/lcc-license-generator-develop/build)
SET (Boost_INCLUDE_DIR /home/code/axx/project_5g_unit/conference/thirdpart/boost_1_78_0/install/include)
SET (Boost_LIBRARY /home/code/axx/project_5g_unit/conference/thirdpart/boost_1_78_0/install/lib)#using for licensecc

执行2的编译脚本即可完成编译。

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • HarmonyOS开发商城首页实现二
  • 嘉兴网站建设的思路
  • 【JDK】JDK环境配置踩坑记录Mac
  • CAD-文字、图块、多行文字,沿多段线对齐到多段线的顶点,沿直线进行均分,都可以操作
  • Python 编程实例
  • 计算机技术基础 (bat 批处理)Note6
  • 3096. 得到更多分数的最少关卡数目
  • 【leetcode详解】直角三角形:用空间换时间(O(m*n*(m+n))>O(m*n))(思路详解)
  • 使用Python做一个微信机器人
  • android 音频播放器,(二)SoundPool简介
  • 面试经典 222. 完全二叉树的节点个数
  • 身份证OCR识别接口如何对接?(二)
  • 《Linux运维总结:基于Ubuntu 22.04+x86_64架构CPU部署etcd 3.5.15二进制分布式集群》
  • 样式与特效(2)——新闻列表
  • java之方法引用 —— ::
  • [ JavaScript ] 数据结构与算法 —— 链表
  • 【跃迁之路】【733天】程序员高效学习方法论探索系列(实验阶段490-2019.2.23)...
  • 8年软件测试工程师感悟——写给还在迷茫中的朋友
  • co模块的前端实现
  • Java 内存分配及垃圾回收机制初探
  • laravel5.5 视图共享数据
  • react 代码优化(一) ——事件处理
  • REST架构的思考
  • Spring核心 Bean的高级装配
  • 从零开始学习部署
  • 记录:CentOS7.2配置LNMP环境记录
  • 看图轻松理解数据结构与算法系列(基于数组的栈)
  • 使用docker-compose进行多节点部署
  • 适配iPhoneX、iPhoneXs、iPhoneXs Max、iPhoneXr 屏幕尺寸及安全区域
  • 小程序开发之路(一)
  • 追踪解析 FutureTask 源码
  • AI算硅基生命吗,为什么?
  • 阿里云API、SDK和CLI应用实践方案
  • ​创新驱动,边缘计算领袖:亚马逊云科技海外服务器服务再进化
  • ​人工智能书单(数学基础篇)
  • # 详解 JS 中的事件循环、宏/微任务、Primise对象、定时器函数,以及其在工作中的应用和注意事项
  • #70结构体案例1(导师,学生,成绩)
  • #Ubuntu(修改root信息)
  • (01)ORB-SLAM2源码无死角解析-(66) BA优化(g2o)→闭环线程:Optimizer::GlobalBundleAdjustemnt→全局优化
  • (Java岗)秋招打卡!一本学历拿下美团、阿里、快手、米哈游offer
  • (免费领源码)python+django+mysql线上兼职平台系统83320-计算机毕业设计项目选题推荐
  • (十二)python网络爬虫(理论+实战)——实战:使用BeautfulSoup解析baidu热搜新闻数据
  • (循环依赖问题)学习spring的第九天
  • (原创)Stanford Machine Learning (by Andrew NG) --- (week 9) Anomaly DetectionRecommender Systems...
  • (原創) 博客園正式支援VHDL語法著色功能 (SOC) (VHDL)
  • *算法训练(leetcode)第四十七天 | 并查集理论基础、107. 寻找存在的路径
  • ..回顾17,展望18
  • .net 7和core版 SignalR
  • .NET CLR Hosting 简介
  • .net core 源码_ASP.NET Core之Identity源码学习
  • .NET Standard / dotnet-core / net472 —— .NET 究竟应该如何大小写?
  • .net 中viewstate的原理和使用
  • .net2005怎么读string形的xml,不是xml文件。
  • .NetCore 如何动态路由
  • .Net程序帮助文档制作