appimage build: build and include libxcb-util1
fixes https://github.com/spesmilo/electrum/issues/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.
This commit is contained in:
@@ -17,6 +17,7 @@ COPY apt.preferences /etc/apt/preferences.d/snapshot
|
||||
|
||||
RUN apt-get update -q && \
|
||||
apt-get install -qy --allow-downgrades \
|
||||
sudo \
|
||||
git \
|
||||
wget \
|
||||
make \
|
||||
@@ -24,6 +25,7 @@ RUN apt-get update -q && \
|
||||
autoconf \
|
||||
libtool \
|
||||
autopoint \
|
||||
pkg-config \
|
||||
xz-utils \
|
||||
libssl-dev \
|
||||
libssl1.1 \
|
||||
@@ -41,9 +43,10 @@ RUN apt-get update -q && \
|
||||
gettext \
|
||||
libzbar0 \
|
||||
libdbus-1-3 \
|
||||
xutils-dev \
|
||||
libxkbcommon0 \
|
||||
libxkbcommon-x11-0 \
|
||||
libxcb1 \
|
||||
libxcb1-dev \
|
||||
libxcb-xinerama0 \
|
||||
libxcb-randr0 \
|
||||
libxcb-render0 \
|
||||
@@ -56,6 +59,7 @@ RUN apt-get update -q && \
|
||||
libxcb-image0 \
|
||||
libxcb-keysyms1 \
|
||||
libxcb-util0 \
|
||||
#libxcb-util1 \
|
||||
libxcb-render-util0 \
|
||||
libx11-xcb1 \
|
||||
libc6-dev \
|
||||
|
||||
@@ -71,6 +71,34 @@ tar xf "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" -C "$BUILDDIR"
|
||||
cp -f "$PROJECT_ROOT/electrum/libsecp256k1.so.0" "$APPDIR/usr/lib/libsecp256k1.so.0" || fail "Could not copy libsecp to its destination"
|
||||
|
||||
|
||||
# note: libxcb-util1 is not available in debian 10 (buster), only libxcb-util0. So we build it ourselves.
|
||||
# This pkg is needed on some distros for Qt to launch. (see #8011)
|
||||
info "building libxcb-util1."
|
||||
XCB_UTIL_VERSION="acf790d7752f36e450d476ad79807d4012ec863b"
|
||||
# ^ git tag 0.4.0
|
||||
(
|
||||
cd "$CACHEDIR"
|
||||
mkdir "libxcb-util1"
|
||||
cd "libxcb-util1"
|
||||
if [ ! -d util ]; then
|
||||
git clone --recursive "https://anongit.freedesktop.org/git/xcb/util"
|
||||
fi
|
||||
cd util
|
||||
if ! $(git cat-file -e ${XCB_UTIL_VERSION}) ; then
|
||||
info "Could not find requested version $XCB_UTIL_VERSION in local clone; fetching..."
|
||||
git fetch --all
|
||||
git submodule update
|
||||
fi
|
||||
git reset --hard
|
||||
git clean -dfxq
|
||||
git checkout "${XCB_UTIL_VERSION}^{commit}"
|
||||
./autogen.sh
|
||||
./configure --enable-shared
|
||||
make -j4 -s || fail "Could not build libxcb-util1"
|
||||
cp "$CACHEDIR/libxcb-util1/util/src/.libs/libxcb-util.so.1" "$APPDIR/usr/lib/libxcb-util.so.1"
|
||||
) || fail "Could build libxcb-util1"
|
||||
|
||||
|
||||
appdir_python() {
|
||||
env \
|
||||
PYTHONNOUSERSITE=1 \
|
||||
|
||||
Reference in New Issue
Block a user