Rdc build install

From ROCm/rocm-systems · View interactive version

Rdc build install is an AI agent skill from the GitHub repository ROCm/rocm-systems. Build and install RDC from source. Use when: building locally, installing before tests, pre-review build verification, build + install + verify. Requires GRPC_ROOT to be set.

How to use this skill

Skill file

Build & Install RDC

Builds RDC from source, packages it, and installs locally. Used by the review agent as a pre-step before dispatching subagents, and can be invoked independently.

Prerequisites

Build Commands

All commands assume $WORKSPACE is the rdc workspace root (where CMakeLists.txt lives).

Step 1: Clean

cd "$WORKSPACE"
sudo rm -rf build

Step 2: Configure & Build

mkdir -p build && cd build
cmake .. \
  -DCMAKE_INSTALL_PREFIX=/opt/rocm \
  -DCMAKE_PREFIX_PATH=/opt/rocm \
  -DGRPC_ROOT="${GRPC_ROOT:-/opt/grpc}" \
  -DBUILD_TESTS=ON \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j "$(nproc)"
make package

If GRPC_ROOT is not set or gRPC is not available, build without standalone mode:

cmake .. \
  -DCMAKE_INSTALL_PREFIX=/opt/rocm \
  -DCMAKE_PREFIX_PATH=/opt/rocm \
  -DBUILD_STANDALONE=OFF \
  -DBUILD_TESTS=ON \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo

Step 3: Uninstall Previous

sudo dpkg --remove --force-depends rdc-tests 2>/dev/null || true
sudo dpkg --remove --force-depends rdc 2>/dev/null || true

Step 4: Install

# Detect package format
PKG_FMT=$(command -v dpkg >/dev/null && echo deb || echo rpm)

if [ "$PKG_FMT" = "deb" ]; then
  sudo dpkg -i build/rdc*99999-local_amd64.deb 2>/dev/null || \
  sudo dpkg -i build/rdc*.deb
else
  sudo rpm -Uvh --force build/rdc*99999-local*x86_64.rpm 2>/dev/null || \
  sudo rpm -Uvh --force build/rdc*.rpm
fi

Step 5: Verify

/opt/rocm/bin/rdci --version 2>/dev/null || rdci --version

One-Shot Command

For use in scripts or as a single terminal command (DEB systems with gRPC):

cd "$WORKSPACE" && \
sudo rm -rf build && \
mkdir -p build && cd build && \
cmake .. \
  -DCMAKE_INSTALL_PREFIX=/opt/rocm \
  -DCMAKE_PREFIX_PATH=/opt/rocm \
  -DGRPC_ROOT="${GRPC_ROOT:-/opt/grpc}" \
  -DBUILD_TESTS=ON \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo && \
make -j "$(nproc)" && \
make package && \
sudo dpkg --remove --force-depends rdc-tests 2>/dev/null || true && \
sudo dpkg --remove --force-depends rdc 2>/dev/null || true && \
sudo dpkg -i rdc*99999-local_amd64.deb && \
rdci --version

Output

On success, capture and report:

On failure, capture and report:

RPM Variant

On RPM-based systems:

# Uninstall
sudo rpm -e rdc-tests 2>/dev/null || true
sudo rpm -e rdc 2>/dev/null || true

# Install
sudo rpm -Uvh --force build/rdc*99999-local*x86_64.rpm

Detect which to use: command -v dpkg >/dev/null && echo deb || echo rpm

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.