Infinite loop while configuring SVK on Mac OS X

I attempted to install SVK on my Mac using DarwinPorts yesterday and ran into a strange problem. SVK appeared to compile just fine, but the installer eventually got to a step where it said “Configuring SVK…” and then it just froze. I could still do things on the system, but both my processor cores were maxed out. I let the computer sit there for a while, but the installer never recovered. It looked something like this:

matt@matthew:~/ sudo port install svk
--->  Configuring svk

After hitting Ctrl-C to get out, the cores went back to normal.

Some research on Google turned up this ticket that appeared to document exactly what was going on. According to the ticket, SVK needed the latest copy of p5-pathtools or else it would enter an infinite loop while configuring itself.

First I uninstalled my current copy of p5-pathtools with:

sudo port uninstall p5-pathtools

I also cleaned up any leftover files from p5-pathtools and the previous attempt to install SVK:

sudo port clean svk
sudo port clean p5-pathtools

I then installed a new copy of p5-pathtools, making sure to pass the -f flag to force an overwrite of any existing files:

sudo port install -f p5-pathtools

Finally, I ran the SVK install again, passing the -f flag just in case:

sudo port install -f svk

It worked this time. The configuration proceeded normally and finishing within about a minute. I was then able to access the SVK tool from the command line without any difficulty.

Update: I recently purchased a MacBook and discovered that following the steps above did not fully solve the infinite loop problem for me. I also had to configure CPAN for my system, after which the SVK installation proceeded normally. This is something to keep in mind if the procedure above doesn’t work for you.