[LTTng学习之旅]------环境搭建
目录
安装
Build from sourcehttps://lttng.org/docs/v2.13/#doc-building-from-source
libuuid
Popt
libxml2
总结
安装LTTng自己的包
安装
LTTng有 三个包:
LTTng-tools
Libraries and command-line interface to control tracing.
LTTng-modules
Linux kernel modules to instrument and trace the kernel.
LTTng-UST
Libraries and Java/Python packages to instrument and trace user applications.
不需要全装。后面两个看追踪内核还是APP来装就可以。
大多数发行版可能包含LTTng的包,嵌入式设备当然没有那么幸运。我觉得必然是下载源码交叉编译这条路了。
Build from source
To build and install LTTng 2.13 from source:
Using the package manager of your distribution, or from source, install the following dependencies of LTTng-tools and LTTng-UST:
libuuid
popt
Userspace RCU
libxml2
Optional: numactl
现在就是一个个手动下载源码编译。嗯。。然后试一试。
libuuid
libuuid download | SourceForge.nethttps://sourceforge.net/projects/libuuid/下载/libuuid-1.0.3.tar.gz
执行: ./configure 检查很多环境 然后生成Makefile
执行:make
执行:sudo make install
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
Popt
rpm package manager (rpm5.org)http://rpm5.org/files/popt/
我发现好像在github上有库。。
http://ftp.rpm.org/popt/
Userspace RCU
Userspace RCU (liburcu.org)https://liburcu.org/
git clone git://git.liburcu.org/userspace-rcu.git
Userspace RCU Implementation
by Mathieu Desnoyers and Paul E. McKenney
Building
./bootstrap # skip if using tarball
./configure
make
make install
ldconfig
Hints:
Forcing 32-bit build:
CFLAGS="-m32 -g -O2" ./configure
Forcing 64-bit build:
CFLAGS="-m64 -g -O2" ./configure
Forcing a 32-bit build with 386 backward compatibility:
CFLAGS="-m32 -g -O2" ./configure --host=i386-pc-linux-gnu
Forcing a 32-bit build for Sparcv9 (typical for Sparc v9)
CFLAGS="-m32 -Wa,-Av9a -g -O2" ./configure
libxml2
GNOME / libxml2 · GitLabhttps://gitlab.gnome.org/GNOME/libxml2建议还是下载tarball。使用之前的脚本生成configure真的可能遇到各种依赖问题。
编译源码还是能跳一步是一步。。。
Releases · GNOME / libxml2 · GitLabhttps://gitlab.gnome.org/GNOME/libxml2/-/releases
Build instructions
libxml2 can be built with GNU Autotools, CMake, or several other build systems in platform-specific subdirectories.
Autotools (for POSIX systems like Linux, BSD, macOS)
If you build from a Git tree, you have to install Autotools and start by generating the configuration files with:
./autogen.sh
If you build from a source tarball, extract the archive with:
tar xf libxml2-xxx.tar.gz
cd libxml2-xxx
To see a list of build options:
./configure --help
Also see the INSTALL file for additional instructions. Then you can configure and build the library:
./configure [possible options]
make
Note that by default, no optimization options are used. You have to enable them manually, for example with:
CFLAGS='-O2 -fno-semantic-interposition' ./configure
Now you can run the test suite with:
make check
Please report test failures to the mailing list or bug tracker.
Then you can install the library:
make install
At that point you may have to rerun ldconfig or a similar utility to update your list of installed shared libs.
总结
从源代码安装的步骤:
1、下载tarball。不要从Git拉库,还不如下载tarball。git 拉取一般都不带configure程序。要运行sh文件来生成。这一步容易报错。
2、运行./configure 这个一部会检查环境和生成makefile
3、make
4、make check 如果有的话
5、sudo make install。
在编译中遇到一个找不到Python.h的问题。apt install python-dev解决。不知道到了嵌入式环境怎么搞。。我为什么要自己干这个啊??包给供应商算了。。
安装LTTng自己的包
cd $(mktemp -d) &&
wget https://lttng.org/files/lttng-modules/lttng-modules-latest-2.13.tar.bz2 &&
tar -xf lttng-modules-latest-2.13.tar.bz2 &&
cd lttng-modules-2.13.* &&
make &&
sudo make modules_install &&
sudo depmod -a
cd $(mktemp -d) &&
wget https://lttng.org/files/lttng-ust/lttng-ust-latest-2.13.tar.bz2 &&
tar -xf lttng-ust-latest-2.13.tar.bz2 &&
cd lttng-ust-2.13.* &&
./configure &&
make &&
sudo make install &&
sudo ldconfig
cd $(mktemp -d) &&
wget https://lttng.org/files/lttng-tools/lttng-tools-latest-2.13.tar.bz2 &&
tar -xf lttng-tools-latest-2.13.tar.bz2 &&
cd lttng-tools-2.13.* &&
./configure &&
make &&
sudo make install &&
sudo ldconfig
我是用浏览器把包下载之后解压弄的。因为糟糕的网络环境。
[LTTng学习之旅]------环境搭建相关推荐
- 基于 Android NDK 的学习之旅-----环境搭建
工欲善其事 必先利其器 , 下面介绍下 Eclipse SDK NDK Cygwin CDT 集成开发环境的搭建. 1.Android 开发环境搭建 Android开发环境搭建不是重点,相信看此文章的 ...
- 深度学习(二)theano学习笔记(1)环境搭建
theano学习笔记(1)环境搭建 原文地址:http://blog.csdn.net/hjimce/article/details/46654229 作者:hjimce 搭建theano实属不易,因 ...
- 深度学习之tensorflow环境搭建
深度学习之tensorflow环境搭建: 1.搭建的步骤 1-1.破解版的Pycharm软件包下载 1-2.Ananconda软件包的下载 1-3.使用Anaconda Prompt 命令,首先输入 ...
- Go学习笔记_环境搭建
Go学习笔记_环境搭建 Go背景知识 go的特点(官网): Build fast, reliable, and efficient software at scale- Go is an open s ...
- 怎么装python的keras库_matlab调用keras深度学习模型(环境搭建)
matlab没有直接调用tensorflow模型的接口,但是有调用keras模型的接口,而keras又是tensorflow的高级封装版本,所以就研究一下这个--可以将model-based方法和le ...
- Django学习笔记 开发环境搭建
为什么使用django? 1.支持快速开发:用python开发:数据库ORM系统,并不需要我们手动地构造SQL语句,而是用python的对象访问数据库,能够提升开发效率. 2.大量内置应用:后台管理系 ...
- jni 入门 android的C编程之旅 ---环境搭建helloworld
需要进行jni的开发有一下几个条件: 1:能初步使用C/C++如果不会,请参读 谭浩强的 C编程语言 2:android应用开发已经基本入门,如果没有,请先行学习 这两个条件基本满足后,我们开始了: ...
- cocos2d-x lua 学习笔记(1) -- 环境搭建
Cocos2d-x 3.0以上版本的环境搭建和之前的Cocos2d-x 2.0 版差异较大的,同时从Cocos2d-x 3.0项目打包成apk安卓应用文件,搭建安卓环境的步骤有点繁琐,但搭建一次之后, ...
- 深度学习CPU版本环境搭建(从anaconda->pycharm->tensorflow)
前言:其实当自己写下这个搭建过程的时候,自己已经碰壁很多了,所幸一路上还是有csdn博客论坛指导,特别鸣谢小艾童鞋熬夜写了一份安装指南给我,以及廖大师兄的悉心引导.所以自己也想根据经验,写下基于CPU ...
最新文章
- redis mysql查询数据类型_linux 常见的标识与Redis数据库详解
- 刷了一个月算法,终于拿到了double的offer
- Web-Lesson07-JS的函数及作用域
- python办公代码_[Python] 自动化办公 docx操作Word基础代码
- Qt 设置textEdit插入文本的字体、大小和颜色
- C语言三目运算符用法详解
- spring boot 2.0 源码分析(三)
- Android之Button按钮
- java 内嵌chrome_[Java教程]Jcef内嵌浏览器windows版本的编译及使用
- Enigma密码机原理图解
- Vue项目使用SSR服务器渲染
- 张桂梅PK清华副教授:不要站在高楼上,傲慢地指着大山
- fleck 客户端_关于C#使用Fleck 的websocket问题
- 南京考公上岸经验分享
- 零基础如何学习SEO网站优化
- mac android 录屏软件,mac录屏怎么录内置声音?详细的解决方案
- java 函数表_C语言、Java语言的符号表区别和特点是什么?分别是如和处理函数参数的?...
- 22.【终结篇】poco/airtest+pytest+allure+jenkins框架篇
- Python对阿里云物联网MQTT设备接入端开发
- 简历应该怎么写,HR看一篇简历仅需要5秒吗,简历模板大全