# RMagick on Mac OS X - weird error

**URL:** <https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266>\
**Category:** Rails\
**Created:** [March 18, 2008, 3:12pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266 "2008-03-18T15:12:00Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 3:12pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/1 "2008-03-18T15:12:00Z")

</div>

Hey,

I’m trying to install RMagick on Leopard, and I’ve already installed  
ImageMagick. Here’s the version I have:  
$ convert -version  
Version: ImageMagick 6.3.9 03/17/08 Q8 [http://www.imagemagick.org](http://www.imagemagick.org)  
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

I downloaded RMagick-1.15.13.tar.gz from this page:  
[http://rubyforge.org/frs/?group\_id=12&release\_id=18732](http://rubyforge.org/frs/?group_id=12&release_id=18732)

There are some simple instructions once you extract RMagick.  
$ ./configure   
$ make  
($ su)  
$ make install  
(optionally)  
$ make clean

I ran “./configure” and everything seemed to run fine.

Then I ran “make” and after a bit, got these weird errors:  
rmimage.c: In function â€˜Image\_delayâ€™:  
rmimage.c:3569: error: â€˜C\_unsignedâ€™ undeclared (first use in this  
function)  
rmimage.c:3569: error: (Each undeclared identifier is reported only once  
rmimage.c:3569: error: for each function it appears in.)  
rmimage.c:3569: error: syntax error before â€˜long\_to\_R\_unsignedâ€™

I’ve searched for solutions to this, but haven’t found anything. Can  
anyone help? rmagick has been driving me bonkers.

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/2 "2008-03-18T16:54:39Z")

</div>

> I’m trying to install RMagick on Leopard, and I’ve already installed  
> ImageMagick. Here’s the version I have:  
> $ convert -version  
> Version: ImageMagick 6.3.9 03/17/08 Q8 [http://www.imagemagick.org](http://www.imagemagick.org)  
> Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
> 
> I downloaded RMagick-1.15.13.tar.gz from this page:  
> [http://rubyforge.org/frs/?group\_id=12&release\_id=18732](http://rubyforge.org/frs/?group_id=12&release_id=18732)

Why not download 2.2.2?

I’m on leopard…

$ convert -version  
Version: ImageMagick 6.3.9 03/12/08 Q16 [http://www.imagemagick.org](http://www.imagemagick.org)  
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

$ gem search rmagick

\*\*\* LOCAL GEMS \*\*\*  
rmagick (2.2.2)

I just did “sudo gem install rmagick” though…

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/3 "2008-03-18T17:10:43Z")

</div>

I tried to use rmagick-1.15.13 just because I had it working on another  
computer.

But anyhoo, if I try  
sudo gem install rmagick

I get this error:  
Building native extensions. This could take a while…  
ERROR: Error installing rmagick:  
ERROR: Failed to build gem native extension.

and then these errors at the end:  
rmimage.c:3181: error: â€˜C\_unsignedâ€™ undeclared (first use in this  
function)  
rmimage.c:3181: error: (Each undeclared identifier is reported only once  
rmimage.c:3181: error: for each function it appears in.)  
rmimage.c:3181: error: syntax error before â€˜long\_to\_R\_unsignedâ€™

Does anyone know why I can’t seem to install rmagick?

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/4 "2008-03-18T18:01:23Z")

</div>

> and then these errors at the end:  
> rmimage.c:3181: error: ‘C\_unsigned’ undeclared (first use in this  
> function)  
> rmimage.c:3181: error: (Each undeclared identifier is reported only once  
> rmimage.c:3181: error: for each function it appears in.)  
> rmimage.c:3181: error: syntax error before ‘long\_to\_R\_unsigned’
> 
> Does anyone know why I can’t seem to install rmagick?

Do you have Xcode installed?

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 5:27pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/5 "2008-03-18T17:27:41Z")

</div>

I posted to below guy…ooops:

My 2 cents:  
In my experience with ImageMagick and RMagick on OSX. You need the  
latest version of Xcode installed with the latest X11 also. The gem  
actually does compilation too if I recall and you can spend hours  
trying to figure out issues that have to do with older libs. Do this  
first and then retry.

H

On Mar 18, 10:12 am, Joe P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/6 "2008-03-18T18:44:09Z")

</div>

I tested ImageMagick by converting a .gif to a .jpg, and it worked  
great.

My only problem seems to be rmagick. Whenever I try  
“sudo gem install rmagick”  
I get  
Building native extensions. This could take a while…  
ERROR: Error installing rmagick:  
ERROR: Failed to build gem native extension.

Do I need to specify some options when I install rmagick?

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 7:07pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/7 "2008-03-18T19:07:52Z")

</div>

My 2 cents:  
In my experience with ImageMagick and RMagick on OSX. You need the  
latest version of Xcode installed with the latest X11 also. The gem  
actually does compilation too if I recall and you can spend hours  
trying to figure out issues that have to do with older libs. Do this  
first and then retry.

H

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 7:30pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/8 "2008-03-18T19:30:24Z")

</div>

blasterpal wrote:

> My 2 cents:  
> In my experience with ImageMagick and RMagick on OSX. You need the  
> latest version of Xcode installed with the latest X11 also. The gem  
> actually does compilation too if I recall and you can spend hours  
> trying to figure out issues that have to do with older libs. Do this  
> first and then retry.
> 
> H

How can I see what versions of XCode and X11 I have installed?

Thanks for all advice, I still have hope that I’ll get RMagick working  
on this computer 🙂

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 6:18pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/9 "2008-03-18T18:18:07Z")

</div>

I am pretty sure Xcode is installed – doing “locate xcode” yields a lot  
of results.

I can install all other gems, but not rmagick. I already have  
ImageMagick installed, too. Any ideas on what the problem could be?

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 7:46pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/10 "2008-03-18T19:46:25Z")

</div>

Welp, looks like I already have X11 on the computer:

$ X -version  
TransformProcessType: Success  
X11.app starting:  
[X.org](http://X.org) Release 7.2  
[X.Org](http://X.Org) Xquartz X Server 1.3.0-apple5  
Build Date: 20080109

Also, I already have XCode:  
version 3.0

So those seem fine. Plus I have ImageMagick installed. What more do I  
need to do to be able to install RMagick??

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 18, 2008, 11:59pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/11 "2008-03-18T23:59:23Z")

</div>

installing RMagick is always a tricky one. Recommend checking out this  
installer script: [http://rubyforge.org/frs/?group\_id=12&release\_id=16101](http://rubyforge.org/frs/?group_id=12&release_id=16101)

On Mar 18, 11:46 am, Joe P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 19, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/rmagick-on-mac-os-x-weird-error/132266/12 "2008-03-19T16:14:27Z")

</div>

[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> installing RMagick is always a tricky one. Recommend checking out this  
> installer script: [http://rubyforge.org/frs/?group\_id=12&release\_id=16101](http://rubyforge.org/frs/?group_id=12&release_id=16101)  
> It definitely is a tricky one. I’ve already tried that, to no avail.  
> My guess now is that I have more than one version of ImageMagick  
> installed.

$ convert -version  
Version: ImageMagick 6.3.9 03/17/08 Q8 [http://www.imagemagick.org](http://www.imagemagick.org)  
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

But when I do “locate ImageMagick” it just finds a bunch of  
ImageMagick-6.3.2 files, no ImageMagick-6.3.9 files at all. And when I  
go to look at those ImageMagick-6.3.2 files, they aren’t there.

Does anyone have some good advice on how to completely remove  
ImageMagick? It’s like a week that I can’t kill…
