Skip to content

Conversation

@bthomee
Copy link
Contributor

@bthomee bthomee commented Jan 6, 2026

The change modifies the Debian, RHEL, and Ubuntu images to build from source.

As suggested in #90 (review), I first explored using the GCC image as a base to build ccache, and then copy it into the final GCC and Clang images. However, this resulted in two issues:

  1. The Clang images would need to build the GCC base image first, which would result in additional work.
  2. The Clang images would need to be provided with a GCC version to use.

I considered building a wholly separate image, e.g. a tools-rippled-ccache, to use as base image in which GCC would be installed and then ccache built from source, upon which it could be copied into the distro images. However, this has its own drawbacks:

  1. The CI pipeline currently runs all builds in parallel, so it is not set up to handle dependencies between images. This would then result in failures until the ccache image is built and pushed.
  2. Future updates to the ccache image would lead to unexpected issues. Namely, if you were to change the ccache version, the old image would still used due to issue 1. above, so you'd need to first merge the change, and then rerun the pipelines afterwards so the distro images actually use the new ccache image.

(Note that we already have this issue with the GCC base image in the docker/gcc directory, used by Debian, so I prefer to not add more such cases.)

So, to keep things simple at the expense of duplication (of which there already is a bit; unfortunately Docker doesn't support importing a bunch of instructions from another Dockerfile), I build ccache from source in both the GCC and Clang final images.

Note that the gold linker in RHEL 8 is so old that it doesn't support a compiler flag used by ccache, so I've configured it to use the default linker instead.

@bthomee bthomee requested a review from mathbunnyru January 6, 2026 22:22
Copy link
Collaborator

@mathbunnyru mathbunnyru left a comment

Choose a reason for hiding this comment

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

May I please ask you to work on removing duplication in the nearest future? (in the separate PR)
Guaranteed 3x and sometimes 6x duplication is not great at all

@bthomee
Copy link
Contributor Author

bthomee commented Jan 7, 2026

May I please ask you to work on removing duplication in the nearest future? (in the separate PR) Guaranteed 3x and sometimes 6x duplication is not great at all

Yes. I'll need to ponder a bit over how to best do this.

@bthomee bthomee merged commit cc09fd3 into main Jan 7, 2026
70 checks passed
@bthomee bthomee deleted the bthomee/source branch January 7, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants