[RFC PATCH 2/5] tests/docker/dockerfiles/ubuntu2004: Add missing symlink for cc

Thomas Huth posted 5 patches 4 years, 10 months ago
Maintainers: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Willian Rampazzo <willianr@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Thomas Huth <thuth@redhat.com>
[RFC PATCH 2/5] tests/docker/dockerfiles/ubuntu2004: Add missing symlink for cc
Posted by Thomas Huth 4 years, 10 months ago
For some reasons, the "cc" symlink is missing in Ubuntu 20.04.
Add it manually.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/docker/dockerfiles/ubuntu2004.docker | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 9750016e51..e1b309e313 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -74,3 +74,6 @@ ENV FEATURES clang tsan pyyaml sdl2
 # Apply patch https://reviews.llvm.org/D75820
 # This is required for TSan in clang-10 to compile with QEMU.
 RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h
+
+# The symlink for cc is missing on Ubuntu
+RUN cd /usr/lib/ccache && ln -s ../../bin/ccache cc
-- 
2.27.0


Re: [RFC PATCH 2/5] tests/docker/dockerfiles/ubuntu2004: Add missing symlink for cc
Posted by Philippe Mathieu-Daudé 4 years, 10 months ago
On 4/14/21 10:19 AM, Thomas Huth wrote:
> For some reasons, the "cc" symlink is missing in Ubuntu 20.04.
> Add it manually.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/docker/dockerfiles/ubuntu2004.docker | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
> index 9750016e51..e1b309e313 100644
> --- a/tests/docker/dockerfiles/ubuntu2004.docker
> +++ b/tests/docker/dockerfiles/ubuntu2004.docker
> @@ -74,3 +74,6 @@ ENV FEATURES clang tsan pyyaml sdl2
>  # Apply patch https://reviews.llvm.org/D75820
>  # This is required for TSan in clang-10 to compile with QEMU.
>  RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h
> +
> +# The symlink for cc is missing on Ubuntu

Maybe precise the version: "on Ubuntu 20.04" so we can remove
when upgrading to the next release?

> +RUN cd /usr/lib/ccache && ln -s ../../bin/ccache cc

No need to change current directory:

   RUN ln -s ../../bin/ccache /usr/lib/ccache/cc

Or use absolute (but if other use relative, better keep relative,
I haven't check):

   RUN ln -s /usr/bin/ccache /usr/lib/ccache/cc