Skip to content

Trouble creating AppImage for Claws Mail (also: Bug in quick-sharun.sh) #642

@bttrx

Description

@bttrx

Hi,

At first, regarding the bug in quick-sharun.sh: The code to build bwrap is never reached, if files $realbwrap and $target don't exist, which is always the case on a clean system. To fix that, I simply removed these lines:

	else
		# this should never happen, we are gonna exit without error however
		# since maybe older versions of webkit2gtk can be installed without bwrap?
		_err_msg "Something went very wrong here because bwrap was not deployed"
		return 0

Regarding my problem: I'm trying to build an AppImage for Claws Mail - The user-friendly, lightweight, and fast e-mail client version 4.4.0 on a Linux Mint 22 MATE virtual machine I had at hand. This is my first AppImage at all.

I used ./configure --prefix=/usr on Claws Mail (CM) and built CM including all plugins. CM plugins are .so files and can be loaded from within CM successfully. ☺️ However, when enabling fancy.so ("Renders HTML e-mail using the WebKit library") and trying to view the HTML part of an e-mail or an RSS/Atom feed, CM always crashes with this message:

** (claws-mail:1781008): ERROR **: 21:11:22.744: Unable to spawn a new child process: Failed to spawn child process “/tmp/IL=/x86_64-linux-gnu/webkit2gtk-4.1/WebKitNetworkProcess” (No such file or directory)

WebKitNetworkProcess files exist in:

find ./AppDir -name "*WebKitNetworkProcess*"
./AppDir/bin/WebKitNetworkProcess
./AppDir/shared/bin/WebKitNetworkProcess
./AppDir/shared/lib/webkit2gtk-4.1/WebKitNetworkProcess

and:

/tmp/.mount_Clawsremp10177115549921227055/bin/WebKitNetworkProcess
/tmp/.mount_Clawsremp10177115549921227055/shared/bin/WebKitNetworkProcess
/tmp/.mount_Clawsremp10177115549921227055/shared/lib/webkit2gtk-4.1/WebKitNetworkProcess

...when started.

I already read, WebKit (or webkit2gtk) is "a bit special", but maybe you could have a look. I uploaded the AppImage at https://www.bttr-software.de/tmp/ClawsMail-x86_64.AppImage (not very lightweight 200MB).

My make-appimage.sh:

#!/bin/sh
set -eux

ARCH="$(uname -m)"
SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/quick-sharun.sh"

# Configure the AppImage
export ICON=/usr/share/icons/hicolor/128x128/apps/claws-mail.png
export DESKTOP=/usr/share/applications/claws-mail.desktop
export OUTPATH=./dist
export OUTNAME=ClawsMail-"$ARCH".AppImage
export DEPLOY_GTK=1
export DEPLOY_WEBKIT2GTK=1
export WEBKIT2GTK_DIR=/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1

# Download and run quick-sharun
#wget "$SHARUN" -O ./quick-sharun
chmod +x ./quick-sharun

# Bundle the application
./quick-sharun \
    /usr/*/claws-mail \
    /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so*

# Create the AppImage
./quick-sharun --make-appimage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions