# Send Rose Docker Build to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "rose-docker-build-skill",
    "name": "Rose Docker Build",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/chunhualiao/rose-docker-build-skill",
    "canonicalUrl": "https://clawhub.ai/chunhualiao/rose-docker-build-skill",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/rose-docker-build-skill",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=rose-docker-build-skill",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "rose-docker-build-skill",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-08T06:40:04.122Z",
      "expiresAt": "2026-05-15T06:40:04.122Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=rose-docker-build-skill",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=rose-docker-build-skill",
        "contentDisposition": "attachment; filename=\"rose-docker-build-skill-0.1.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "rose-docker-build-skill"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/rose-docker-build-skill"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/rose-docker-build-skill",
    "downloadUrl": "https://openagent3.xyz/downloads/rose-docker-build-skill",
    "agentUrl": "https://openagent3.xyz/skills/rose-docker-build-skill/agent",
    "manifestUrl": "https://openagent3.xyz/skills/rose-docker-build-skill/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/rose-docker-build-skill/agent.md"
  }
}
```
## Documentation

### ROSE Docker Build

Build the ROSE source-to-source compiler in an isolated Docker container.

### Why Docker?

ROSE requires GCC 7-10. Modern systems have GCC 11+, causing build failures. Docker provides:

Correct GCC version (9.x recommended)
All dependencies pre-installed
Reproducible builds
Edit on host, build in container

### Quick Start (Autotools)

# 1. Clone ROSE
git clone git@github.com:rose-compiler/rose.git
cd rose && git checkout weekly

# 2. Create Docker environment
mkdir ../rose-docker && cd ../rose-docker

# 3. Build and run container (see Dockerfile below)
docker build -t rose-dev .
docker run -d --name rose-dev -v $(pwd)/../rose:/rose/src rose-dev

# 4. Build ROSE inside container
docker exec rose-dev bash -c 'cd /rose/src && ./build'
docker exec rose-dev bash -c 'mkdir -p /rose/build && cd /rose/build && \\
  /rose/src/configure --prefix=/rose/install \\
    --enable-languages=c,c++ \\
    --with-boost=/usr \\
    --with-boost-libdir=/usr/lib/x86_64-linux-gnu \\
    --disable-binary-analysis \\
    --disable-java'
docker exec rose-dev bash -c 'cd /rose/build && make core -j$(nproc)'
docker exec rose-dev bash -c 'cd /rose/build && make install-core'

### Quick Start (CMake)

CMake builds require CMake 4.x (3.16 fails at ROSETTA generation).

# 1. Clone ROSE
git clone git@github.com:rose-compiler/rose.git
cd rose && git checkout weekly

# 2. Create Docker environment and build container
mkdir ../rose-docker && cd ../rose-docker
docker build -t rose-dev -f Dockerfile.cmake .
docker run -d --name rose-cmake -v $(pwd)/../rose:/rose/src:ro rose-dev

# 3. Configure with CMake
docker exec -w /rose/build rose-cmake cmake /rose/src \\
  -DCMAKE_INSTALL_PREFIX=/rose/install \\
  -DENABLE_C=ON \\
  -DENABLE_TESTS=OFF \\
  -DCMAKE_BUILD_TYPE=Release

# 4. Build (use -j4 to avoid OOM on 16GB systems)
docker exec -w /rose/build rose-cmake make -j4

# 5. Test
docker exec rose-cmake /rose/build/bin/rose-compiler --version

### CMake Options

OptionDescriptionENABLE_C=ONEnable C/C++ analysis (uses EDG frontend)ENABLE_BINARY_ANALYSIS=ONEnable binary analysis (no EDG needed)ENABLE_TESTS=OFFSkip test compilation (faster build)CMAKE_BUILD_TYPE=ReleaseOptimized build

### CMake vs Autotools

FeatureAutotoolsCMakeStability✅ Mature⚠️ NewerC/C++ analysis✅ Works✅ Works (with fixes)Build targetmake coremake (full build)Incremental buildsSlowerFasterIDE integrationLimitedExcellent

### Dockerfile (Autotools)

FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=America/Los_Angeles

RUN apt-get update && apt-get install -y \\
    build-essential g++ gcc gfortran \\
    automake autoconf libtool flex bison \\
    libboost-all-dev libxml2-dev \\
    git wget curl vim \\
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose
USER developer
WORKDIR /rose
CMD ["tail", "-f", "/dev/null"]

### Dockerfile.cmake (CMake)

FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=America/Los_Angeles

# Install build dependencies
RUN apt-get update && apt-get install -y \\
    build-essential g++ gcc gfortran \\
    flex bison \\
    libboost-all-dev libxml2-dev libreadline-dev \\
    zlib1g-dev libsqlite3-dev libpq-dev libyaml-dev \\
    libgmp-dev libmpc-dev libmpfr-dev \\
    git wget curl vim \\
    gnupg software-properties-common \\
    && rm -rf /var/lib/apt/lists/*

# Install CMake 4.x from Kitware (Ubuntu 20.04 has 3.16 which is too old)
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - \\
    && echo 'deb https://apt.kitware.com/ubuntu/ focal main' > /etc/apt/sources.list.d/kitware.list \\
    && apt-get update && apt-get install -y cmake \\
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -s /bin/bash developer
RUN mkdir -p /rose/src /rose/build /rose/install && chown -R developer:developer /rose
USER developer
WORKDIR /rose
CMD ["tail", "-f", "/dev/null"]

### EDG Binary Handling

EDG (C++ frontend) binaries are required for C/C++ analysis. The build checks:

### Autotools

Build directory for existing tarball
Source tree at src/frontend/CxxFrontend/roseBinaryEDG-*.tar.gz
Network download from edg-binaries.rosecompiler.org

### CMake

Source tree at src/frontend/CxxFrontend/roseBinaryEDG-*.tar.gz (auto-detected)
Extracts matching tarball based on GCC version at build time
Links libroseEDG.a to librose.so automatically

If server is down, ensure source tree has EDG binaries (included in weekly branch).

### Autotools

# Rebuild after source changes
docker exec rose-dev bash -c 'cd /rose/build && make core -j8'

# Install
docker exec rose-dev bash -c 'cd /rose/build && make install-core'

### CMake

# Rebuild after source changes  
docker exec -w /rose/build rose-cmake make -j4

# Install
docker exec -w /rose/build rose-cmake make install

### Both

# Test ROSE compiler
docker exec rose-dev /rose/install/bin/rose-compiler --version
docker exec rose-cmake /rose/build/bin/rose-compiler --version

# Source-to-source test
docker exec rose-dev bash -c 'echo "int main(){return 0;}" > /tmp/test.c && \\
  /rose/install/bin/rose-compiler -c /tmp/test.c && cat rose_test.c'

# Enter container shell
docker exec -it rose-dev bash
docker exec -it rose-cmake bash

### Build Time

Build SystemFirst BuildIncrementalAutotools (make core -j8)~60-90 minseconds-minutesCMake (make -j4)~35 minseconds-minutes

librose.so: ~200 MB (CMake) to ~1.3 GB (autotools with debug)
Memory: Use -j4 on 16GB systems to avoid OOM

### Troubleshooting

IssueSolutionEDG download failsUse weekly branch (has EDG binaries in source tree)CMake: ROSETTA failsUpgrade to CMake 4.xCMake: EDG link errorsEnsure using latest CMake fixes (PR #250)CMake: quadmath errorsAdd -lquadmath or use latest fixesPermission deniedCheck volume mount permissionsOut of memoryReduce -j parallelismBoost not foundVerify boost paths in configure/cmake

### Testing with Sample Code

# Create factorial test
cat << 'EOF' | docker exec -i rose-cmake tee /tmp/factorial.cpp
#include <iostream>
int factorial(int n) { return n <= 1 ? 1 : n * factorial(n-1); }
int main() {
    for(int i = 0; i <= 10; i++)
        std::cout << "factorial(" << i << ") = " << factorial(i) << std::endl;
    return 0;
}
EOF

# Run through ROSE (source-to-source transformation)
docker exec -w /tmp rose-cmake /rose/build/bin/rose-compiler factorial.cpp

# Compile and run the transformed code
docker exec -w /tmp rose-cmake g++ rose_factorial.cpp -o factorial_test
docker exec -w /tmp rose-cmake ./factorial_test

Expected output:

factorial(0) = 1
factorial(1) = 1
...
factorial(10) = 3628800
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: chunhualiao
- Version: 0.1.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-08T06:40:04.122Z
- Expires at: 2026-05-15T06:40:04.122Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/rose-docker-build-skill)
- [Send to Agent page](https://openagent3.xyz/skills/rose-docker-build-skill/agent)
- [JSON manifest](https://openagent3.xyz/skills/rose-docker-build-skill/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/rose-docker-build-skill/agent.md)
- [Download page](https://openagent3.xyz/downloads/rose-docker-build-skill)