Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
// Claude (Anthropic)
"source=${localEnv:HOME}/.claude,target=/home/${localEnv:USER}/.claude,type=bind,consistency=cached",
"source=${localEnv:HOME}/.claude.json,target=/home/${localEnv:USER}/.claude.json,type=bind,consistency=cached",
"source=${localEnv:HOME}/.claude-profiles,target=/home/${localEnv:USER}/.claude-profiles,type=bind,consistency=cached",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard optional Claude profiles mount

On hosts that have the normal Claude files but have not created ~/.claude-profiles, this new bind mount can prevent the devcontainer from starting because Dev Container mounts are passed through as Docker bind mounts and the source path must already exist. The existing initializeCommand creates a few optional host directories, but it does not create this new Claude profiles directory, so users without that optional profile setup hit the failure before the container can run.

Useful? React with 👍 / 👎.

// Codex (OpenAI)
"source=${localEnv:HOME}/.codex,target=/home/${localEnv:USER}/.codex,type=bind,consistency=cached",
// Omnigent (AI meta-harness, wraps Codex/Claude)
Expand Down
35 changes: 17 additions & 18 deletions Dockerfile.layer2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM ${BASE_IMAGE}
# Container version labels
LABEL layer="2"
LABEL layer.name="cpp-bench"
LABEL layer.version="2.0.1"
LABEL layer.version="2.0.2"
LABEL layer.description="C++ development tools and compilers (user-agnostic)"
LABEL bench.type="cpp"

Expand Down Expand Up @@ -48,23 +48,22 @@ RUN apt-get update && apt-get install -y \
tar \
curl \
# Modern GCC
gcc-12 \
g++-12 \
gcc-14 \
g++-14 \
Comment on lines +51 to +52

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep devcontainer compiler overrides in sync

When users launch this image through the checked-in devcontainer, .devcontainer/docker-compose.yml still sets CC=/usr/bin/gcc-12 and CXX=/usr/bin/g++-12, and .devcontainer/devcontainer.json has the same overrides; those environment values override the Dockerfile ENV. Since this change replaces the layer's GCC install/export with GCC 14 only, a fresh container can end up with CC/CXX pointing at non-existent GCC 12 paths, causing CMake and builds that honor these variables to fail immediately.

Useful? React with 👍 / 👎.

Comment on lines +51 to +52

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Don't require Noble-only GCC packages on Jammy

When this layer is built on the still-documented Ubuntu 22.04/Jammy base, this apt-get install step cannot resolve gcc-14/g++-14 from the stock repositories; Ubuntu's own GCC availability table lists Jammy packages only through GCC 12. Without moving the base image to 24.04 or adding the toolchain repository before this RUN, scripts/build-layer2.sh fails before producing cpp-bench:latest.

Useful? React with 👍 / 👎.

# Modern Clang/LLVM
clang-15 \
clang++-15 \
clang-tools-15 \
clang-tidy-15 \
clang-format-15 \
llvm-15 \
llvm-15-dev \
clang-19 \
clang-tools-19 \
clang-tidy-19 \
clang-format-19 \
llvm-19 \
Comment on lines +54 to +58
llvm-19-dev \
&& rm -rf /var/lib/apt/lists/*

# Set up compiler alternatives
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 100
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100

# ========================================
# DEBUGGERS AND PROFILERS
Expand Down Expand Up @@ -141,8 +140,8 @@ RUN chmod +x /usr/local/bin/sonarcloud-cpp-gcovr
# Set up environment variables
ENV VCPKG_ROOT=/opt/vcpkg
ENV PATH="$VCPKG_ROOT:$PATH"
ENV CC=/usr/bin/gcc-12
ENV CXX=/usr/bin/g++-12
ENV CC=/usr/bin/gcc-14
ENV CXX=/usr/bin/g++-14
ENV PATH="/usr/lib/ccache:$PATH"

# ========================================
Expand All @@ -154,8 +153,8 @@ RUN echo '' >> /etc/skel/.zshrc && \
echo '# C++ Development Environment' >> /etc/skel/.zshrc && \
echo 'export VCPKG_ROOT=/opt/vcpkg' >> /etc/skel/.zshrc && \
echo 'export PATH="$PATH:/opt/vcpkg"' >> /etc/skel/.zshrc && \
echo 'export CC=/usr/bin/gcc-12' >> /etc/skel/.zshrc && \
echo 'export CXX=/usr/bin/g++-12' >> /etc/skel/.zshrc && \
echo 'export CC=/usr/bin/gcc-14' >> /etc/skel/.zshrc && \
echo 'export CXX=/usr/bin/g++-14' >> /etc/skel/.zshrc && \
echo '' >> /etc/skel/.zshrc && \
echo '# C++ Build aliases' >> /etc/skel/.zshrc && \
echo 'alias cmake-debug="cmake -DCMAKE_BUILD_TYPE=Debug"' >> /etc/skel/.zshrc && \
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ cppcheck --enable=all --std=c++20 src/
### Multiple Compiler Testing
```bash
# Switch to Clang
export CC=clang-15
export CXX=clang++-15
export CC=clang-19
export CXX=clang++-19
cmake .. -DCMAKE_BUILD_TYPE=Debug

# Switch back to GCC
export CC=gcc-12
export CXX=g++-12
export CC=gcc-14
export CXX=g++-14
```

### Cross-Platform Development
Expand Down