github / glb-director

GitHub Load Balancer Director and supporting tooling.
Other
2.37k stars 227 forks source link

cibuild-create-packages fails to prepare the Docker build environment with a broken packages error #109

Closed jstangroome closed 4 years ago

jstangroome commented 4 years ago

script/cibuild-create-packages prepares the Docker build environment: https://github.com/github/glb-director/blob/538790853dd5c41f794917c2eb3c08e80de78585/script/cibuild-create-packages#L12

The Docker build fails on the llvm install step: https://github.com/github/glb-director/blob/538790853dd5c41f794917c2eb3c08e80de78585/script/Dockerfile.stretch#L28

The output from the llvm install step is:

+ apt-get install -y clang-9 lldb-9 lld-9 clangd-9
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 clang-9 : Depends: libclang-common-9-dev (= 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106) but it is not going to be installed
 clangd-9 : Depends: libclang-common-9-dev (= 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 9' returned a non-zero code: 100

The problem is likely a more general issue installing llvm in a debian:stretch container since this greatly simplified Dockerfile reproduces the exact same error:

FROM debian:stretch
RUN apt-get update && apt-get -y install apt-transport-https build-essential software-properties-common wget
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 9

It seems the implied llvm-9-tools dependency may be the core of the issue:

$ apt-get -o Debug::pkgProblemResolver=yes install clang-9 lldb-9 lld-9 clangd-9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) llvm-9-tools:amd64 < none -> 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un uN Ib >
Broken llvm-9-tools:amd64 Breaks on libclang-common-9-dev:amd64 < none -> 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un uN > (< 1:9.0.1~+rc2)
  Considering libclang-common-9-dev:amd64 0 as a solution to llvm-9-tools:amd64 2
  Added libclang-common-9-dev:amd64 to the remove list
  Fixing llvm-9-tools:amd64 via keep of libclang-common-9-dev:amd64
Investigating (1) clangd-9:amd64 < none -> 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un puN Ib >
Broken clangd-9:amd64 Depends on libclang-common-9-dev:amd64 < none | 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un uH > (= 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106)
  Considering libclang-common-9-dev:amd64 0 as a solution to clangd-9:amd64 9999
  Re-Instated libclang-common-9-dev:amd64
Investigating (1) llvm-9-tools:amd64 < none -> 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un uN Ib >
Broken llvm-9-tools:amd64 Breaks on libclang-common-9-dev:amd64 < none -> 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un uN > (< 1:9.0.1~+rc2)
  Considering libclang-common-9-dev:amd64 0 as a solution to llvm-9-tools:amd64 2
  Added libclang-common-9-dev:amd64 to the remove list
  Fixing llvm-9-tools:amd64 via keep of libclang-common-9-dev:amd64
Investigating (2) clangd-9:amd64 < none -> 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un puN Ib >
Broken clangd-9:amd64 Depends on libclang-common-9-dev:amd64 < none | 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un uH > (= 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106)
  Considering libclang-common-9-dev:amd64 0 as a solution to clangd-9:amd64 9999
Investigating (2) clang-9:amd64 < none -> 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un puN Ib >
Broken clang-9:amd64 Depends on libclang-common-9-dev:amd64 < none | 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106 @un uH > (= 1:9~+20200403104614+c1a0a213378-1~exp1~20200403085153.106)
  Considering libclang-common-9-dev:amd64 0 as a solution to clang-9:amd64 9999
Done

However, I don't know LLVM well, nor glb-director's usage of LLVM, to know what is the appropriate way forward to resolve the build failure.

jstangroome commented 4 years ago

It appears the Github Actions on this repository fail for the same reason: https://github.com/github/glb-director/runs/787030846