Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meld error “Cannot import: GTK+; DLL load failed" when launching meld.exe as external git difftool

I'm trying to use Meld as Git Difftool on Windows and was facing following issue:

Launch 'meld' [Y/n]? Y
Cannot import: GTK+
DLL load failed: Das angegebene Modul wurde nicht gefunden.

The following Python error occured:

cx_Freeze: Python error in main script

Traceback (most recent call last):
  File "bin/meld", line 205, in check_requirements
    import gi
  File "C:/msys64/MINGW32/lib/python3.7/site-packages/gi/__init__.py", line 42, in <module>
  File "ExtensionLoader_gi__gi.py", line 23, in <module>
  File "ExtensionLoader_gi__gi.py", line 15, in __bootstrap__
  File "C:/msys64/MINGW32/lib/python3.7/imp.py", line 342, in load_dynamic
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/msys64/MINGW32/lib/python3.7/site-packages\cx_Freeze/initscripts/__startup__.py", line 14, in run
  File "C:/msys64/MINGW32/lib/python3.7/site-packages\cx_Freeze/initscripts/Console.py", line 26, in run
  File "bin/meld", line 362, in <module>
    check_requirements()
  File "bin/meld", line 211, in check_requirements
    missing_reqs("GTK+", gtk_requirement, e)
  File "bin/meld", line 194, in missing_reqs
    show_error_and_exit(_("Cannot import: ") + mod + "\n" + str(exc))
  File "bin/meld", line 182, in show_error_and_exit
    raise Exception(error_text)
Exception: Cannot import: GTK+
DLL load failed: The specified module could not be found.

The same issue occures when I was trying to run meld.exe in git bash.

To use meld as difftool I changed the settings in user's gitconfig file:

[merge]
    tool = meld
[mergetool "meld"]  
    path = C:\\Program Files (x86)\\Meld\\meld.exe
[diff]
    tool = meld

This seems to be correct because git is trying to launch the meld.exe after using the command 'git difftool' in the workspace.

like image 604
Julia K. Avatar asked Dec 14 '22 10:12

Julia K.


1 Answers

Following lib-workaround helped to be able to launch the meld.exe as external git difftool:

Meld was expecting the certain dll-file called 'libgirepository-1.0-1.dll' in the wrong directory, the file libgirepository-1.0-1.dll needed to be copied from C:\Program Files (x86)\Meld\lib to the directory above C:\Program Files (x86)\Meld.

The result is that Meld is starting after the command 'git difftool' and after running the meld.exe in git bash, however, the following error occured:

2019-09-18 14:12:24,612 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.612: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,612 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.612: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,613 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.613: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,613 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.613: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,613 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.613: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,613 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.613: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,613 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.613: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,613 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.613: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,614 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.614: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,614 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.614: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,615 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.615: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,615 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.615: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,616 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.616: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,616 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.616: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,616 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.616: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,616 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.616: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,616 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.616: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,616 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.616: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,617 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.617: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:24,617 CRITICAL Gtk:
(meld.exe:20432): GLib-GIO-CRITICAL **: 14:12:24.617: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,202 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.201: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,203 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.203: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,203 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.203: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,203 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.203: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,204 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.204: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,204 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.204: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,205 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.205: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,205 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.205: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,205 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.205: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,206 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.206: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,207 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.207: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,499 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.499: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,499 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.499: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,499 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.499: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,499 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.499: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,499 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.499: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,500 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.500: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,500 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.500: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,500 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.500: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,500 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.500: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,500 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.500: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,501 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.501: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,538 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.538: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,540 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.540: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,540 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.540: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,542 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.541: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,542 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.542: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,543 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.543: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,543 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.543: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,543 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.543: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,543 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.543: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,543 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.543: g_content_type_is_a: assertion 'type != NULL' failed
2019-09-18 14:12:26,544 CRITICAL Gtk:
(org.gnome.meld:20432): GLib-GIO-CRITICAL **: 14:12:26.544: g_content_type_is_a: assertion 'type != NULL' failed
like image 89
Julia K. Avatar answered Dec 17 '22 22:12

Julia K.