Mingw-packages: meld Cannot import: GTK+

Created on 2 May 2018  路  15Comments  路  Source: msys2/MINGW-packages

got this error while runing mingw64/mingw-w64-x86_64-meld3 3.19.0-2:

Couldn't bind the translation domain. Some translations won't work.
[WinError 126] The specified module could not be found
Cannot import: GTK+
DLL load failed: The specified procedure could not be found.

Most helpful comment

Probably a Meld issue. Here's their issue and a possible workaround

https://gitlab.gnome.org/GNOME/meld/issues/267

What works for me: copy Meld/lib/libgirepository-1.0-1.dll to one folder up (next to Meld.exe).

https://gitlab.gnome.org/GNOME/meld/issues/267#note_448659

All 15 comments

@seanlis can you try again with all packages updated (pacman -Suy)

Hi,

I've tried again with all packages updated, got the same error.

ok, thanks

Same error with Meld-3.20.0-mingw

Same error with Meld-3.20.0-mingw

Seconded.

Same error with Meld-3.20.0-mingw

Seconded.

Thirded. Trying to use Meld as an intermediate betweeen Sourcetree -UnityYAML->Meld->Sourcetree

Probably a Meld issue. Here's their issue and a possible workaround

https://gitlab.gnome.org/GNOME/meld/issues/267

What works for me: copy Meld/lib/libgirepository-1.0-1.dll to one folder up (next to Meld.exe).

https://gitlab.gnome.org/GNOME/meld/issues/267#note_448659

Unlikely, in MSYS2 both files are in the same directory already.

Same issue here, 3.20.0. Copying Meld/lib/libgirepository-1.0-1.dll to Meld indeed works as a workaround. Meld.exe was not in the same directory as libgirepository-1.0-1.dll.

Are we talking about MSYS2 here? There is no meld.exe, just a Python script and libgirepository is in <prefix>/bin

This is for those that arrived here with a meld installation (no MINGW) from the link shared above by @shihrer ; triggering meld from the command line works just fine after _also_ adding this dir to your path, guess will be the same for other tools that use it...

meld works fine with "Git Bash" shell under windows (from any directory), when you add both "C:\Program Files (x86)\Meld" and "C:\Program Files (x86)\Meld\lib" to your PATH environmental variable.

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.

---------------------------
OK   
---------------------------

I've added only C:\Program Files (x86)\Meld\lib to my Path user variable, and now Meld works fine.

Thanks for the resolution.
Just to reiterate: adding both C:\tools\Meld and C:\tools\Meld\lib to the path does solve the problem.

Since this is not MSYS2 related, closing.

For anyone finding this: In case you have installed Meld through an installer or similar then look above for possible workarounds.

For what it's worth.

I manually added 'C:\Program Files(x86)\Meld' to the path, and every time I started Meld from git Meld would crash.

After I also added "C:\Program Files(x86)\Meld\lib" it started working as expected.

Was this page helpful?
0 / 5 - 0 ratings