broken gettext on macports when using coreutils+with_default_names

I use macports on my macbook pro. I prefer a lot of the newer versions of the command line tools, as well as using the gnu version of some tools. As a result I like to install a number of ports with the the “+with_default_names” variant, including coreutils.

A recent run of “port upgrade outdated” caused a problem for me. It broke gettext, which caused any package to depend on gettext to break. Since coreutils depended on gettext and was first in my path, simple tools like ls, touch, mv, etc. were now broken. This in turn caused macports to break with errors like the following:

Error: Unable to upgrade port: dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
Referenced from: /opt/local/bin/ln
Reason: image not found

A bit of searching brought me to this thread: http://lists.macosforge.org/pipermail/macports-users/2009-January/013330.html

It was suggested that gettext was deactivated but an attempt to activate it resulted in an error:

sudo port activate gettextPassword:
---> Activating gettext
Error: port activate failed: Image error: gettext @0.17_3 is already active.

Essentially when gettext was upgrading it failed to fully deactivate of due to a recursive dependence on itself caused by the coreutils+with_default_names.

Trying to alter PATH didn’t fix the issue either as macports has it’s own PATH. Later in the thread the solution was presented to edit the macports.conf file and set the PATH there:

1. Edit /opt/local/etc/macports/macports.conf and change this line:

#binpath /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/
sbin:/usr/X11R6/bin

Remove the hash at the beginning and change the order so that it reads:

binpath /bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin:/opt/local/
sbin:/usr/X11R6/bin

2. Deactivate your old gettext:

sudo port deactivate gettext @0.17_3

3. Activate your new gettext:

sudo port activate gettext @0.17_4

4. Uninstall coreutils because it is not a good idea to override the
default Mac OS X file utilities:

sudo port uninstall coreutils

5. Edit /opt/local/etc/macports/macporst.conf and put the binpath
line back the way it was before, including the order of the paths and
the hash at the beginning of the line.

NOTE: If the activating gettext doesn’t resolve the issue, after deactivating the old gettext, try installing it instead.

This got me back up and running again, which is good, because some of my installed ports won’t cleanly install to a fresh system (ie- proctools). It baffles me that the port maintainers allow their ports to go into the wild when they won’t even build, but that is a topic for another time.

While I didn’t bother uninstalling coreutils, as I really prefer the gnu versions to the apple provided version, at least I am now equipped to deal with these shenanigans should it happen again.

Passenger + Rack on Dreamhost

So I spent a little time a while back trying to figure out the nuances of what was allowed on Dreamhost when using mod_rails for a Rack based application. First since Sinatra wasn’t a DH supplied gem I setup my own rubygems install store following this walk through: http://wiki.dreamhost.com/index.php/RubyGems

Then I installed the Sinatra gem. Finally I created a sinatra application and pointed a DH subdomain @ the public folder of the app. Unfortunately DH doesn’t support putting Rack or Rails apps in sub-directories.

Now, even though I was declaring the GEM_HOME & GEM_PATH variables in the config.ru file Passenger wasn’t picking up them up and so wasn’t finding my sinatra gem. To get around this I used the SetEnv apache declaration declaration in a .htaccess file in the public folder of the app ala:

SetEnv GEM_HOME /home/username/.gems
SetEnv GEM_PATH /home/username/.gems:/usr/lib/ruby/gems/1.8

Also since Dreamhost spins down the application handler pretty quickly and my little test site doesn’t recieve much traffic, the initial startup is slow, but subsequent refreshes make this quick. To get over this initial launchtime I setup a cron job to tickle the app every 5 minutes:

*/5 * * * * /usr/bin/curl http://my.domain.com/ -s -o /dev/null

Now the app loads up quick every time!

12 weeks and already dancing!

This is just a quick note to say I’m not dead. I’m proud to say that my family will be growing by one by early next year!
Baby Carey @ 12 weeks

This is the same pic with some markup to show the hands and feet.
Baby Carey @ 12 weeks (plus markup)

While in the dr. office we got to see a closer image with the little one shaking and dancing around like crazy! It was awesome and I told my wife that the baby get’s it’s rhythm from me. :-P

updates, updates, updates

Well, the past month has been busy:

  • Got a new job @ Digital Fountain
  • I’m really excited about the work environment and the opportunity to learn a great deal from my new boss. I’ll be working across the street from BART, in the same parking lot as my gym! It’s also only a couple blocks from where I used to work, so I’ll be able to meet up with friends and I already know where all the good places to eat are!

  • Got our business license for my wife and I’s consulting company(finally)
  • While I will be working for digital fountain, we will be growing our design & development consulting company. We just finalized on the logo, so first comes the stationary, then comes the website. This blog will probably move to a more appropriate personal domain (alla blog.markcarey.org or something).

  • Been working on bringing a client’s site live
  • I’ve inherited a lot of ugly code, but things are moving along smoothly. Even though the site is in php, I found a way to leverage ruby for administrative scripts and am exploring capistrano for automated deployment of site updates.

  • Working on my Senior Thesis (almost done)
  • Well… I walked a month ago in cap & gown, but this stupid thesis is driving me up the wall. I’m almost there. Hopefully I’ll have it done within the week.

  • Getting my studio back in tip top shape
  • Who knew that the Evolution UC-33e didn’t need a power supply to work if plugged in via USB. I’ve had that stupid thing sitting on the shelf doing nothing for the past 2 years, thinking I had lost the power supply. I went to look only to find a replacement unit only to find out it was optional!!

    Also I upgraded from Finalscratch2 to Traktor Scratch. I was tempted to go with Serato Scratch, but the Traktor Software is just so much better. Hopefully now that the hardware is made by the same company as the software, the platform will stabilize. I’ve got Ableton Live and have been tempted to start using it for doing more creative mixes, but the setup takes a lot more work to get to place where you can have fun with it. With Traktor Scratch I just cue an mp3 track to a turntable and rock out. Besides, there is just something about having a vinyl record under your fingers that feels so right. I should have a new mix online very soon as well (after the paper is finished).

    Fun while it lasted

    It’s been quiet around here lately and with good reason. I’ve been buckling down, trying to make some headway on my New Years resolutions. I started learning C#, got more into C++ & Ruby, began looking into how powershell could be used to make Windows administration easier, helped plan a regional Ruby conference (sdforum), graduated with a BA in Biblical Studies(finally!), and got a new job.

    The new job was great. The people were great, the work environment was fantastic, and my boss was very interested in helping me to develop in my career goals. Unfortunately a few months after I joined them, they ran into a bit of a funding problem (VC’s decided to pull the plug). They’d had about a 4-5 year run and had a rough start. Last year they started to turn things around and were on track to do really well this year. But for those funding us, it wasn’t enough.

    Oh well, such is the way with startups.

    One thing I’m grateful for is the fact that I still do consulting work. We currently have one contract in the pipe, and could very easily grow it. I’m just concerned that it might make it more difficult to purchase a home, should we decide to go that route.

    I’ve put my resume out there and have already got a handful of bites in the last 24 hours. Hopefully something interesting pops up.