rocprofsys-configure
Skill5 starsChanged 17 days agoMITView on GitHub
Configure rocprofiler-systems build with CMake presets and custom options
- Installs packages
In this repository50 other files it gives its agents.
- analyze-pr-commentsSkill
- architecture-analyzeSkill
- architecture-tradeoffSkill
- askSkill
- code-smellsSkill
- debugging-rocprof-sysSkill
- exploration-explore-codeSkill
- git-commitSkill
- git-gh-clientSkill
- git-prepare-pull-requestSkill
- git-pull-request-statusSkill
- gitSkill
- grill-meSkill
- library-amd-smiSkill
- notify-meSkill
- planning-architectureSkill
- planning-baseSkill
- planning-bugfixSkill
- planning-docsSkill
- planning-featureSkill
- planning-refactorSkill
- programming-cmake-best-practicesSkill
- programming-cpp-constexprSkill
- programming-cpp-design-patternsSkill
- programming-cpp-naming-rulesSkill
- programming-cpp-policy-based-diSkill
- programming-cppSkill
- programming-cpp-stl-algorithmsSkill
- programming-pythonSkill
- pr-review-interactiveSkill
- pr-reviewSkill
- radisha-create-skillSkill
- radisha-helpSkill
- radisha-improve-skillSkill
- radisha-skillsSkill
- radisha-updateSkill
- refactoring-techniquesSkill
- review-architectureSkill
- rocprofsys-buildSkill
- rocprofsysSkill
- static-analysisSkill
- testing-gtest-gmockSkill
- testing-pytestSkill
- testing-testplanSkill
- therock-build-to-commitSkill
- therock-commit-in-buildSkill
- therock-first-build-with-commitSkill
- update-pr-descriptionSkill
- verify-pmc-metricsSkill
- watchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 20 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when:
- Distinctive: line 40
Check if current directory is inside the project
- Distinctive: line 41
Search common worktree locations
- Distinctive: line 42
Ask user for location
- Very specific: line 58
Must be the projects/rocprofiler-systems/ directory (not monorepo root)
- Very specific: line 59
Must contain CMakeLists.txt and CMakePresets.json
- Distinctive: line 63
Ask user what type of build they want:
- Distinctive: line 73
Use AskUserQuestion to present options:
- Distinctive: line 104
If no, use preset default
- Distinctive: line 105
If yes, ask for custom path
- Distinctive: line 120
If missing, build from source
- Distinctive: line 136
If "Build from source" selected, set:
- Distinctive: line 147
Ask about optional features:
- Distinctive: line 184
After CMake runs, check for:
- Distinctive: line 188
Should see "Build files have been written to..."
- Distinctive: line 191
Check CMake output for enabled features
- Distinctive: line 192
Verify dependencies found or built
- Distinctive: line 303
Read error message carefully
- Distinctive: line 304
Check for missing system dependencies
- Distinctive: line 306
Check compiler version (GCC 7+)
- Distinctive: line 307
Remove build directory and try again
- Very specific: line 319
Monorepo awareness: Always verify you're in projects/rocprofiler-systems/, not the monorepo root
- Distinctive: line 324
Clean slate: When changing major options (build type, dependencies), safer to remove build directory first
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Configure ROCm Systems Profiler Build
Configures the rocprofiler-systems project using CMake with presets or custom options.
When to Use
Use this skill when:
- User wants to configure rocprofsys build
- Setting up build for first time
- Switching between debug/release builds
- Changing CMake options (dependencies, features)
- User asks "how do I configure rocprofsys?"
Before You Start
Prerequisites:
- CMake 3.21 or higher
- GCC 7+ compiler (or Clang if Dyninst is pre-installed)
- Ninja or Make build system
Check prerequisites:
cmake --version # Should be >= 3.21
gcc --version # Should be >= 7.0
ninja --version # Optional but recommendedProcess
Phase 1: Find Project Location
Since rocprofiler-systems is in a monorepo and may use git worktrees, find it dynamically.
Strategy:
- Check if current directory is inside the project
- Search common worktree locations
- Ask user for location
# Check current directory
if [ -f "CMakeLists.txt" ] && grep -q "rocprofiler-systems" CMakeLists.txt; then
PROJECT_DIR="."
# Search worktrees
elif [ -d "/home/amd/worktree/rocm-systems" ]; then
PROJECT_DIR=$(find /home/amd/worktree/rocm-systems -type d -name "rocprofiler-systems" | grep "projects/rocprofiler-systems$" | head -1)
# Ask user
else
# Use AskUserQuestion to get path
fiValidation:
- Must be the
projects/rocprofiler-systems/directory (not monorepo root) - Must contain
CMakeLists.txtandCMakePresets.json
Phase 2: Choose Configuration Strategy
Ask user what type of build they want:
| Option | Preset | Use For |
| Debug | debug | Development with debugging symbols |
| Release | release | Production, optimized build |
| Debug-Optimized | debug-optimized | Debug symbols + optimizations |
| CI | ci | CI/CD builds with all features |
| Custom | None | User specifies all options manually |
Use AskUserQuestion to present options:
header: "Build Type"
question: "Which build configuration do you want?"
options:
- label: "Debug (Recommended for development)"
description: "Debug build with tests enabled"
- label: "Release"
description: "Optimized production build"
- label: "Debug-Optimized"
description: "Optimized with debug symbols"
- label: "CI"
description: "Full CI build configuration"
- label: "Custom"
description: "Specify options manually"Phase 3: Select Build Directory
Options:
- Use preset default (recommended)
- Debug →
build/debug - Release →
build/release - Debug-Optimized →
build/debug-optimized - CI →
build/ci
- Debug →
- Custom directory
- User specifies (e.g.,
build/my-build)
- User specifies (e.g.,
Ask user if they want to change default:
- If no, use preset default
- If yes, ask for custom path
Phase 4: Configure Dependencies
The project has complex dependencies. Determine which to build from source:
Key dependencies:
- Dyninst (required for instrumentation)
- TBB (required by Dyninst)
- Boost (required by Dyninst)
- Elfutils (required by Dyninst)
- Libiberty (required by Dyninst)
Strategy:
- Try system packages first (faster)
- If missing, build from source
Use AskUserQuestion:
header: "Dependencies"
question: "How should dependencies be handled?"
options:
- label: "Auto-detect (Recommended)"
description: "Use system packages if available, build from source if missing"
- label: "Build all from source"
description: "Build Dyninst and all dependencies from source (slower but reliable)"
- label: "Use system packages only"
description: "Fail if system packages are missing"If "Build from source" selected, set:
-DROCPROFSYS_BUILD_DYNINST=ON
-DROCPROFSYS_BUILD_TBB=ON
-DROCPROFSYS_BUILD_BOOST=ON
-DROCPROFSYS_BUILD_ELFUTILS=ON
-DROCPROFSYS_BUILD_LIBIBERTY=ONPhase 5: Optional Features
Ask about optional features:
| Feature | CMake Option | Default |
| Python support | ROCPROFSYS_USE_PYTHON | ON |
| MPI support | ROCPROFSYS_USE_MPI | OFF |
| PAPI hardware counters | ROCPROFSYS_USE_PAPI | ON |
| Testing | ROCPROFSYS_BUILD_TESTING | ON |
Only ask if user selected "Custom" or explicitly wants to change features.
Phase 6: Run CMake Configure
With preset:
cd /path/to/projects/rocprofiler-systems
cmake --preset <preset-name>With custom options:
cd /path/to/projects/rocprofiler-systems
cmake -B <build-dir> \
-DCMAKE_BUILD_TYPE=<Debug|Release|RelWithDebInfo> \
-DCMAKE_INSTALL_PREFIX=/opt/rocprofiler-systems \
-DROCPROFSYS_BUILD_DYNINST=<ON|OFF> \
-DROCPROFSYS_BUILD_TBB=<ON|OFF> \
-DROCPROFSYS_BUILD_BOOST=<ON|OFF> \
-DROCPROFSYS_USE_PYTHON=<ON|OFF> \
-DROCPROFSYS_BUILD_TESTING=<ON|OFF> \
-G NinjaShow configuration command to user before running.
Phase 7: Validate Configuration
After CMake runs, check for:
- Configuration success
- CMake should exit with code 0
- Should see "Build files have been written to..."
- Expected features enabled
- Check CMake output for enabled features
- Verify dependencies found or built
- Common warnings
- Missing optional dependencies (PAPI, MPI)
- Version mismatches
- Compiler warnings
Report to user:
- Configuration status (success/failure)
- Enabled features
- Any warnings or issues
- Build directory location
- Next step: use
rocprofsys-buildskill
Configuration Examples
Example 1: Quick Debug Build (Recommended for Development)
cd /path/to/projects/rocprofiler-systems
cmake --preset debugExample 2: Release Build with All Dependencies from Source
cd /path/to/projects/rocprofiler-systems
cmake --preset release \
-DROCPROFSYS_BUILD_DYNINST=ON \
-DROCPROFSYS_BUILD_TBB=ON \
-DROCPROFSYS_BUILD_BOOST=ON \
-DROCPROFSYS_BUILD_ELFUTILS=ON \
-DROCPROFSYS_BUILD_LIBIBERTY=ONExample 3: Custom Configuration
cd /path/to/projects/rocprofiler-systems
cmake -B build/my-custom-build \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=$HOME/rocprofsys-install \
-DROCPROFSYS_BUILD_DYNINST=ON \
-DROCPROFSYS_BUILD_TBB=ON \
-DROCPROFSYS_BUILD_BOOST=ON \
-DROCPROFSYS_USE_PYTHON=ON \
-DROCPROFSYS_USE_MPI=ON \
-DROCPROFSYS_BUILD_TESTING=ON \
-G NinjaOutput
This skill produces:
- Configured build directory with CMake cache
build/<preset>/CMakeCache.txt- Build system files (Ninja or Makefiles)
Typical output structure:
projects/rocprofiler-systems/
└── build/
└── debug/ # Or release, debug-optimized, etc.
├── CMakeCache.txt
├── CMakeFiles/
├── build.ninja # If using Ninja
└── ...Common Mistakes
| Mistake | Fix |
| Configuring in wrong directory | Must be in projects/rocprofiler-systems/, not monorepo root |
| Using monorepo build directory | Build dir must be inside the project, not at monorepo level |
| Missing dependencies | Use -DROCPROFSYS_BUILD_<DEP>=ON to build from source |
| CMake version too old | Install CMake 3.21+: pip install --user cmake |
| In-source build | Always use out-of-source: -B build/... |
| Forgetting generator | Specify -G Ninja for faster builds |
| Not checking configuration output | Always review CMake output for warnings |
Troubleshooting
Issue: "Could not find Dyninst"
Solution:
cmake --preset debug -DROCPROFSYS_BUILD_DYNINST=ON \
-DROCPROFSYS_BUILD_TBB=ON \
-DROCPROFSYS_BUILD_BOOST=ON \
-DROCPROFSYS_BUILD_ELFUTILS=ON \
-DROCPROFSYS_BUILD_LIBIBERTY=ONIssue: "CMake 3.21 or higher is required"
Solution:
pip install --user cmake==3.21.0
export PATH=$HOME/.local/bin:$PATHIssue: "Wrong project directory"
Symptom: CMakeLists.txt doesn't mention rocprofiler-systems
Solution: Navigate to projects/rocprofiler-systems/ subdirectory within monorepo
Issue: "Configuration failed with errors"
Steps:
- Read error message carefully
- Check for missing system dependencies
- Try building dependencies from source
- Check compiler version (GCC 7+)
- Remove build directory and try again
Integration with Other Skills
| After Configuration | Use |
| Build configured | rocprofsys-build to compile |
| Need to reconfigure | Remove build directory, run this skill again |
| Configuration failed | Check docs, install deps, try again |
Notes
- Monorepo awareness: Always verify you're in
projects/rocprofiler-systems/, not the monorepo root - Git worktrees: Support multiple worktrees with different branches
- Build isolation: Each branch/worktree can have its own build directory
- Preset modification: Can override preset options with
-Dflags - Incremental changes: Can reconfigure without removing build directory (most of the time)
- Clean slate: When changing major options (build type, dependencies), safer to remove build directory first
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

