# ImageScience

**URL:** <https://www.ruby-forum.com/t/imagescience/91153>\
**Category:** Rails\
**Created:** [April 5, 2007, 6:24am UTC](https://www.ruby-forum.com/t/imagescience/91153 "2007-04-05T06:24:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 5, 2007, 6:24am UTC](https://www.ruby-forum.com/t/imagescience/91153/1 "2007-04-05T06:24:51Z")

</div>

I’m trying to install Image Science on my Mac (according to the  
instructions on [http://seattlerb.rubyforge.org/ImageScience.html](http://seattlerb.rubyforge.org/ImageScience.html)) so I  
can use attachment\_fu for image resizing. However the commands  
beginning with ‘sudo port’ just throw up a command not found error. Is  
there some part of Xcode I need to install?

Alternatively I’ve tried compiling based on the readme.osx file -  
using ‘make -f Makefile.osx’ but then I get a different error:

g+±4.0 -Wno-ctor-dtor-privacy -Os -arch ppc -I. -ISource -ISource/  
Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibMNG -  
ISource/LibPNG -ISource/LibTIFF -ISource/ZLib -isysroot /Developer/  
SDKs/MacOSX10.3.9.sdk -c Source/FreeImage/BitmapAccess.cpp -o Source/  
FreeImage/BitmapAccess.o-ppc  
Source/FreeImage/BitmapAccess.cpp:30:20: error: malloc.h: No such file  
or directory  
make: \*\*\* [Source/FreeImage/BitmapAccess.o-ppc] Error 1

Can anyone help? I’m probably just being an idiot!

Andy C.

> **[Site not found · DreamHost](http://www.deepcalm.com)**
>
> The owner of this domain has not yet uploaded their website.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 5, 2007, 6:30am UTC](https://www.ruby-forum.com/t/imagescience/91153/2 "2007-04-05T06:30:51Z")

</div>

To use ‘port’ you’ll need to install MacPorts first:

> **[The MacPorts Project -- Home](https://www.macports.org/)**
>
> The MacPorts Project is an open-source community initiative to design an easy-to-use
> system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac
> OS X operating system.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 5, 2007, 8:18am UTC](https://www.ruby-forum.com/t/imagescience/91153/3 "2007-04-05T08:18:06Z")

</div>

Knew it had to be something obvious I was missing. Thanks Rob! Life/  
frustration-saver.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 14, 2007, 11:08am UTC](https://www.ruby-forum.com/t/imagescience/91153/4 "2007-04-14T11:08:06Z")

</div>

On 14 Apr 2007, at 04:33, Jonathon Wolfe wrote:

> port for freeimage, or to a bad environment variable somehow being set  
> in my shell… I don’t have X11 installed, but AFAIK freeimage doesn’t  
> require it.
> 
> I’m pretty clueless when it comes to command-line stuff (before I got  
> into RoR the last time I did any serious delvelopment was in the  
> heyday  
> of CodeWarrior), so if anyone here has any suggestions I (and the  
> other  
> guys having trouble installing freeimage with MacPorts) would really  
> appreciate it.

You need to install the latest version of the MacOS X Developer tools  
(you can download the 700 MB (IIRC) disk image from the Apple  
Developer Connection site).

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 15, 2007, 3:14am UTC](https://www.ruby-forum.com/t/imagescience/91153/5 "2007-04-15T03:14:00Z")

</div>

Peter De Berdt wrote:

> On 14 Apr 2007, at 04:33, Jonathon Wolfe wrote:
> 
> > port for freeimage, or to a bad environment variable somehow being set  
> > in my shell… I don’t have X11 installed, but AFAIK freeimage doesn’t  
> > require it.
> > 
> > I’m pretty clueless when it comes to command-line stuff (before I got  
> > into RoR the last time I did any serious delvelopment was in the  
> > heyday  
> > of CodeWarrior), so if anyone here has any suggestions I (and the  
> > other  
> > guys having trouble installing freeimage with MacPorts) would really  
> > appreciate it.
> 
> You need to install the latest version of the MacOS X Developer tools  
> (you can download the 700 MB (IIRC) disk image from the Apple  
> Developer Connection site).
> 
> Best regards
> 
> Peter De Berdt

Thanks very much. I will try this on my PPC machine – I tried the  
installation on a MacBook with a new version of the developer tools and  
it worked fine. I had assumed it was a problem with the makefile for PPC  
systems.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 14, 2007, 4:33am UTC](https://www.ruby-forum.com/t/imagescience/91153/6 "2007-04-14T04:33:48Z")

</div>

Rob Bevan wrote:

> To use ‘port’ you’ll need to install MacPorts first:  
> [http://www.macports.org/](http://www.macports.org/)

I’m trying to install freeimage with MacPorts 1.4.0 on OSX 10.4.7, and I  
seem to be having problems with the makefile. I’m not the only one:

[http://sourceforge.net/forum/forum.php?thread\_id=1711080&forum\_id=36110](http://sourceforge.net/forum/forum.php?thread_id=1711080&forum_id=36110)

Updating MacPorts with “sudo port -d selfupdate” works fine, but I get  
compiler errors with “sudo port install freeimage”. I assume this is  
either due to a bad makefile for PPC macs being included in the latest  
port for freeimage, or to a bad environment variable somehow being set  
in my shell… I don’t have X11 installed, but AFAIK freeimage doesn’t  
require it.

I’m pretty clueless when it comes to command-line stuff (before I got  
into RoR the last time I did any serious delvelopment was in the heyday  
of CodeWarrior), so if anyone here has any suggestions I (and the other  
guys having trouble installing freeimage with MacPorts) would really  
appreciate it.

Thanks!

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 17, 2007, 5:23am UTC](https://www.ruby-forum.com/t/imagescience/91153/7 "2007-04-17T05:23:02Z")

</div>

Peter De Berdt wrote:

> On 14 Apr 2007, at 04:33, Jonathon Wolfe wrote:
> 
> > port for freeimage, or to a bad environment variable somehow being set  
> > in my shell… I don’t have X11 installed, but AFAIK freeimage doesn’t  
> > require it.
> > 
> > I’m pretty clueless when it comes to command-line stuff (before I got  
> > into RoR the last time I did any serious delvelopment was in the  
> > heyday  
> > of CodeWarrior), so if anyone here has any suggestions I (and the  
> > other  
> > guys having trouble installing freeimage with MacPorts) would really  
> > appreciate it.
> 
> You need to install the latest version of the MacOS X Developer tools  
> (you can download the 700 MB (IIRC) disk image from the Apple  
> Developer Connection site).
> 
> Best regards
> 
> Peter De Berdt

Thanks Peter, the culprit on my PPC machine was indeed an outdated  
installation of the OSX developer tools. I’ll try to tell the other  
people who’ve had the same problem.

-Jon Wolfe
