Saturday, November 12, 2011

FAIL: Installing Simon Listens on Mac

  1. Mac OS X 10.6.8 on MacBook Pro with an Intel Core
  2. Download and unzip Simon Listens, then:
  3. cd simon-0.3.0
  4. You will run into errors like kde and cmake are missing.
  5. Instructions for installing KDE on a mac (cmake is included) are available here.
  6. I chose to perform the MacPorts based installation. The following command takes a long time to run.
    sudo port -v install kdesdk4
    I waited an hour before I simply decided to leave the MacBook running overnight. So I don't know the total time it ended up taking.
  7. I was warned that macports in general is a bit out of date, so I decided to update that too.
    sudo port selfupdate
  8. I was also warned that some of the existing Macports installs may be outdated, so I fixed that as well. Though I wonder if this is what caused the overall experiment to fail in the end?
    sudo port upgrade outdated
  9. I decided to run some extra/redundant commands in order to make sure that the kdesdk4 really did install its counterparts:
    sudo port -v install cmake
    sudo port -v install qt4-mac
    sudo port -v install kdelibs4
    All of them were already installed so I was satisfied with the sanity test.
  10. I pasted whatever I was instructed to:
    cd ~
    mkdir bin
    vi bin/findup
  11. I decided to append-to/edit the .bash_profile instead of creating .profile file. And once again I pasted whatever I was told to:
    chmod 777 bin/findup
    vi .bash_profile
  12. Performed all the steps leading up to the checkout as instructed but did the checkout over a non-SSL (cleartext) channel:
    mkdir -p ~/Desktop/kde/build
    mkdir -p ~/Desktop/kde/home
    mkdir -p ~/Desktop/kde/inst
    mkdir -p ~/Desktop/kde/src
    mkdir -p ~/Desktop/kde/src/branches
    mkdir -p ~/Desktop/kde/src/trunk
    vi ~/kde/src/trunk/.my-setup
    cd ~/kde/src/trunk/
    svn co svn://
  13. Performed the actual build and created a directory that didn't exist but I had put-off creating because I thought perhaps the KDE build/installation process would create it:
    cd kdesupport
    sudo chown -R $USER ~/Library/Preferences/KDE
    mkdir ~/Library/Preferences/KDE
    sudo chown -R $USER ~/Library/Preferences/KDE/
    sudo launchctl load  -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
    launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
  14. This time the build for Simon Listens went much further but ultimately it failed!
    cd simon-0.3.0
  15. I lost the link but somewhere on the web it was suggested that the errors I saw in the build will happen when binary files have been built for a 32-bit on a 64-bit system! And the way to get around it was by passing some arguments to let Simon's build script skip this stuff. But I found way too many configure files and couldn't make heads or tails of which one to use and how to tell it do what I need to workaound the problem.
    find ./ -name configure
    <6-7 results all in different nested directories>
    cd simon-0.3.0
    grep "enable-charconv" julius/julius/*
    vi julius/julius/configure
    ./ --enable-charconv=no
    vi julius/julius/ 
  16. The build error seemed to have the word iconv mentioned in a bunch of places so I decided to figure out which MacPorts install was part of the problem and remove them:
    port list | grep iconv
    sudo port uninstall libiconv @1.14_0
    sudo port uninstall libiconv @1.14_0+universal
    But then the one being used (libiconv @1.14_0+universal) couldn't actually be removed because there were dependencies present!
  17. I also found out that that Mac actually ships with a 64-bit flavor of libiconv by default and I was able to locate the said files on my system:
    find /usr/lib -name libiconv*
  18. Found some clues on how to try out the Mac's system libiconv library as a fallback without uninstalling MacPorts' version of the lib ... but that too didn't help the Simon build work because now the Mac's system libiconv couldn't agree on version #s with some of the other MacPorts based libs ... so I reverted that trial change as well:
    mkdir ~/temp
    sudo mv /opt/local/lib/lib
    sudo mv /opt/local/lib/libiconv* ~/temp/
    sudo mv ~/temp/libiconv* /opt/local/lib/
  19. Finally I decided to remove all the clutter that had been placed on my system during this FAIL-ed attempt to the best of my abilities:
    sudo port uninstall kdesdk4 @4.7.3_0
    sudo port uninstall cmake
    sudo port uninstall --follow-dependents qt4-mac
    sudo port uninstall --follow-dependents kdelibs4
    cd ~
    rm -rf kde/
    rm -rf ~/Library/Preferences/KDE
    vi /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
    launchctl list
    launchctl list | grep dbus
    launchctl remove org.freedesktop.dbus-session
    launchctl list | grep dbus
    cd ~
    rm -rf bin/
    vi .bash_profile


Post a Comment