hkdb / Densify

A GTK+ GUI Application written in Python that simplifies compressing PDF files with Ghostscript
MIT License
88 stars 24 forks source link

Densify does not start #15

Open 1Maxnet1 opened 1 week ago

1Maxnet1 commented 1 week ago

I just gave the new release 0.3.2 a try, but wasn't able to start it. When executing the appimage in the console, I get the following error:

** (densify:15034): WARNING **: 10:11:56.585: Failed to load shared library 'libgtk-3.so.0' referenced by the typelib: /tmp/.mount_DensifRvwjf5/usr/conda/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/libicuuc.so.75)
Traceback (most recent call last):
  File "/tmp/.mount_DensifRvwjf5/opt/Densify/densify", line 27, in <module>
    from gi.repository import Gtk, GObject
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 921, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 813, in module_from_spec
  File "/tmp/.mount_DensifRvwjf5/usr/conda/lib/python3.12/site-packages/gi/importer.py", line 147, in create_module
    dynamic_module = load_overrides(introspection_module)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_DensifRvwjf5/usr/conda/lib/python3.12/site-packages/gi/overrides/__init__.py", line 112, in load_overrides
    override_mod = importlib.import_module(override_package_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_DensifRvwjf5/usr/conda/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_DensifRvwjf5/usr/conda/lib/python3.12/site-packages/gi/overrides/Gtk.py", line 100, in <module>
    class Widget(Gtk.Widget):
                 ^^^^^^^^^^
  File "/tmp/.mount_DensifRvwjf5/usr/conda/lib/python3.12/site-packages/gi/module.py", line 177, in __getattr__
    interfaces = tuple(interface for interface in get_interfaces_for_object(info)
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_DensifRvwjf5/usr/conda/lib/python3.12/site-packages/gi/module.py", line 99, in get_interfaces_for_object
    interfaces.append(getattr(module, name))
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_DensifRvwjf5/usr/conda/lib/python3.12/site-packages/gi/overrides/__init__.py", line 31, in __getattr__
    return getattr(self._introspection_module, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_DensifRvwjf5/usr/conda/lib/python3.12/site-packages/gi/module.py", line 217, in __getattr__
    wrapper = metaclass(name, bases, dict_)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_DensifRvwjf5/usr/conda/lib/python3.12/site-packages/gi/types.py", line 247, in __init__
    register_interface_info(cls.__info__.get_g_type())
TypeError: must be an interface

Any suggestions what could be wrong?

hkdb commented 1 week ago

What distro and version are you running?

Not that it should matter since it's an AppImage but just to eliminate the possibilities, is libgtk-3-0 or the equivalent package name in your distro installed on your system?

1Maxnet1 commented 1 week ago

What distro and version are you running?

I'm running an up-to-date Manjaro Linux KDE Plasma on Wayland.

Not that it should matter since it's an AppImage but just to eliminate the possibilities, is libgtk-3-0 or the equivalent package name in your distro installed on your system?

I guess this is the gtk3 package, which is installed.

hkdb commented 1 week ago

Thanks! Let me look into it!

hkdb commented 1 week ago

I tried to bundle libgtk3 into the AppImage with linuxdeploy-plugin-gtk but there's an outstanding issue right now that could be related to why AppImages built with it are not launching (ie. pixbuf dependency issue). Plus, doing that will make the AppImage 130MB which is not that desirable.

I did however realize that pycairo was not included in the Python dependencies to bundle for the current v0.3.2 AppImage. So I did one with pycairo. Can you see if this works? If it does, then we can just forget about bundling libgtk3.

Densify-v0.3.2-test-x86_64.AppImage

Thanks!

hkdb commented 1 week ago

Nevermind... I actually just tried on Garuda running Hyprland and got the same errors. Looks like I will have to take more time to figure out how to resolve this....

But FWIW, cloning the repo and installing it with install.sh instead of using the AppImage works just fine....

hkdb commented 1 week ago

@1Maxnet1 So I went through a gut wrenching deeper dive into figuring out how to bundle what's missing and I think I have come up with a much better build. However, while it launches across board, the actual compressing might not work for Arch based distros. I tried on Pop OS and Suse which both worked perfectly but for some reason, on Garuda, there are some gs errors which I haven't figured out yet what it's about. Could you try the latest AppImage and tell me if it's the same for you?

Densify-v0.3.2-x86_64.AppImage

Thanks!

1Maxnet1 commented 1 week ago

@1Maxnet1 So I went through a gut wrenching deeper dive into figuring out how to bundle what's missing and I think I have come up with a much better build. However, while it launches across board, the actual compressing might not work for Arch based distros. I tried on Pop OS and Suse which both worked perfectly but for some reason, on Garuda, there are some gs errors which I haven't figured out yet what it's about. Could you try the latest AppImage and tell me if it's the same for you?

Densify-v0.3.2-x86_64.AppImage

Thanks!

Yeah, I tried the linked Appimage as well and this is what I get:

Gtk-Message: 13:57:45.506: Failed to load module "colorreload-gtk-module"
Gtk-Message: 13:57:45.506: Failed to load module "window-decorations-gtk-module"
/usr/bin/gs: symbol lookup error: /usr/lib/libtiff.so.6: undefined symbol: jpeg12_write_raw_data, version LIBJPEG_8.0
Traceback (most recent call last):
  File "/tmp/.mount_DensifIs5Ngw/opt/Densify/densify", line 309, in on_button_clicked
    oFileSizeRaw = os.path.getsize(oFile)
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen genericpath>", line 62, in getsize
FileNotFoundError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/home/max/Dokumente/Studium/SA/Vorlesung/compressed.pdf'

** (densify:6877): WARNING **: 13:58:10.870: atk-bridge: get_device_events_reply: unknown signature