Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slade 3.2.5+ does not start when installing from deb on Debian, missing libwebkit2gtk-4.0-37 #1745

Closed
jwaffe75 opened this issue Oct 25, 2024 · 4 comments
Labels

Comments

@jwaffe75
Copy link

jwaffe75 commented Oct 25, 2024

SLADE Version

3.2.5

OS

Linux

Steps to Reproduce and Observed Behavior

  1. Install Slade from the apt repo on http://debian.drdteam.org/ on Debian 12 using apt install slade
  2. It doesn't start because it's missing libwebkit2gtk-4.0-37

If I manually do

sudo apt install libwebkit2gtk-4.0-37

It works, so maybe there's an extra dependency that isn't listed in the deb.

This happens on both 3.2.5 and 3.2.6

@jwaffe75 jwaffe75 added the bug label Oct 25, 2024
@Blzut3
Copy link
Collaborator

Blzut3 commented Oct 26, 2024

The dependencies are correct, but /usr/bin/slade is running the wrong binary due to a difference between Debian and Ubuntu. This will be addressed in the next release, but in the mean time you can edit /usr/bin/slade to explicitly reference /sbin/ldconfig instead of expecting ldconfig to be on the PATH. (The solution you determined also works fine, although you'll probably want to remember to uninstall it after the next Slade release.) See also: #1672 (comment)

@Blzut3 Blzut3 closed this as completed Oct 26, 2024
@jwaffe75
Copy link
Author

jwaffe75 commented Oct 26, 2024

Oh I see, that's interesting. Thanks for the info.

So it's not that the library wasn't installed, it's that ldconfig wasn't accessible to non-root.

I wonder why installing the package fixed it, though.

Also just to make sure I understand, Debian 12 users should be using slade.legacy right?

@Blzut3
Copy link
Collaborator

Blzut3 commented Oct 26, 2024

ldconfig doesn't require root. It's just only, by default, in the PATH for root. So if you run /sbin/ldconfig instead of ldconfig it works.

The difference between slade.legacy and slade binaries is that the former is linked with webkit2gtk 4.0, the latter 4.1. Since Debian 12 provides 4.1 you should be using the non-legacy binary. But the check performed to see if your system has 4.1 installed fails and it tries to run the wrong binary.

The reason your fix works is because you made it irrelevant that the check failed since you can run the legacy binary if you happen to have webkit2gtk 4.0 installed.

@jwaffe75
Copy link
Author

jwaffe75 commented Oct 27, 2024

Okay thanks, that helps. I uninstalled libwebkit2gtk-4.0-37

For the sake of documenting the fix in the meantime, I went ahead and did this:

I edited /usr/bin/slade from

# Pick Ubuntu <24.04 binary vs Ubuntu >=22.04 binary
if [ -z "$(ldconfig -N -p | awk '$1 == "libwebkit2gtk-4.1.so.0"')" ]; then
    	SladeBin=slade.legacy
else
    	SladeBin=slade
fi

# Slade (probably wxWidgets) has issues with Wayland
GDK_BACKEND=x11 exec "/usr/share/slade/$SladeBin" "$@"

to

#!/bin/sh

# Pick Ubuntu <24.04 binary vs Ubuntu >=22.04 binary
# [75] ldconfig is not in PATH for Debian 12, so we need to give its full path.
if [ -z "$(/sbin/ldconfig -N -p | awk '$1 == "libwebkit2gtk-4.1.so.0"')" ]; then
        SladeBin=slade.legacy
else
        SladeBin=slade
fi

# Slade (probably wxWidgets) has issues with Wayland
GDK_BACKEND=x11 exec "/usr/share/slade/$SladeBin" "$@"

Now everything works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants