meld
meld copied to clipboard
py2app error starting Meld on Mojave from command line
I have installed meld 3.19.2-r6,osx-15 from Homebrew, and get the following error when launching from the command line:
py2app stub executable has encountered a fatal error, and will now terminate.
The Info.plist file must have a PyRuntimeLocations array containing string values for preferred Python runtime locations. These strings should be "otool -L" style mach ids; "@executable_stub" and "~" prefixes will be translated accordingly.
Launching Meld from Finder works fine.
Any ideas what's wrong here?
Instead of using a symlink, try using an alias.
alias meld=/Applications/..path../Meld
On Thu, Jan 3, 2019 at 1:44 PM Stuart Knightley [email protected] wrote:
I have installed meld 3.19.2-r6,osx-15 from Homebrew, and get the following error when launching from the command line:
py2app stub executable has encountered a fatal error, and will now terminate.
The Info.plist file must have a PyRuntimeLocations array containing string values for preferred Python runtime locations. These strings should be "otool -L" style mach ids; "@executable_stub" and "~" prefixes will be translated accordingly.
Launching Meld from Finder works fine.
Any ideas what's wrong here?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yousseb/meld/issues/77, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgDipieUUWADcFUdFSM3tsXYhFkcSi7ks5u_nmjgaJpZM4Zoz81 .
Thank you!
It now "launches", but there's only a dock icon, which when clicked shows the Meld menu in the menubar, but no Meld window appears. Clicking "New Comparison..." doesn't do anything.
Try running meld —help One time. The next time it will work
On Thu, Jan 3, 2019 at 1:57 PM Stuart Knightley [email protected] wrote:
Thank you!
It now "launches", but there's only a dock icon, which when clicked shows the Meld menu in the menubar, but no Meld window appears. Clicking "New Comparison..." doesn't do anything.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/yousseb/meld/issues/77#issuecomment-451290637, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgDikUbbk6O2zGIbpam60eQOydK0n-Rks5u_nzmgaJpZM4Zoz81 .
I gave that a go, restarted, tried again, and unfortunately it's still in the same state as above.
Why symlink is crashing? 😢 It was working just fine before...
Anyway, I found solution to make git difftool
work properly with meld
on Mac OS Mojave:
Use this in ~/.gitconfig
:
[diff]
tool = meld
[mergetool "meld"]
path = /Applications/Meld.app/Contents/MacOS/Meld
I have installed meld 3.19.2-r6,osx-15 from Homebrew, and get the following error when launching from the command line:
py2app stub executable has encountered a fatal error, and will now terminate. The Info.plist file must have a PyRuntimeLocations array containing string values for preferred Python runtime locations. These strings should be "otool -L" style mach ids; "@executable_stub" and "~" prefixes will be translated accordingly.
Launching Meld from Finder works fine.
Any ideas what's wrong here?
install by brew ,get same error
meld[15055:76740] The Info.plist file must have a PyRuntimeLocations array containing string values for preferred Python runtime locations. These strings should be "otool -L" style mach ids; "@executable_stub" and "~" prefixes will be translated accordingly.
there is something wrong with /usr/local/bin/meld
use open -W -a Meld --args $FILE1 $FILE2 $FILE3
to compare files
or create a new /usr/local/bin/meld
with below content
#!/bin/bash
open -W -a Meld --args $@
Why symlink is crashing? 😢 It was working just fine before...
Anyway, I found solution to make
git difftool
work properly withmeld
on Mac OS Mojave: Use this in~/.gitconfig
:[diff] tool = meld [mergetool "meld"] path = /Applications/Meld.app/Contents/MacOS/Meld
work fine with this config
[diff]
tool = meld
external = git-meld.sh
[difftool]
prompt = false
[difftool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args \"$LOCAL\" \"$PWD/$REMOTE\"
[merge]
tool = meld
[mergetool]
prompt = false
[mergetool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"
Well, git has some knowledge about meld by default, and I wanted to make use of it as much as possible, without using any extra scripts or configs. By default, git is trying to find meld from path, but it crashes on Mojave. Setting just path as I did above makes it work for all modes: diff, merge, etc.
That said, real solution to this problem is fixing symlink to work again.
Well, git has some knowledge about meld by default, and I wanted to make use of it as much as possible, without using any extra scripts or configs. By default, git is trying to find meld from path, but it crashes on Mojave. Setting just path as I did above makes it work for all modes: diff, merge, etc.
That said, real solution to this problem is fixing symlink to work again.
another way is to downgrade to the old version
use
open -W -a Meld --args $FILE1 $FILE2 $FILE3
to compare files or create a new/usr/local/bin/meld
with below content#!/bin/bash open -W -a Meld --args $@
Your replacement /usr/local/bin/meld
suggestion does not work for me, as it converts all paths to root-oriented instead of pwd-oriented ("foo" becomes "/foo", "../foo" becomes "/foo", etc).
Using alias meld="/Applications/Meld.app/Contents/MacOS/Meld"
and just removing /usr/local/bin/meld
works correctly.
For the moment I have reverted to version 3.19.2-r3 to resolve the issue with the Meld window not appearing:
brew cask uninstall meld
brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/c7296b5939b9b785eaca28cca398d5634f7b960a/Casks/meld.rb
this variant of /usr/local/bin/meld
works for me:
#!/bin/sh
exec /Applications/Meld.app/Contents/MacOS/Meld "$@"
None of the variants above work. Best case is with the @mtjo's solution, where the menu bar appears a few seconds after running the command from the CLI, but no window appears.
Switching on fullscreen mode causes the whole screen to go black. Same problem using either one or two screens. With two screens, only one goes black, the one containing the menu bar.
When opening a comparison from the menu, the menu navigation works normally, but no window appears.
brew cask formula has been updated now. Simply re-installing solved the issue for me.
brew cask reinstall meld
Unfortunately pulling the latest forumla and reinstalling meld did not fix my issue :(
I’ll make this the highest priority of the next release. My apologies, but I’m terribly busy at the moment. Give it a week to ten days (crossing fingers).
On Sun, Feb 3, 2019 at 4:01 PM Stuart Knightley [email protected] wrote:
Unfortunately pulling the latest forumla and reinstalling meld did not fix my issue :(
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/yousseb/meld/issues/77#issuecomment-460101341, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgDik8rcj5hIuB_hjXLtHTBYNW4FEkMks5vJ3hbgaJpZM4Zoz81 .
No worries! Thank you for your hard work :)
Just for the record, with this Meld can be started from the Applications folder, but the "meld" command line is no longer available, making it pretty much unavailable. Maybe it is possible to create a symlink to something within the app, but which file ?
The file is /Applications/Meld.app/Contents/MacOS/Meld
but a symlink to that file does not work - apparently because the dynamic linking uses some relative paths and is confused, and the result is py2app PyRuntimeLocations error in the original report.
My technique posted above, of using a script instead of a symlink to invoke that Meld executable inside the application folder, works for me on macOS 10.13 High Sierra, but it is quite possible that it does not work on 10.12 or 10.14 (but I expect it should work for everyone on 10.13). I submitted the change to Hombrew-Cask which creates a script wrapper - and somewhat confusingly creates a symlink to the script wrapper inside the versioned cask folder in order to follow Homebrew conventions. So if you install the latest version of the Cask you should get something like this:
$ which meld
/usr/local/bin/meld
$ ls -l /usr/local/bin/meld
lrwxr-xr-x 1 yourname admin 57 Jan 19 03:28 /usr/local/bin/meld -> /usr/local/Caskroom/meld/3.19.2-r6,osx-15/meld.wrapper.sh
$ cat /usr/local/Caskroom/meld/3.19.2-r6,osx-15/meld.wrapper.sh
#!/bin/sh
exec '/Applications/Meld.app/Contents/MacOS/Meld' "$@"
If the meld
command is not working for you, I suggest reporting:
- version of macOS which you are running
- output of command:
which meld
- output of command:
ls -l $(which meld)
- output of command:
file $(which meld)
I'm getting the same as you for those commands:
/usr/local/bin/meld
lrwxr-xr-x 1 xxxx wheel 57 Feb 3 15:20 /usr/local/bin/meld -> /usr/local/Caskroom/meld/3.19.2-r6,osx-15/meld.wrapper.sh
/usr/local/bin/meld: POSIX shell script text executable, ASCII text
#!/bin/sh
exec '/Applications/Meld.app/Contents/MacOS/Meld' "$@"
Which version of macOS are you running? Are you still getting the original error text exactly?
Could you try modifying the script to something like:
#!/bin/sh
cd /Applications/Meld.app/Contents/MacOS
exec ./Meld "$@"
I'm on 10.14.2 (18C54). I'm no longer getting the original error, but this issue:
It now "launches", but there's only a dock icon, which when clicked shows the Meld menu in the menubar, but no Meld window appears. Clicking "New Comparison..." doesn't do anything. https://github.com/yousseb/meld/issues/77#issuecomment-451290637
I tried modifying the script, but still get the same issue :(
I see, sorry, the wrapper script only addresses the py2app PyRuntimeLocations thing.
To run meld from terminal without py2app error or app not showing up add this to your ~/.bash_profile:
alias meld="rm -r ~/.local/share/meld ~/Library/Preferences/org.gnome.meld.plist ~/Library/Saved\ Application\ State/org.gnome.meld.savedState/; /Applications/Meld.app/Contents/MacOS/Meld"
@aminasadi0 's alias works for normal meld usage 👍 .
However, the git integration doesn't work. I tried wrapping meld in a script named differently, but git knows about meld and rejects use of the script. Then I renamed the script to "meld", ensuring it was in the path before meld itself, but then meld doesn't appear.
@fgm, for git integration, adding just this to .gitconfig makes it work:
[mergetool "meld"]
path = /Applications/Meld.app/Contents/MacOS/Meld
That said, it's surprising that fixing this takes so long.
Author here:
I suggest
alias meld=/Applications/Meld.app/Contents/MacOS/Meld
Then call meld as usual.
It's taking so long simply because I'm the sole contributor to the OSX port (contributors welcome) and I've been too busy followed by being too sick.
@mvp / @yousseb : thanks for the suggestions, but neither work. This was my first try, but with that I gest the meld icon in the Alt-tab apps list, but nothing on the screen, even when focusing it.
To re-state the current status on my OS X mojave 10.14.6 system:
-
meld
version3.19.2-r6,osx-15
has the "window is invisible problem" - After downgrading to
meld
version3.19.2-r3,osx-12
everything works as expected. In particular there are no problems with / errors frompy2app
.
I'm willing to help debugging this, but I'd need some help where to start searching.
I'm running into the same issue – sometimes the meld
cli invocation seems to start Meld, and the icon shows, but it doesn't bring up any window.
When this happens, I've found the following workaround to be nice enough:
- ctrl+c out of the CLI
meld
- Open the Meld app (from /Applications), which will bring up the splash "file comparison" window
- Close the Meld app
- CLI
meld
will now work again 👍
@yousseb thanks heaps for your work on getting Meld to OS X, it's such a useful tool!