Skip to content

Commit 3448847

Browse files
committed
appimage build: build and include libxcb-util1
fixes #8011 > Upgraded from Appimage 4.1.5 to 4.3.2 on MX-Linux 19. > The new version fails to start with: > > ``` > $ electrum > qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. > This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may > fix this problem. > > Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb. > > Aborted (core dumped) > ``` debian 10 only distributes libxcb-util0. debian 11 distributes libxcb-util1. our base image atm is debian 10, so we build the package from source.
1 parent b619e2b commit 3448847

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

contrib/build-linux/appimage/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ COPY apt.preferences /etc/apt/preferences.d/snapshot
1717

1818
RUN apt-get update -q && \
1919
apt-get install -qy --allow-downgrades \
20+
sudo \
2021
git \
2122
wget \
2223
make \
2324
autotools-dev \
2425
autoconf \
2526
libtool \
2627
autopoint \
28+
pkg-config \
2729
xz-utils \
2830
libssl-dev \
2931
libssl1.1 \
@@ -41,9 +43,10 @@ RUN apt-get update -q && \
4143
gettext \
4244
libzbar0 \
4345
libdbus-1-3 \
46+
xutils-dev \
4447
libxkbcommon0 \
4548
libxkbcommon-x11-0 \
46-
libxcb1 \
49+
libxcb1-dev \
4750
libxcb-xinerama0 \
4851
libxcb-randr0 \
4952
libxcb-render0 \
@@ -56,6 +59,7 @@ RUN apt-get update -q && \
5659
libxcb-image0 \
5760
libxcb-keysyms1 \
5861
libxcb-util0 \
62+
#libxcb-util1 \
5963
libxcb-render-util0 \
6064
libx11-xcb1 \
6165
libc6-dev \

contrib/build-linux/appimage/make_appimage.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,34 @@ tar xf "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" -C "$BUILDDIR"
7171
cp -f "$PROJECT_ROOT/electrum/libsecp256k1.so.0" "$APPDIR/usr/lib/libsecp256k1.so.0" || fail "Could not copy libsecp to its destination"
7272

7373

74+
# note: libxcb-util1 is not available in debian 10 (buster), only libxcb-util0. So we build it ourselves.
75+
# This pkg is needed on some distros for Qt to launch. (see #8011)
76+
info "building libxcb-util1."
77+
XCB_UTIL_VERSION="acf790d7752f36e450d476ad79807d4012ec863b"
78+
# ^ git tag 0.4.0
79+
(
80+
cd "$CACHEDIR"
81+
mkdir "libxcb-util1"
82+
cd "libxcb-util1"
83+
if [ ! -d util ]; then
84+
git clone --recursive "https://anongit.freedesktop.org/git/xcb/util"
85+
fi
86+
cd util
87+
if ! $(git cat-file -e ${XCB_UTIL_VERSION}) ; then
88+
info "Could not find requested version $XCB_UTIL_VERSION in local clone; fetching..."
89+
git fetch --all
90+
git submodule update
91+
fi
92+
git reset --hard
93+
git clean -dfxq
94+
git checkout "${XCB_UTIL_VERSION}^{commit}"
95+
./autogen.sh
96+
./configure --enable-shared
97+
make -j4 -s || fail "Could not build libxcb-util1"
98+
cp "$CACHEDIR/libxcb-util1/util/src/.libs/libxcb-util.so.1" "$APPDIR/usr/lib/libxcb-util.so.1"
99+
) || fail "Could build libxcb-util1"
100+
101+
74102
appdir_python() {
75103
env \
76104
PYTHONNOUSERSITE=1 \

0 commit comments

Comments
 (0)