build-rose-compiler-in-docker
Build the ROSE compiler in a Docker container using autotools or CMake. Use when setting up ROSE development environment, building ROSE from source, or…
от rondoflow★ 37 звёзд на GitHub
Установить build-rose-compiler-in-docker в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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 [email protected]: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 [email protected]: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
| Option | Description |
|---|---|
ENABLE_C=ON |
Enable C/C++ analysis (uses EDG frontend) |
ENABLE_BINARY_ANALYSIS=ON |
Enable binary analysis (no EDG needed) |
ENABLE_TESTS=OFF |
Skip test compilation (faster build) |
CMAKE_BUILD_TYPE=Release |
Optimized build |
CMake vs Autotools
| Feature | Autotools | CMake |
|---|---|---|
| Stability | ✅ Mature | ⚠️ Newer |
| C/C++ analysis | ✅ Works | ✅ Works (with fixes) |
| Build target | make core |
make (full build) |
| Incremental builds | Slower | Faster |
| IDE integration | Limited | Excellent |
Dockerfiles
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.atolibrose.soautomatically
If server is down, ensure source tree has EDG binaries (included in weekly branch).
Common Commands
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 instal
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- manifest.json
FAQ
Что делает скилл build-rose-compiler-in-docker?
Build the ROSE compiler in a Docker container using autotools or CMake. Use when setting up ROSE development environment, building ROSE from source, or troubleshooting ROSE build issues. ROSE requires GCC 7-10 which most modern hosts don't have, so Docker is the recommended appr…
Как установить скилл build-rose-compiler-in-docker?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл build-rose-compiler-in-docker запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…