Skip to content

Ubuntu 24.04 Installation and Execution Issues #4

@stephanschielke

Description

@stephanschielke

Summary

PhotoGlimmer fails to launch on Ubuntu 24.04 due to PySide2/Qt library compatibility issues, affecting both source code execution and AppImage distribution.

Environment Details

  • Operating System: Ubuntu 24.04 (Linux 6.12.10-76061203-generic)
  • Python Version: 3.10.18 (managed via mise)

Error Description

Primary Error

ImportError: ~/.local/share/mise/installs/python/3.10.18/lib/python3.10/site-packages/PySide2/QtUiTools.so: undefined symbol: _ZdlPvm, version Qt_5

Error Context

  • Occurs when: Importing PySide2.QtUiTools.QUiLoader
  • Affects: Both source code execution and AppImage distribution
  • Location: PhotoGlimmer UI initialization in photoglimmer_ui.py

Full Error Traceback

Traceback (most recent call last):
  File "~/Code/PhotoGlimmer/src/photoglimmer/app.py", line 17, in <module>
    from .photoglimmer_ui import PhotoGlimmerMainWindow
  File "~/Code/PhotoGlimmer/src/photoglimmer/photoglimmer_ui.py", line 11, in <module>
    from PySide2.QtUiTools import QUiLoader
ImportError: ~/.local/share/mise/installs/python/3.10.18/lib/python3.10/site-packages/PySide2/QtUiTools.so: undefined symbol: _ZdlPvm, version Qt_5

Steps to Reproduce

  1. Install Ubuntu 24.04
  2. Set up Python 3.10.18 (via mise)
  3. Install PySide2 5.15.2.1 via pip
  4. Attempt to run PhotoGlimmer from source: python -m photoglimmer
  5. Alternatively, try running the AppImage distribution

Troubleshooting Steps Attempted

1. Environment Verification

  • ✅ Confirmed Python version (3.10.18) and virtual environment setup
  • ✅ Verified PySide2 and Shiboken2 versions (both 5.15.2.1)
  • ✅ Checked Python path points to correct mise-managed installation

2. Qt Library Management

  • ✅ Initially attempted Qt6 removal: sudo apt-get remove --purge 'libqt6*'
    • Note: Required quotes due to zsh glob pattern handling
  • ✅ Successfully removed Qt6 libraries from system
  • ✅ Confirmed only Qt5 libraries remain installed

3. PySide2 Reinstallation Attempts

  • ✅ Multiple pip uninstall/install cycles for PySide2 and Shiboken2
  • ✅ Attempted installation from different sources
  • ❌ All reinstallation attempts failed to resolve the issue

4. System Library Verification

  • ✅ Confirmed Qt6 libraries were successfully removed
  • ✅ Verified system Qt5 libraries are present
  • ❌ ABI compatibility issues persist

Root Cause Analysis

Technical Analysis

The error undefined symbol: _ZdlPvm, version Qt_5 indicates an ABI (Application Binary Interface) incompatibility between:

  • PySide2 5.15.2.1 expecting specific Qt5 symbol definitions
  • Ubuntu 24.04's Qt library configuration providing incompatible symbols

Symbol Analysis

  • _ZdlPvm is a mangled C++ symbol related to Qt5 memory management
  • The symbol exists but with incompatible versioning/ABI signature
  • This suggests Ubuntu 24.04's Qt5 libraries have ABI changes that break PySide2 compatibility

Distribution Impact

  • Source Code: Fails to execute due to PySide2 import issues
  • AppImage: Should be self-contained but appears affected by host system Qt libraries
  • deb Package: Would likely face the same Qt compatibility issues

Proposed Solutions

Short-term Workarounds

  1. Use Ubuntu 22.04: Recommend users stick with Ubuntu 22.04 LTS
  2. Docker Container: Provide Ubuntu 22.04-based Docker image
  3. Conda Environment: Use conda-forge PySide2 packages which may have better compatibility

Long-term Solutions

  1. Migrate to PySide6:

  2. Improve AppImage Bundling:

    • Ensure Qt libraries are properly bundled in AppImage
    • Static linking of Qt dependencies where possible
    • Test AppImage isolation on various distributions

Additional Notes

Environment Dependencies

PhotoGlimmer's current dependency on PySide2 5.15.2.1 creates a constraint that conflicts with Ubuntu 24.04's Qt library ecosystem. This is a common issue affecting many Qt/PySide2 applications on newer Ubuntu releases.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions