Search

PythonReactSEOPDF
OpenClaw

rose-container-tools

Build and run ROSE compiler tools using ROSE installed in a Docker container. Use when developing source-to-source translators, call graph analyzers, AST processors, or any tool that links against librose.so. Triggers on "ROSE tool", "callgraph", "AST traversal", "source-to-source", "build with ROSE", "librose".

chunhualiao0 source installs☆ 0 Repository starsv0.1.0

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install chunhualiao/rose-container-tools

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

ROSE Container Tools

Build and run ROSE-based source code analysis tools using ROSE installed in a container.

⚠️ ALWAYS Use Makefile

Never use ad-hoc scripts or command-line compilation for ROSE tools.

  • Use Makefile for all builds
  • Enables make -j parallelism
  • Ensures consistent flags
  • Supports make check for testing

Why Container?

ROSE requires GCC 7-10 and specific Boost versions. Most modern hosts don't have these. The container provides:

  • Pre-installed ROSE at /rose/install
  • Correct compiler toolchain
  • All dependencies configured

Quick Start

1. Start the Container
# If container exists
docker start rose-tools-dev
docker exec -it rose-tools-dev bash

# Or create new container
docker run -it --name rose-tools-dev \
  -v /home/liao/rose-install:/rose/install:ro \
  -v $(pwd):/work \
  -w /work \
  rose-dev:latest bash
2. Build with Makefile

Always use Makefile to build ROSE tools. Never use ad-hoc scripts.

# Inside container
make        # Build all tools
make check  # Build and test
3. Run the Tool
./build/my_tool -c input.c

Makefile (Required)

Create Makefile for your tool:

ROSE_INSTALL = /rose/install

CXX      = g++
CXXFLAGS = -std=c++14 -Wall -g -I$(ROSE_INSTALL)/include/rose
LDFLAGS  = -L$(ROSE_INSTALL)/lib -Wl,-rpath,$(ROSE_INSTALL)/lib
LIBS     = -lrose

BUILDDIR = build
SOURCES  = $(wildcard tools/*.cpp)
TOOLS    = $(patsubst tools/%.cpp,$(BUILDDIR)/%,$(SOURCES))

.PHONY: all clean check

all: $(TOOLS)

$(BUILDDIR)/%: tools/%.cpp
	@mkdir -p $(BUILDDIR)
	$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(LIBS)

check: all
	@for tool in $(TOOLS); do \
		echo "Testing $$tool..."; \
		LD_LIBRARY_PATH=$(ROSE_INSTALL)/lib $$tool -c tests/hello.c; \
	done

clean:
	rm -rf $(BUILDDIR)

Example: Identity Translator

Minimal ROSE tool that parses and unparses code:

// tools/identity.cpp
#include "rose.h"

int main(int argc, char* argv[]) {
    SgPro...

Source information

Source
github
Repository
openclaw/skills
Path
skills/chunhualiao/rose-container-tools
Version
0.1.0
Commit
1f58d79714e9bb78f2ce39102a40c4417bff2611
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# ROSE Container Tools

Build and run ROSE-based source code analysis tools using ROSE installed in a container.

## ⚠️ ALWAYS Use Makefile

**Never use ad-hoc scripts or command-line compilation for ROSE tools.**

- Use `Makefile` for all builds
- Enables `make -j` parallelism
- Ensures consistent flags
- Supports `make check` for testing

## Why Container?

ROSE requires GCC 7-10 and specific Boost versions. Most modern hosts don't have these. The container provides:
- Pre-installed ROSE at `/rose/install`
- Correct compiler toolchain
- All dependencies configured

## Quick Start

### 1. Start the Container

```bash
# If container exists
docker start rose-tools-dev
docker exec -it rose-tools-dev bash

# Or create new container
docker run -it --name rose-tools-dev \
  -v /home/liao/rose-install:/rose/install:ro \
  -v $(pwd):/work \
  -w /work \
  rose-dev:latest bash
```

### 2. Build with Makefile

**Always use Makefile to build ROSE tools. Never use ad-hoc scripts.**

```bash
# Inside container
make        # Build all tools
make check  # Build and test
```

### 3. Run the Tool

```bash
./build/my_tool -c input.c
```

## Makefile (Required)

Create `Makefile` for your tool:

```makefile
ROSE_INSTALL = /rose/install

CXX      = g++
CXXFLAGS = -std=c++14 -Wall -g -I$(ROSE_INSTALL)/include/rose
LDFLAGS  = -L$(ROSE_INSTALL)/lib -Wl,-rpath,$(ROSE_INSTALL)/lib
LIBS     = -lrose

BUILDDIR = build
SOURCES  = $(wildcard tools/*.cpp)
TOOLS    = $(patsubst tools/%.cpp,$(BUILDDIR)/%,$(SOURCES))

.PHONY: all clean check

all: $(TOOLS)

$(BUILDDIR)/%: tools/%.cpp
	@mkdir -p $(BUILDDIR)
	$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(LIBS)

check: all
	@for tool in $(TOOLS); do \
		echo "Testing $$tool..."; \
		LD_LIBRARY_PATH=$(ROSE_INSTALL)/lib $$tool -c tests/hello.c; \
	done

clean:
	rm -rf $(BUILDDIR)
```

## Example: Identity Translator

Minimal ROSE tool that parses and unparses code:

```cpp
// tools/identity.cpp
#include "rose.h"

int main(int argc, char* argv[]) {
    SgPro...

Related skills

OpenClaw

13-Day Sprint Method

galizki

Productivity system based on Maya calendar with 13 natural tones for project management and personal development

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.