首页 > 系统相关 >Ubuntu环境下SomeIP/CommonAPI环境搭建详细步骤

Ubuntu环境下SomeIP/CommonAPI环境搭建详细步骤

时间:2023-12-25 21:08:02浏览次数:49  
标签:sudo SomeIP CommonAPI xxx build install Ubuntu https


环境搭建

1.Boost安装

下载Boost源码 : https://www.boost.org/users/download/

编译安装

首先安装编译所需依赖

sudo apt-get install build-essential g++ 
sudo apt-get install installpython-dev autotools-dev 
sudo apt-get install installlibicu-dev build-essential 
sudo apt-get install libbz2-dev libboost-all-dev

进入到BOOST源码根目录

./bootstrap.sh -h

可以查看一些编译的选项,我们主要注意这三个

--with-libraries=list     build only a particular set of libraries,
                            describing using either a comma-separated list of
                            library names or "all"
                            [all]
  --with-toolset=TOOLSET    use specific TOOLSET to build B2 and as default
                            for building Boost
                            [automatically detected]

  --prefix=PREFIX           install Boost into the given PREFIX
                            [/usr/local]

执行

./bootstrap.sh --with-libraries=all --with-toolset=gcc --prefix=/home/xxx/xxx/xxx

执行完成会在当前目录下看到一个生成的可执行文件:b2,这个可执行程序是用来编译Boost的,也有一些配置选项

./b2 --help

主要注意选择编译静/动态库这一项,一般选择是动态库

link=static|shared      Whether to build static or shared libraries

执行

./b2 link=shared

安装

sudo ./b2 install

这样Boost就安装到你的指定目录下了。

2. vsomeIP安装

下载vsomeIP源码:https://github.com/GENIVI/vsomeip.git

进入到vsomeIP源码根目录

mkdir build && cd build
cmake -DENABLE_SIGNAL_HANDLING=1 -DDIAGNOSIS_ADDRESS=0x10 -DCMAKE_INSTALL_PREFIX=/home/xxx/xxx/vsomeip -DBOOST_ROOT=/home/xxx/xxx/boost ..
make -j32
sudo make install

一些参数解释

参数

作用

ENABLE_SIGNAL_HANDLING

开启信号处理

DIAGNOSIS_ADDRESS

指定some/ip client id的第一个字节

CMAKE_INSTALL_PREFIX

指定安装位置

BOOST_ROOT

指定调用Boost库的位置

前两条网上也找到如下诠释

1、vsomeip接收SIGINT/SIGTERM信号,用ctro+c可以成功退出程序。
2、指定some/ip client id的第一个字节,如果在网络上多机通信,有必要区分不同的client,这个时候这个参数很有用。

cmake时如有报错或警告

– Found Doxygen: /usr/bin/doxygen

sudo apt-get install doxygen

– Checking for module ‘libsystemd’

sudo apt-get install libsystemd-dev

asciidoc is not installed. Readme can not be built.

sudo apt-get install asciidoc

– No package ‘automotive-dlt’ found

下载dlt-daemon:https://github.com/COVESA/dlt-daemon

cd /path/to/workspace/dlt-daemon
mkdir build
cd build
cmake ..
make -j32
sudo make install
sudo ldconfig # in case you executed make install

如果不是报错,警告尝试解决不了可先忽略。install完成后即可在指定目录下找到vsomeIP库。

3. CommonAPI Core Runtime安装

下载CommonAPI Core Runtime源码:https://github.com/COVESA/capicxx-core-runtime

进入到capicxx-core-runtime源码根目录

mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/xxx/xxx ..
make -j32
make install

4. CommonAPI SomeIP Runtime安装

下载CommonAPI SomeIP Runtime源码:https://github.com/COVESA/capicxx-someip-runtime

进入到CommonAPI SomeIP Runtime源码根目录

mkdir build
cmake -DUSE_INSTALLED_COMMONAPI=ON -DCMAKE_INSTALL_PREFIX=/xxx/xxx ..
make -j32
sudo make install

5. CommonAPI Core Runtime代码生成工具

这个不建议自己编译,本人尝试编译各种稀奇古怪的问题,直接使用官方提供的release就行。

想要尝试编译的下载:https://github.com/COVESA/capicxx-core-tools

直接下载release: https://github.com/COVESA/capicxx-core-tools/releases 下这个:commonapi_core_generator.zip不要下载source的

6. CommonAPI SomeIP Runtime代码生成工具

这个也不建议编译,直接下载官方release。

想要尝试编译的下载:https://github.com/COVESA/capicxx-someip-tools

直接下载release:https://github.com/COVESA/capicxx-someip-tools/releases 下这个:commonapi_someip_generator.zip不要下载source的

至此SomeIP/CommonAPI环境搭建完毕,基础使用见下回分解。

标签:sudo,SomeIP,CommonAPI,xxx,build,install,Ubuntu,https
From: https://blog.51cto.com/u_14557358/8972112

相关文章

  • Ubuntu上安装、使用Redis的详细教程
    sudoapt-getupdatesudoapt-getinstallredis启动方式二systemctlstartredis-server启动方式三serviceredis-serverstart重启redisserviceredis-serverrestart关闭redisserviceredis-serverstop查看redis状态serviceredis-serverstatus4、在宿主机连接redis根据以......
  • 软件测试/测试开发|Ubuntu虚拟机打不开Ubuntu software
    前言在我们安装完Ubuntu虚拟机之后,我们可以在虚拟机上安装我们所需的软件,比如我们经常会用到的pycharm和vscode等软件,都可以在Ubuntu的UbuntuSoftware中进行安装,但是在进行安装时,可能会出现打不开UbuntuSoftware的情况,本文就来介绍一下解决打不开这个软件市场的问题的方法。......
  • Ubuntu - 安装 MySQL 8
    以下是在Ubuntu上安装MySQL8的完整步骤:步骤1:更新包列表首先,打开终端并执行以下命令来确保包列表是最新的:sudoaptupdate步骤2:安装MySQL8服务器接下来,使用以下命令安装MySQL8服务器:sudoaptinstallmysql-server步骤3:启动MySQL服务安装完成后,启动MySQL......
  • Ubuntu 20.04 设置开机自启脚本启动java程序
    1)cp/lib/systemd/system/rc-local.service/etc/systemd/system2)修改/etc/systemd/system/rc-local.service,在该文件的最底部添加(可用vi/etc/systemd/system/rc-local.service命令)[Install]WantedBy=multi-user.targetAlias=rc-local.service3)创建/etc/rc.lcoal文件(vi/etc/rc.l......
  • Win7和Ubuntu双系统调试
    要在Win7和Ubuntu双系统下进行调试,你需要按照以下步骤操作:首先确保你的电脑已经安装了Win7和Ubuntu双系统。如果还没有安装,请先分别安装两个操作系统。在Windows7中安装一个虚拟机软件,例如VMwareWorkstation或VirtualBox。这些软件可以在Windows环境下模拟Linux环境,让你在Windows......
  • windows 安装 ubuntu 教程
    下载VMware下载链接:https://customerconnect.vmware.com/en/downloads/details?downloadGroup=WKST-PLAYER-1625&productId=1039&rPId=51984下载完成,安装即可下载Ubuntuhttps://ubuntu.com/download/desktop开始创建虚拟机点击创建虚拟机选择稍后安装选项LinuxUbuntu64位选择安......
  • Ubuntu 上使能 SELinux
    此文档说明如何在ubuntu上启用SELinux,测试环境为虚拟机,开始前一定一定一定先来个快照,不要问我为什么有三个一定。卸载apparmor(可选)ubuntu默认安装的安全组件为apparmor,网上文档说最好卸载掉apparmor,可能冲突之类的问题,说法可能有点有误啊,apparmor和selinux不兼容,当启用s......
  • U盘制作、安装Ubuntu系统
    制作ubuntuU盘启动盘下载Ubuntu镜像打开Ubuntu官网:https://ubuntu.com/download/desktop,进入页面后,点击右边的【Download】按钮开始下载Ubuntu的ISO系统镜像文件下载安装并配置U盘启动盘下载Rufuse写盘工具,完成后打开下载地址:http://rufus.ie/zh插入用来做启动......
  • ubuntu22.04 install cuda cudnn
    https://blog.csdn.net/qq_49323609/article/details/130310522isverygood  1,firstcheckdrivernvidia-smiifnocontent,showinstalldriverfirst twoways:oneis:useapt-getlike:https://blog.csdn.net/zxdd2018/article/details/127705627ubuntu-d......
  • Ubuntu 22.04.3 LTS 编译 OpenJDK 12
    基于《深入理解Java虚拟机》第3版1.配置环境更新软件源sudoaptupdate获取源码wgethttps://hg.openjdk.org/jdk/jdk12/archive/06222165c35f.zip构建基础编译环境sudoaptinstallbuild-essential此处安装的gcc及g++的版本为11,需要替换为7。参考这个......