aws / aws/bedrock-agentcore-starter-toolkit

[BUG] Build fails with ruamel-yaml 0.19.0 - missing gcc in slim Docker image

Open
#415 5 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Python
Stars
508
Forks
155
Avg merge
8h 50m
Merged PRs (30d)
4

Description

Describe the bug

Container builds fail when using agentcore launch because ruamel-yaml>=0.18.14 resolves to version 0.19.0, which depends on ruamel-yaml-clibz - a C extension that requires compilation. The default AgentCore Docker image (ghcr.io/astral-sh/uv:python3.12-bookworm-slim) doesn't include gcc.

To Reproduce

Install bedrock-agentcore-starter-toolkit 0.2.5
Run agentcore configure to set up an agent
Run agentcore launch
Build fails during uv pip install -r requirements.txt
Expected behavior

The container build should complete successfully without requiring users to manually pin dependency versions.

Error Output

#8 2.759 × Failed to build `ruamel-yaml-clibz==0.3.4`
#8 2.759 ├─▶ The build backend returned an error
#8 2.759 ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit
#8 2.759 status: 1)
#8 2.759
#8 2.759 [stdout]
#8 2.759 running bdist_wheel
#8 2.759 running build
#8 2.759 running build_ext
#8 2.759 building '_ruamel_yaml_clibz' extension
#8 2.759 creating build/temp.linux-aarch64-cpython-312
#8 2.759 gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3
#8 2.759 -Wall -fPIC -I/root/.cache/uv/builds-v0/.tmpJTJlgy/include
#8 2.759 -I/usr/local/include/python3.12 -c _ruamel_yaml_clibz.c -o
#8 2.759 build/temp.linux-aarch64-cpython-312/_ruamel_yaml_clibz.o
#8 2.759
#8 2.759 [stderr]
#8 2.759 error: command 'gcc' failed: No such file or directory
#8 2.759
#8 2.759 help: `ruamel-yaml-clibz` (v0.3.4) was included because
#8 2.759 `bedrock-agentcore-starter-toolkit` (v0.2.5) depends on `ruamel-yaml`
#8 2.759 (v0.19.0) which depends on `ruamel-yaml-clibz`
Environment:

OS: macOS (local), linux/arm64 (CodeBuild)
Python version: 3.12
Package version: bedrock-agentcore-starter-toolkit 0.2.5
Installation method: pip
Base Docker image: ghcr.io/astral-sh/uv:python3.12-bookworm-slim
Additional context

Root Cause: ruamel-yaml 0.19.0 introduced a new dependency on ruamel-yaml-clibz. The toolkit specifies ruamel-yaml>=0.18.14 in pyproject.toml, which pip resolves to 0.19.0 (latest). The slim base image lacks build tools.

Workaround: Pin ruamel.yaml<0.19 in requirements.txt before the toolkit:

ruamel.yaml<0.19
bedrock-agentcore-starter-toolkit
Suggested Fix: Update pyproject.toml:

- "ruamel-yaml>=0.18.14",
+ "ruamel-yaml>=0.18.14,<0.19",

Contributor guide

Open the contributing guide

Research direction

Update the ruamel-yaml constraint in pyproject.toml, changing the lower-bound-only requirement to one that excludes version 0.19. Start by checking the dependency declaration and reproduce the failure with agentcore launch using the slim Docker image. Done means the dependency resolves without ruamel-yaml-clibz compilation and the container build completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, devops
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.