Installing Freeimage/ImageScience on OS X 10.5 Leopard

November 8, 2007 Alex Chaffee

Gleaned these instructions from a rubyonrails-talk thread.
Another thing is mysql is a bit funky,
you can’t use the built in control panel, but following these
makes it work.

Full installation instructions (full credit goes to: Michael Steinfeld for figuring this out)

  1. I started with a clean install of Leopard.
  2. Install macports for 10.4
  3. Install the xcode dev tools from the Leopard disk – *be sure to
    also install the 10.3 sdk from the xcode dev tools install*
  4. sudo port install freeimage
  5. cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_freeimage/work/FreeImage

    and change this:

    LIBRARIES_PPC = -Wl,-syslibroot /Developer/SDKs/MacOSX10.3.9.sdk
    LIBRARIES_I386 = -Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk

    to this

    LIBRARIES_PPC = -Wl,-syslibroot /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib
    LIBRARIES_I386 = -Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk/usr/lib

  6. sudo port install freeimage

  7. sudo gem install -y imagescience
  8. cd /Library/Ruby/Gems/1.8/gems/RubyInline-3.6.4/lib
  9. edit inline.rb

    look for the line

    flags = @flags.join(’ ‘)

    and change it to

    flags = @flags.join(’ ‘) + ‘ -lruby’

  10. remove ~/.ruby_inline

About the Author


rake query_trace
rake query_trace

QueryTrace is a great Rails plugin (which I learned about from ErrTheBlog) for pinpointing where in your Ra...

Making Rails Wicked Fast: Pagecaching Highly Personalized Web Pages
Making Rails Wicked Fast: Pagecaching Highly Personalized Web Pages

Consider the following snippet for a page showing blog articles. Notice how content on the page differs bas...

SpringOne 2021

Register Now