Skip to content

Commit 8514130

Browse files
committed
Avoid spurious libgcc-s1 Debian package dependency on Ubuntu 18.04
GitHub actions have GCC 10 available, which resulted in GCC libraries being upgraded as well. Forcibly downgrade this to Bionic's (18.04) native version, removing GCC 9 and 10 along the way. Using `container: ubuntu:18.04` would potentially be a cleaner solution, but our use of submodules requires Git >= 2.18, which isn't in Ubuntu 18.04. So we'd need to start mixing version along a different path. Fixes: #5875
1 parent 7f998c4 commit 8514130

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

.github/workflows/pull-request-checks.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ jobs:
375375
run: |
376376
sudo apt-get update
377377
sudo apt-get install --no-install-recommends -y g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
378+
# remove libgcc-s1, which isn't normally available in Ubuntu 18.04
379+
target=$(dpkg-query -W --showformat='${Version}\n' gcc-8-base | head -n 1)
380+
# libgcc1 uses an epoch, thus the extra 1:
381+
sudo apt-get install -y --allow-downgrades --reinstall gcc g++ libgcc-s1- libstdc++6=$target liblsan0=$target libtsan0=$target libcc1-0=$target libgcc1=1:$target
378382
- name: Prepare ccache
379383
uses: actions/cache@v2
380384
with:

.github/workflows/release-packages.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ jobs:
6969
with:
7070
submodules: recursive
7171
- name: Fetch dependencies
72-
run: sudo apt-get install --no-install-recommends -y g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
72+
run: |
73+
sudo apt-get install --no-install-recommends -y g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
74+
# remove libgcc-s1, which isn't normally available in Ubuntu 18.04
75+
target=$(dpkg-query -W --showformat='${Version}\n' gcc-8-base | head -n 1)
76+
# libgcc1 uses an epoch, thus the extra 1:
77+
sudo apt-get install -y --allow-downgrades --reinstall gcc g++ libgcc-s1- libstdc++6=$target liblsan0=$target libtsan0=$target libcc1-0=$target libgcc1=1:$target
7378
- name: Prepare ccache
7479
uses: actions/cache@v2
7580
with:

cmake/packaging.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS YES)
2727
# In addition, we depend on gcc for preprocessing
2828
set(CPACK_DEBIAN_PACKAGE_DEPENDS gcc)
2929

30+
# Enable debug output so that we can see the dependencies being generated in the
31+
# logs
32+
set(CPACK_DEBIAN_PACKAGE_DEBUG YES)
33+
3034
# For windows we need to set up product and update GUID
3135
# See: https://docs.microsoft.com/en-us/windows/win32/msi/productcode
3236
# and https://docs.microsoft.com/en-us/windows/win32/msi/upgradecode

0 commit comments

Comments
 (0)