Problem:
After upgrade my OS X to Mavericks as well as my XCode to XCode 5, there are several command line tool kits that do not work so well, including MacPorts. That is a pretty terrible situations and I really don't want to rely myself on "App Store" or any kinds of installation packges. MacPorts itself seems also noticed of the problem and posted a solution on its website. Looks like there were at least 35 tickets about this issue before I noticed of it. However, while building the source code, there were more problems came out and I believe I should post how I solve the problems along the way.
Errors in sequence:
- configure macports source code error: need glib
- configure glib error: need gettext
- installed gettext, but glib doesn't recognize
Here is the correct order of how you should do it:
1. Install xcode command line tool kit, seems like in XCode5, it got rid of my installed command line tool kit
sudo xcode-select --install2. Install gettext from source code:
wget http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz3. Install glib from source code:
tar xf gettext-0.18.3.1.tar.gz
cd gettext-0.18.3.1
./configure
make
sudo make install
wget http://ftp.gnome.org/pub/gnome/sources/glib/2.39/glib-2.39.0.tar.xz4. Install MacPorts (I followed the official instructions):
tar xf glib-2.39.0.tar.xz
cd glib-2.39.0
./configure
make
sudo make install
wget https://distfiles.macports.org/MacPorts/MacPorts-2.2.0.tar.bz2
tar xf MacPorts-2.2.0.tar.bz2
cd MacPorts-2.2.0/
./configure
make
sudo make install
After you installed the MacPorts, you should run the following commands to update your installed softwares:
sudo port selfupdateFollow these steps, you should be able to use your MacPorts again in Mac OS X Mavericks!
sudo port upgrade outdated
