Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get Meld onto my OS X 10.6.8 box using MacPorts 2.0.3 and am not having success.

bobk-mbp:opt bobk$ port version
Version: 2.0.3
bobk-mbp:opt bobk$ sudo port install meld
--->  Computing dependencies for meld
--->  Dependencies to be installed: py26-gnome libgnomeui py26-gtk py26-cairo py26-numpy fftw-3 py26-nose py26-distribute python26 py26-py py26-gobject py26-orbit
--->  Building libgnomeui
Error: Target returned: shell command failed (see log for details)
Error: Failed to install libgnomeui
Log for libgnomeui is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_libgnomeui/libgnomeui/main.log
Error: The following dependencies were not installed: py26-gnome libgnomeui py26-gtk py26-cairo py26-numpy fftw-3 py26-nose py26-distribute python26 py26-py py26-gobject py26-orbit
Error: Status 1 encountered during processing.
To report a bug, see <>

When I look at /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_libgnomeui/libgnomeui/main.log it has a line like...

:error:build Failed to install libgnomeui
:debug:build couldn't open "/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tclIndex": no such file or directory
    while executing
"open [file join $dir tclIndex]"
:notice:build Log for libgnomeui is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_libgnomeui/libgnomeui/main.log

...and that file is indeed missing on my system. Where do I go from here? I really want a piece of that Meld goodness.

Why can't MacPorts install meld on my os x 10.6.8 box?

share|improve this question
Have you tried To report a bug, see <> – Mark Dec 13 '11 at 11:38
I have not. You think its a macport bug or just misconfiguration on my machine? I'll take a walk over there and see what I can see. – Bob Kuhar Dec 13 '11 at 18:53
I think that Tcl is part of the Apple install - but I am on Lion so cannot tell exactly. – Mark Dec 13 '11 at 20:18
Ah, yes, lookie here: MacPorts bug from a couple of months ago. Does not appear to have been acted on: – Bob Kuhar Dec 13 '11 at 20:43
Did you try the port clean libgnomei as suggested – Mark Dec 13 '11 at 20:55
up vote 2 down vote accepted

Try cleaning, then upgrading all of your installed packages prior to building meld:

sudo port clean all
sudo port selfupdate
sudo port upgrade outdated
sudo port selfupdate # just to make sure...
sudo port install meld
share|improve this answer
Hey. This worked to get it installed. That is the good news. The bad news is that it now won't run. Something about "...ValueError: image should be a GdkPixbuf or empty". This is progress none-the-less! – Bob Kuhar Mar 19 '12 at 21:03

Running mdfind -name tclIndex on Mac OS X 10.6.8 shows that the path to tclIndex is /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tclIndex!

Anyway, if there is a pristine MacPorts 2.0.3 system running on Mac OS X 10.6.8, meld gets installed without any (serious) complaints.

The same goes for koffice provided that it can use an older version of libpng (< 1.4); this can be achieved by giving koffice its own fresh MacPorts 2.0.3 system in a custom location, e. g. /opt/macports-koffice.

Try the following Bash script to see if this approach works for your machine as well:


# cat mpmeld
# 1. back up the old /opt/local MacPorts system by moving it to ${opt_local_off}
# 2. install a fresh MacPorts 2.0.3 system to /opt/local for building meld 
# 3. install a fresh MacPorts 2.0.3 system to /opt/macports-koffice for building koffice (due to PNG_MAX_UINT error)

# usage: 
# sudo -H -i                                                 # get a root shell to prevent sudo timeout
# /path/to/mpmeld 3>&1 1>&2 2>&3 3>&- | tee mpmeld.log       # swap stdout & stderr to log stderr messages only

# koffice usage:
# /opt/macports-koffice/bin/port contents koffice | grep '/bin/' | nl
# /opt/macports-koffice/bin/kword 2>/dev/null
# /opt/macports-koffice/bin/koconverter --help-all

# See also:
# What does 'Xlib: extension "RANDR" missing on display "/tmp/launch-XXXXXX/:0"' mean?


IFS=$' \t\n'

#if [[ $(id -u) -ne 0 ]]; then
if [[ $(id -u) -ne 0 ]] || [[ "${HOME}" != '/var/root' ]]; then
   echo 'This script must be run as root!' 1>&2
   echo 'To get a root shell to prevent sudo timeout use: sudo -H -i' 1>&2
   exit 1

# prevent idle sleep
pmset noidle &
pmset -a force sleep 0 displaysleep 0 disksleep 0

sleep 1
usr_local_off="/usr/local-off-$(date '+%Y-%m-%d-%H_%M_%S')"
opt_local_off="/opt/local-off-$(date '+%Y-%m-%d-%H_%M_%S')"
opt_macports_koffice_off="/opt/macports-koffice-off-$(date '+%Y-%m-%d-%H_%M_%S')"

tmpDir="$(mktemp -d /tmp/macports.XXXXXX)" || exit 1

trap "
   #set -xv
   cd    # avoid: sudo: cannot get working directory
   [[ -d '${tmpDir}' ]] && rm -rfv '${tmpDir}'
   [[ -d '${usr_local_off}' ]] && sudo mv -iv '${usr_local_off}' /usr/local
   kill -TERM ${PMSETPID}

# make sure /usr/local is not interfering with MacPorts build processes for /opt/local
[[ -d '/usr/local' ]] && sudo mv -iv /usr/local "${usr_local_off}"

# back up the old MacPorts system
[[ -d '/opt/local' ]] && sudo mv -iv /opt/local "${opt_local_off}"

# back up /opt/macports-koffice
[[ -d '/opt/macports-koffice' ]] && sudo mv -iv /opt/macports-koffice "${opt_macports_koffice_off}"

# meld

cd "${tmpDir}" || exit 1

curl -L -O

hdiutil mount MacPorts-2.0.3-10.6-SnowLeopard.dmg
installer -pkg /Volumes/MacPorts-2.0.3/MacPorts-2.0.3.pkg -target "/"
hdiutil unmount /Volumes/MacPorts-2.0.3

port -v selfupdate
port -f install meld

# enable dbus with launchd
launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

# koffice

# get a fresh MacPorts 2.0.3 install in /opt/macports-koffice for koffice
# note: koffice @1.6.3, Revision 4  requires libpng < 1.4  (due to PNG_MAX_UINT error)

cd "${tmpDir}" || exit 1

# cf.
unset PATH
export PATH='/bin:/sbin:/usr/bin:/usr/sbin'
curl -L -O
tar -xjf MacPorts-2.0.3.tar.bz2
cd MacPorts-2.0.3 || exit 1
./configure --prefix="${MP_PREFIX}" --with-applications-dir="${MP_PREFIX}/Applications"
make install

# get the Portfiles and update the system
/opt/macports-koffice/bin/port -v selfupdate

# see: "How to install an older version of a port", 

cd "${tmpDir}" || exit 1
svn co -r 71090
chmod  755 "${tmpDir}"  # avoid error message: could not read "/path/to/Portfile": permission denied
cd libpng || exit 1
/opt/macports-koffice/bin/port install -v +universal
cd "${tmpDir}" || exit 1

/opt/macports-koffice/bin/port -f install koffice

find /Applications/MacPorts /Library/LaunchAgents /Library/LaunchDaemons -name "*.mp_*[[:digit:]]" -delete

exit 0
share|improve this answer

It looks like you need to (re)install Tcl. You can get it here. I had to do this recently, although for a somewhat different problem and it worked out for me. By the way, I am also running 10.6.8, so it would seem that the natively installed Tcl was deprecated for my/your purposes.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.