Skip to content

Instantly share code, notes, and snippets.

@syneart
Last active September 4, 2025 15:53
Show Gist options
  • Select an option

  • Save syneart/4a8724cd479d31f0f742f499f807dcb2 to your computer and use it in GitHub Desktop.

Select an option

Save syneart/4a8724cd479d31f0f742f499f807dcb2 to your computer and use it in GitHub Desktop.
Meld v3.21.0 (r4) hot-fix for macOS on Intel CPU / Apple Silicon CPU with Rosetta
### Test on https://github.com/yousseb/meld/releases/tag/osx-20
### OSX - 3.21.0 (r4) Sonoma
### !!! Note: You need put the Meld.app r4 build to the /Applications path first.
#!/bin/zsh
#Fix libpng16.16.dylib not found
install_name_tool -change /usr/local/opt/libpng/lib/libpng16.16.dylib @executable_path/../Frameworks/libpng16.16.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
#Fix libbrotlidec.1.dylib not found
install_name_tool -change /usr/local/opt/brotli/lib/libbrotlidec.1.dylib @executable_path/../Frameworks/libbrotlidec.1.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
#Make MacOS trust Meld.app
xattr -rd com.apple.quarantine /Applications/Meld.app
#Removes the existing code signature
codesign --remove-signature /Applications/Meld.app
#Re-signs with system’s default certificate
codesign --force --deep --sign - /Applications/Meld.app
#if CPU type is Apple silicon, use Rosetta to execute
/usr/libexec/PlistBuddy -c "Set :LSRequiresNativeExecution false" /Applications/Meld.app/Contents/Info.plist
#Try to open Meld
open /Applications/Meld.app
#Meld CLI Setup
curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_setup_cli.sh | zsh
#!/bin/zsh
RC_FILES=( .bashrc .zshrc )
for RC_FILE in "${RC_FILES[@]}"
do
[ -f ~/${RC_FILE} ] && {
( cat ~/${RC_FILE} | grep "alias meld=" ) && {
echo "Already put it at ~/${RC_FILE}"
}|| {
echo "alias meld='meld_script(){ /Applications/Meld.app/Contents/MacOS/Meld \$* 2>/dev/null & };meld_script'" >> ~/${RC_FILE}
. ~/${RC_FILE}
echo "Put it at ~/${RC_FILE} .. ok"
}
}
done
echo "[!] You may need to reopen your Terminal."
1. Download the official **3.21.0 osx4 (r4 pre-release)** [https://github.com/yousseb/meld/releases/tag/osx-20] version.
2. Move the Meld.app file to the /Applications directory.
3. Execute the hot-fix script at CLI with the following command (**only one line**):
`curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh`
@robwilkerson

Copy link
Copy Markdown

Can confirm that these steps work, @syneart , thank you again! I can launch app and, from the command line, diff both files and directories. Your patch seems to give me everything I really expect from Meld, so I'm crazy happy that I don't have to start using diffmerge or something else that just isn't as good.

@sowmyy

sowmyy commented Jun 28, 2024

Copy link
Copy Markdown

Works like a charm !!! thanks much :)

@k4u5hik

k4u5hik commented Aug 18, 2024

Copy link
Copy Markdown

@syneart Thanks Legend! Worked perfectly.

@timbaileyjones

Copy link
Copy Markdown

Thank you as well. Your workaround enabled me to run Meld on my M3 Pro running 14.6.1!

@barendgehrels

Copy link
Copy Markdown

On my M1 Pro arm64 I don't get it to work.
The current fatal error seems to be '/usr/local/opt/libpng/lib/libpng16.16.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

I don't have these dylib's in my path. I find 3 and they all report (with file):
/usr/local/opt/libpng/lib/libpng16.16.dylib: Mach-O 64-bit dynamically linked shared library arm64

I tried variants of /usr/libexec/PlistBuddy -c "Set :LSRequiresNativeExecution false" /Applications/Meld.app/Contents/Info.plist , and true,
but without success (I didn't know this command before)

@syneart

syneart commented Aug 26, 2024

Copy link
Copy Markdown
Author

On my M1 Pro arm64 I don't get it to work. The current fatal error seems to be '/usr/local/opt/libpng/lib/libpng16.16.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

I don't have these dylib's in my path. I find 3 and they all report (with file): /usr/local/opt/libpng/lib/libpng16.16.dylib: Mach-O 64-bit dynamically linked shared library arm64

I tried variants of /usr/libexec/PlistBuddy -c "Set :LSRequiresNativeExecution false" /Applications/Meld.app/Contents/Info.plist , and true, but without success (I didn't know this command before)

  1. First, go to https://github.com/yousseb/meld/releases/tag/osx-20 and download the official 3.21.0 osx4 (r4 pre-release) version.
  2. Move the Meld.app file to the /Applications directory.
  3. Execute the hot-fix script at CLI with the following command (only one line):
    curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh

@barendgehrels

Copy link
Copy Markdown

On my M1 Pro arm64 I don't get it to work. The current fatal error seems to be '/usr/local/opt/libpng/lib/libpng16.16.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
I don't have these dylib's in my path. I find 3 and they all report (with file): /usr/local/opt/libpng/lib/libpng16.16.dylib: Mach-O 64-bit dynamically linked shared library arm64
I tried variants of /usr/libexec/PlistBuddy -c "Set :LSRequiresNativeExecution false" /Applications/Meld.app/Contents/Info.plist , and true, but without success (I didn't know this command before)

  1. First, go to https://github.com/yousseb/meld/releases/tag/osx-20 and download the official 3.21.0 osx4 (r4 pre-release) version.
  2. Move the Meld.app file to the /Applications directory.
  3. Execute the hot-fix script at CLI with the following command (only one line):
    curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh

Tried again. And wow, that works now! 🎉 I earlier applied these steps individually and must have done something wrong there (first time I tried r2 then I tried to search for paths).
Thanks a lot! ❤️ very glad to use it again.

@Ood-Tsen

Copy link
Copy Markdown

It works like a charm, thanks @syneart For people who don't read the comment lines (like me), this is for Meld v3.21.0 (r4). The "latest dmg" at Meld for OSX points to Meld v3.21.0 (r2), for which I think the script might work as well if substituting "libfreetype.6.dylib" for "libfreetype.6.20.0.dylib", but I have not tried it.

It's work on M2 Mac too.

@k4u5hik

k4u5hik commented Nov 10, 2024

Copy link
Copy Markdown

Any update for macOS 15.1 (24B83)?

I am getting the following error.

The application “(null)” does not have permission to open “(null)”.

@stevejordi

Copy link
Copy Markdown

Same for me. It worked fine in 15.0 but in 15.1 it says "The application Finder does not have permission to open null" when double-clicked from Applications, and if from the launchpad it says ""The application Dock does not have permission to open null"

@syneart

syneart commented Nov 11, 2024

Copy link
Copy Markdown
Author

For macOS 15.1 (24B83)
The application “(null)” does not have permission to open “(null)”.

@k4u5hik, @stevejordi Thank you for the feedback.
I have already made adjustments for this issue. You can simply run the hot-fix script again to continue using Meld.app.

-> Execute the hot-fix script at CLI with the following command (only one line):
curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh

If it still fails, you can go through the process again.

  1. First, Remove the original Meld.app located in the /Applications directory.
  2. And, go to https://github.com/yousseb/meld/releases/tag/osx-20 and download the official 3.21.0 osx4 (r4 pre-release) version.
  3. Move the Meld.app file to the /Applications directory.
  4. Execute the hot-fix script at CLI with the following command (only one line):
    curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh

@k4u5hik

k4u5hik commented Nov 11, 2024

Copy link
Copy Markdown

@stevejordi I too got those errors

"The application Finder does not have permission to open null" or
"The application Dock does not have permission to open null"

Removing the signature of the app and self-signing it solved the problem.

codesign --remove-signature /Applications/Meld.app
codesign --force --deep --sign - /Applications/Meld.app

@k4u5hik

k4u5hik commented Nov 11, 2024

Copy link
Copy Markdown

@syneart Thank you. It's working again.

@wim-vds-cegeka

Copy link
Copy Markdown

@syneart Thanks for sharing this! It solved the crashing issue when running any diff on macOS 15.0 (on M3 Pro).

@ChrisRutledgeSTA

Copy link
Copy Markdown

A combination of the hotfix command above and running BOTH the code signing commands worked for me; having just downloaded latest meld onto brand-new macBook Pro M4 :)

@AndresRojoInteracso

Copy link
Copy Markdown

Thank you,
It works for me
M2 Pro Sonora 14.6.1

@Sunac

Sunac commented Dec 2, 2024

Copy link
Copy Markdown

For macOS 15.1 (24B83)
The application “(null)” does not have permission to open “(null)”.

@k4u5hik, @stevejordi Thank you for the feedback. I have already made adjustments for this issue. You can simply run the hot-fix script again to continue using Meld.app.

-> Execute the hot-fix script at CLI with the following command (only one line): curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh

If it still fails, you can go through the process again.

  1. First, Remove the original Meld.app located in the /Applications directory.
  2. And, go to https://github.com/yousseb/meld/releases/tag/osx-20 and download the official 3.21.0 osx4 (r4 pre-release) version.
  3. Move the Meld.app file to the /Applications directory.
  4. Execute the hot-fix script at CLI with the following command (only one line):
    curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh

perfect! Thanks. Works like a charm on M1 Sequoia 15.1.1.

@rolandkozma-sg

rolandkozma-sg commented Dec 2, 2024

Copy link
Copy Markdown

For macOS 15.1 (24B83)
The application “(null)” does not have permission to open “(null)”.

@k4u5hik, @stevejordi Thank you for the feedback. I have already made adjustments for this issue. You can simply run the hot-fix script again to continue using Meld.app.

-> Execute the hot-fix script at CLI with the following command (only one line): curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh

If it still fails, you can go through the process again.

  1. First, Remove the original Meld.app located in the /Applications directory.
  2. And, go to https://github.com/yousseb/meld/releases/tag/osx-20 and download the official 3.21.0 osx4 (r4 pre-release) version.
  3. Move the Meld.app file to the /Applications directory.
  4. Execute the hot-fix script at CLI with the following command (only one line):
    curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh

@syneart @Sunac Thanks to these, meld works well from both command line and Applications, but I'm not able to configure it as a difftool/mergetool with git. After adding the settings suggested at https://yousseb.github.io/meld/ to .gitconfig, when I execute git difftool, the following error appears on the right side of the window (the left side is loaded ok):
There was a problem opening the file “filepath”.
Error opening file /filepath: No such file or directory
Please help me with the right config.

@bencat-sixense

Copy link
Copy Markdown

Thanks a lot, you save my day :)

@mcunanan1

Copy link
Copy Markdown

Thank you so much! Meld is the best tool for the job and you saved the day!

@rolandkozma-sg

Copy link
Copy Markdown

could anybody provide the right configs for git difftool/mergetool, please?

@liamjones

liamjones commented Dec 5, 2024

Copy link
Copy Markdown

@rolandkozma-sg

[difftool "meld"]
    cmd = /Applications/Meld.app/Contents/MacOS/Meld "$LOCAL" "$REMOTE" 2>/dev/null

This has been working for me. Though I've been having to blindly answer "Launch meld?" by hitting return. I think that's caused by something else in my terminal/git config setup though.

Edit: oh, and mergetool should be:

[mergetool "meld"]
    cmd = /Applications/Meld.app/Contents/MacOS/Meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED" 2>/dev/null

@rolandkozma-sg

Copy link
Copy Markdown

Thanks @liamjones!

@ilyagr

ilyagr commented Jan 23, 2025

Copy link
Copy Markdown

FYI, for most people, I would now recommend installing Meld on Mac OS via brew install dehesselle-meld. I wrote up some details in https://gist.github.com/ilyagr/1b40f6061d8ad320cee4c12843df1a23.

Update: As of May 2025, brew install meld now works and is equivalent to what brew install dehesselle-meld previously was. In particular, it no longer installs a broken version of yousseb's Meld as it used to in 2023. (By contrast, this gist installs a fixed version of yousseb's Meld).

It has the downside of not supporting a proper MacOS menu bar, and probably misses some other MacOS integrations.

However, I used syneart's recipe in this gist for a long time, and it works well too (and even results in a slightly nicer Meld version). Thanks syneart and yousseb!

@jonty3

jonty3 commented Apr 13, 2025

Copy link
Copy Markdown

+1 seems to work for m4 pro / sequoia 15.4

@bencat-sixense

Copy link
Copy Markdown

Upgrade from Sonoma to Sequoia (Intel) break the install, but running this fix it again:

curl https://gist.githubusercontent.com/syneart/4a8724cd479d31f0f742f499f807dcb2/raw/meld_hotfix_sonoma.sh | zsh

@suburbanworrier

Copy link
Copy Markdown

Thanks for this. Much appreciated

@ilyagr

ilyagr commented May 16, 2025

Copy link
Copy Markdown

Repeating my edit to https://gist.github.com/syneart/4a8724cd479d31f0f742f499f807dcb2?permalink_comment_id=5404734#gistcomment-5404734, brew install meld now again works, and installs what used to be called deheselle-meld. This is different from what brew install meld did in 2023 and earlier.

This is also different from what you get if you follow this gist; see my earlier comment for some examples (I find the differences minor, but YMMV). This gist continues to work fine if you prefer it.

@bencat-sixense

Copy link
Copy Markdown

That's a great news @ilyagr !!! 🎉
Thanks for sharing it :)

@AgilentGCMS

Copy link
Copy Markdown

I installed the version found here on macos Sonoma 14.7.6. If I try to install before the hotfix, I get this error:
Screenshot 2025-09-04 at 11 52 19 AM
If I try opening after the hotfix, I get a different error:
Screenshot 2025-09-04 at 11 49 55 AM
In either case, I can't launch meld.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment