Having used Meld on Linux for sometime, when I moved to a MacBook running Mac OSX it was one of the tools I missed the most. Personally I find DiffMerge just isn’t as good as Meld. So I decided to try and get Meld running using MacPorts… it wasnt as straight forward as I’d hoped, though I do now have it working and below I outline how to get Meld working on Mac OSX 10.9 using MacPorts.
Start by following the instructions to install MacPorts (http://www.macports.org/install.php)
Once you have installed MacPorts to get Meld installing you do the following;
sudo port install meld
Mid way through you may see an instruction to set Python 2.7 as the Python version to use. So I did this when this install process returned me to the terminal.
If you’ve just install MacPorts and are new to this, like I was, then you may find that the install fails;
:info:build Warning: targets not executed for meld: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port meld for details:
As noted above first I set the Python version;
sudo port select –set python python27
Then looking at the main.log file you should see that the error is;
:info:build scrollkeeper-preinstall /opt/local/share/gnome/help/meld/C/meld.xml meld-C.omf meld-C.omf.install
:info:build make: scrollkeeper-preinstall: No such file or directory
And if you try the command scrollkeeper you will find it does not exist… I found that you now need to install rarian from MacPorts which provides that command;
sudo port install rarian
Once this is installed you can then install Meld;
sudo port install meld
Installation should now work correctly and you should be-able to start Meld from the commandline;
However I now received a crash;
Couldn’t bind the translation domain. Some translations won’t work.
‘module’ object has no attribute ‘bind_textdomain_codeset’
** (process:43347): WARNING **: Trying to register gtype ‘GMountMountFlags’ as enum when in fact it is of type ‘GFlags’
** (process:43347): WARNING **: Trying to register gtype ‘GDriveStartFlags’ as enum when in fact it is of type ‘GFlags’
** (process:43347): WARNING **: Trying to register gtype ‘GSocketMsgFlags’ as enum when in fact it is of type ‘GFlags’
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
/opt/local/bin/meld:155: GtkWarning: GtkIconTheme *gtk_icon_theme_get_for_screen(GdkScreen *): assertion ‘GDK_IS_SCREEN (screen)’ failed
Traceback (most recent call last):
File “/opt/local/bin/meld”, line 155, in <module>
AttributeError: ‘NoneType’ object has no attribute ‘append_search_path’
To solve this issue then you need to install XQuartz;
2.7.5 is the current version that I have installed.
After installing XQuartz, you will need to logout of your mac and then login again.
You can now run meld from the command prompt, though it could be a little slow to start