
Compile
- 1 installs
- 2.2k repo stars
- Updated July 27, 2026
- alibaba/loongcollector
compile is a Claude skill that documents how to build LoongCollector's C++ (CMake) and Go (make plugin_local) components.
About
This skill documents how to compile the LoongCollector project, which has separate C++ and Go parts. A developer uses it to decide between incremental and full CMake builds, apply the correct build flags (BUILD_LOGTAIL, BUILD_LOGTAIL_UT, WITHSPL), and run the Go plugin build with make plugin_local. It is specific to the LoongCollector build environment.
- Documents how to build LoongCollector's C++ and Go parts
- Explains incremental vs full CMake builds and required build flags
- Provides the make plugin_local command for the Go plugin build
Compile by the numbers
- 1 all-time installs (skills.sh)
- Ranked #1,173 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
compile capabilities & compatibility
- Capabilities
- devops · ci cd
- Use cases
- devops
- Platforms
- Linux
- Pricing
- Free
What compile says it does
本项目分为 C++ 部分和 Go 部分。当你修改不同类型文件代码时,请使用不同的编译方法。
BUILD_LOGTAIL:表示编译 LoongCollector 二进制。必选
npx skills add https://github.com/alibaba/loongcollector --skill compileAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 2.2k |
| Last updated | July 27, 2026 |
| Repository | alibaba/loongcollector ↗ |
What it does
Compile the LoongCollector C++ binary and Go plugins with the right CMake flags and build mode.
Who is it for?
Developers building LoongCollector locally who need the right CMake flags and incremental vs full build choice
When should I use this skill?
When compiling LoongCollector C++ or Go code
What you get
A correctly compiled LoongCollector binary and Go plugin using the right build mode and flags
- compiled LoongCollector binary
- Go plugin build
By the numbers
- 3 key CMake flags (BUILD_LOGTAIL, BUILD_LOGTAIL_UT, WITHSPL)
Files
如何编译本项目
本项目分为 C++ 部分和 Go 部分。当你修改不同类型文件代码时,请使用不同的编译方法。
C++ 部分编译方法
1. 判断是否进行增量编译。如果已有 build 目录,并且其中有内容,并且你的修改没有涉及到 CMake 相关文件,那么跳转到第5步进行增量编译。
2. 创建编译目录
``` bash mkdir -p build
3. 进入编译目录
cd build
4. 构建 CMake 命令
cmake -DCMAKE_BUILD_TYPE=Debug -DLOGTAIL_VERSION=0.0.1 \ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ -DCMAKE_CXX_FLAGS="-I/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/include -I/opt/logtail -I/opt/logtail_spl" \ -DBUILD_LOGTAIL=ON -DBUILD_LOGTAIL_UT=ON -DWITHOUTGDB=ON -DENABLE_STATIC_LINK_CRT=ON -DWITHSPL=ON ../core
注意其中的几个开关:
- BUILD_LOGTAIL:表示编译 LoongCollector 二进制。必选
- BUILD_LOGTAIL_UT:表示编译 LoongCollector 单测。仅当你修改了 LoongCollector 单测时才打开。
- WITHSPL:表示编译 LoongCollector SPL 相关内容。仅当你修改了 LoongCollector SPL 相关文件时才打开。
5. 编译
make -sj$(nproc)
### Go 部分编译方法
执行
make plugin_local
Related skills
FAQ
How do I build the Go part of LoongCollector?
Run make plugin_local.
When should I enable BUILD_LOGTAIL_UT?
Only when you have modified LoongCollector unit tests.