# Error, while compiling ruby/pango on my mac

**URL:** <https://www.ruby-forum.com/t/error-while-compiling-ruby-pango-on-my-mac/139970>\
**Category:** Ruby-Gnome 2\
**Created:** [June 9, 2008, 5:33pm UTC](https://www.ruby-forum.com/t/error-while-compiling-ruby-pango-on-my-mac/139970 "2008-06-09T17:33:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![webmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@webmonkey](https://www.ruby-forum.com/u/webmonkey)\
**Post date:** [June 9, 2008, 5:33pm UTC](https://www.ruby-forum.com/t/error-while-compiling-ruby-pango-on-my-mac/139970/1 "2008-06-09T17:33:07Z")

</div>

Hi there.  
I tried to compile and install ruby/gnome2 (ver. 0.17.0rc1 ) on my  
system (Mac OSX 10.5, PPC G4).  
Everything worked fine, except the pango/ruby-package was cpmplaining,  
during the “make”-process.

I got the following errors:

rbpangolayoutiter.c:27: error: invalid application of â€˜sizeofâ€™ to  
incomplete type â€˜PangoLayoutIterâ€™  
rbpangolayoutiter.c:28: error: dereferencing pointer to incomplete type  
rbpangolayoutiter.c:28: error: dereferencing pointer to incomplete type  
rbpangolayoutiter.c: In function â€˜layout\_iter\_copyâ€™:  
rbpangolayoutiter.c:27: error: invalid application of â€˜sizeofâ€™ to  
incomplete type â€˜PangoLayoutIterâ€™  
rbpangolayoutiter.c:28: error: dereferencing pointer to incomplete type  
rbpangolayoutiter.c:28: error: dereferencing pointer to incomplete type  
lipo: can’t open input file:  
/var/folders/YC/YCMZBk2ZHlyLER20dBkBYk+++TI/-Tmp-[//cc6EO8Hc.out](https://cc6EO8Hc.out) (No such  
file or directory)  
make[1]: \*\*\* [rbpangolayoutiter.o] Error 1  
make: \*\*\* [all] Error 2

I also tried those older versions of ruby/gnome2 (0.16, 0.15), but I got  
even more errors with them.  
GTK+ is already installed.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![webmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@webmonkey](https://www.ruby-forum.com/u/webmonkey)\
**Post date:** [June 10, 2008, 2:05pm UTC](https://www.ruby-forum.com/t/error-while-compiling-ruby-pango-on-my-mac/139970/2 "2008-06-10T14:05:17Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] Error, while compiling ruby/pango on my  
mac…” on Mon, 9 Jun 2008 17:33:07 +0200,  
Julian W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I tried to compile and install ruby/gnome2 (ver. 0.17.0rc1 ) on my  
> system (Mac OSX 10.5, PPC G4).  
> Everything worked fine, except the pango/ruby-package was cpmplaining,  
> during the “make”-process.
> 
> I got the following errors:
> 
> rbpangolayoutiter.c:27: error: invalid application of â€˜sizeofâ€™ to  
> incomplete type â€˜PangoLayoutIterâ€™

What about the following patch?

# Index: rbpangolayoutiter.c

— rbpangolayoutiter.c (revision 3234)  
+++ rbpangolayoutiter.c (working copy)  
@@ -14,7 +14,7 @@  
#define \_SELF(r) ((PangoLayoutIter\*)RVAL2BOXED(r,  
PANGO\_TYPE\_LAYOUT\_ITER))

/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*_/  
-#if ! HAVE\_PANGO\_LAYOUT\_ITER\_GET\_TYPE  
+#ifndef HAVE\_PANGO\_LAYOUT\_ITER\_GET\_TYPE  
static PangoLayoutIter  
layout\_iter\_copy(ref)  
const PangoLayoutIter_ ref;

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![webmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@webmonkey](https://www.ruby-forum.com/u/webmonkey)\
**Post date:** [June 10, 2008, 5:29pm UTC](https://www.ruby-forum.com/t/error-while-compiling-ruby-pango-on-my-mac/139970/3 "2008-06-10T17:29:57Z")

</div>

Kouhei S. wrote:

> Hi,
> 
> In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> “[ruby-gnome2-devel-en] Error, while compiling ruby/pango on my  
> mac…” on Mon, 9 Jun 2008 17:33:07 +0200,  
> Julian W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I tried to compile and install ruby/gnome2 (ver. 0.17.0rc1 ) on my  
> > system (Mac OSX 10.5, PPC G4).  
> > Everything worked fine, except the pango/ruby-package was cpmplaining,  
> > during the “make”-process.
> > 
> > I got the following errors:
> > 
> > rbpangolayoutiter.c:27: error: invalid application of â€˜sizeofâ€™ to  
> > incomplete type â€˜PangoLayoutIterâ€™
> 
> What about the following patch?
> 
> # Index: rbpangolayoutiter.c
> 
> — rbpangolayoutiter.c (revision 3234)  
> +++ rbpangolayoutiter.c (working copy)  
> @@ -14,7 +14,7 @@  
> #define \_SELF(r) ((PangoLayoutIter\*)RVAL2BOXED(r,  
> PANGO\_TYPE\_LAYOUT\_ITER))
> 
> /\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*_/  
> -#if ! HAVE\_PANGO\_LAYOUT\_ITER\_GET\_TYPE  
> +#ifndef HAVE\_PANGO\_LAYOUT\_ITER\_GET\_TYPE  
> static PangoLayoutIter  
> layout\_iter\_copy(ref)  
> const PangoLayoutIter_ ref;
> 
> ## Thanks,
> 
> kou

I thank you for your quick responce.  
So I patched the file that way:  
I saved your patch as a .diff file and did =\> patch --input  
…/patch.diff in the src dir.

As I configured and compiled the pango/ruby-package once more it failed  
again and exactly the same errors appeared.

---

<div class="post-metadata">

**Author:** ![webmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@webmonkey](https://www.ruby-forum.com/u/webmonkey)\
**Post date:** [June 11, 2008, 1:29am UTC](https://www.ruby-forum.com/t/error-while-compiling-ruby-pango-on-my-mac/139970/4 "2008-06-11T01:29:14Z")

</div>

Julian W. wrote:

> Kouhei S. wrote:
> 
> > Hi,
> > 
> > In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > “[ruby-gnome2-devel-en] Error, while compiling ruby/pango on my  
> > mac…” on Mon, 9 Jun 2008 17:33:07 +0200,  
> > Julian W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > I tried to compile and install ruby/gnome2 (ver. 0.17.0rc1 ) on my  
> > > system (Mac OSX 10.5, PPC G4).  
> > > Everything worked fine, except the pango/ruby-package was cpmplaining,  
> > > during the “make”-process.
> > > 
> > > I got the following errors:
> > > 
> > > rbpangolayoutiter.c:27: error: invalid application of â€˜sizeofâ€™ to  
> > > incomplete type â€˜PangoLayoutIterâ€™
> > 
> > What about the following patch?
> > 
> > # Index: rbpangolayoutiter.c
> > 
> > — rbpangolayoutiter.c (revision 3234)  
> > +++ rbpangolayoutiter.c (working copy)  
> > @@ -14,7 +14,7 @@  
> > #define \_SELF(r) ((PangoLayoutIter\*)RVAL2BOXED(r,  
> > PANGO\_TYPE\_LAYOUT\_ITER))
> > 
> > /\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*_/  
> > -#if ! HAVE\_PANGO\_LAYOUT\_ITER\_GET\_TYPE  
> > +#ifndef HAVE\_PANGO\_LAYOUT\_ITER\_GET\_TYPE  
> > static PangoLayoutIter  
> > layout\_iter\_copy(ref)  
> > const PangoLayoutIter_ ref;
> > 
> > ## Thanks,
> > 
> > kou
> 
> I thank you for your quick responce.  
> So I patched the file that way:  
> I saved your patch as a .diff file and did =\> patch --input  
> …/patch.diff in the src dir.
> 
> As I configured and compiled the pango/ruby-package once more it failed  
> again and exactly the same errors appeared.

Hi,

I had the same error, and I fixed it by replacing, in file  
“pango/src/pangolayoutiter.c” at about line 22  
#if PANGO\_CHECK\_VERSION(1,6,0)  
with  
#if 0  
Thereby effectively commenting out the section where the comment  
predicts breakage.

---

<div class="post-metadata">

**Author:** ![webmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@webmonkey](https://www.ruby-forum.com/u/webmonkey)\
**Post date:** [June 11, 2008, 1:45am UTC](https://www.ruby-forum.com/t/error-while-compiling-ruby-pango-on-my-mac/139970/5 "2008-06-11T01:45:46Z")

</div>

2008/6/11 Julian W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> As I configured and compiled the pango/ruby-package once more it failed  
> again and exactly the same errors appeared.

What about the following patch?

And could you show your ‘ruby extconf.rb’ output and mkmf.log?

# Index: pango/extconf.rb

— pango/extconf.rb (revision 3238)  
+++ pango/extconf.rb (working copy)  
@@ -16,17 +16,18 @@  
PKGConfig.have\_package(‘pango’) or exit 1  
setup\_win32(PACKAGE\_NAME)

-have\_func(“pango\_layout\_iter\_get\_type”)  
-have\_func(“pango\_layout\_set\_ellipsize”)  
-have\_func(“pango\_layout\_get\_font\_description”)  
-have\_func(“pango\_render\_part\_get\_type”)  
-have\_func(“pango\_attr\_strikethrough\_color\_new”)  
-have\_func(“pango\_attr\_underline\_color\_new”)  
-have\_func(“pango\_glyph\_item\_free”)  
-have\_func(“pango\_glyph\_item\_get\_type”)  
-have\_func(“pango\_attr\_iterator\_get\_attrs”)  
-have\_func(“pango\_itemize\_with\_base\_dir”)  
-have\_func(“pango\_font\_family\_is\_monospace”)  
+pango\_header = “pango/pango.h”  
+have\_func(“pango\_layout\_iter\_get\_type”, pango\_header)  
+have\_func(“pango\_layout\_set\_ellipsize”, pango\_header)  
+have\_func(“pango\_layout\_get\_font\_description”, pango\_header)  
+have\_func(“pango\_render\_part\_get\_type”, pango\_header)  
+have\_func(“pango\_attr\_strikethrough\_color\_new”, pango\_header)  
+have\_func(“pango\_attr\_underline\_color\_new”, pango\_header)  
+have\_func(“pango\_glyph\_item\_free”, pango\_header)  
+have\_func(“pango\_glyph\_item\_get\_type”, pango\_header)  
+have\_func(“pango\_attr\_iterator\_get\_attrs”, pango\_header)  
+have\_func(“pango\_itemize\_with\_base\_dir”, pango\_header)  
+have\_func(“pango\_font\_family\_is\_monospace”, pango\_header)

PKGConfig.have\_package(‘pangocairo’)  
if have\_header(‘rb\_cairo.h’)

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![webmonkey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@webmonkey](https://www.ruby-forum.com/u/webmonkey)\
**Post date:** [June 11, 2008, 1:45am UTC](https://www.ruby-forum.com/t/error-while-compiling-ruby-pango-on-my-mac/139970/6 "2008-06-11T01:45:42Z")

</div>

Many thanks!  
It works just fine.  
Now there is a real solution online for that issue.  
(… I think so)
