title: Problem installing oniguruma gem on Snow Leopard
body: <p>I'm on Snow Leopard 10.6.4, Intel architecture.</p>
  
  <p>I've got rvm and ruby 1.9.2 installed:</p>
  
  <pre><code>$ rvm list
  rvm rubies
  
  =&gt; ruby-1.9.2-p0 [ x86_64 ]
  </code></pre>
  
  <p>I installed oniguruma5 like this:</p>
  
  <pre><code>port install oniguruma5
  </code></pre>
  
  <p>Then, as per Conventional Wisdom, I tried to install the oniguruma gem like this:</p>
  
  <pre><code>sudo gem install oniguruma -- --with-opt-dir=/opt/local
  </code></pre>
  
  <p>But I get a compile error:</p>
  
  <pre><code>Julie:lender bhaupt$ sudo gem install oniguruma -- --with-opt-dir=/opt/local
  Building native extensions.  This could take a while...
  ERROR:  Error installing oniguruma:
   ERROR: Failed to build gem native extension.
  
  /Users/bhaupt/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb --with-opt-dir=/opt/local
  checking for main() in -lonig... yes
  creating Makefile
  
  make
  gcc -I. -I/Users/bhaupt/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/x86_64-darwin10.4.0 -I/Users/bhaupt/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby/backward -I/Users/bhaupt/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -Wall  -o oregexp.o -c oregexp.c
  oregexp.c: In function ‘name_callback’:
  oregexp.c:111: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
  oregexp.c:111: warning: pointer targets in passing argument 1 of ‘rb_intern2’ differ in signedness
  oregexp.c:111: warning: pointer targets in passing argument 1 of ‘rb_intern’ differ in signedness
  oregexp.c: In function ‘oregexp_initialize’:
  oregexp.c:123: error: ‘struct RString’ has no member named ‘ptr’
  oregexp.c:124: error: ‘struct RString’ has no member named ‘len’
  oregexp.c:138: warning: pointer targets in passing argument 1 of ‘onig_error_code_to_str’ differ in signedness
  oregexp.c: In function ‘oregexp_make_match_data’:
  oregexp.c:176: warning: passing argument 2 of ‘onig_foreach_name’ from incompatible pointer type
  oregexp.c: In function ‘oregexp_match’:
  oregexp.c:211: warning: statement with no effect
  oregexp.c:215: error: ‘struct RString’ has no member named ‘ptr’
  oregexp.c:216: error: ‘struct RString’ has no member named ‘len’
  oregexp.c:244: warning: pointer targets in passing argument 1 of ‘onig_error_code_to_str’ differ in signedness
  oregexp.c: In function ‘oregexp_append_replacement’:
  oregexp.c:267: error: ‘struct RString’ has no member named ‘len’
  oregexp.c:268: error: ‘struct RString’ has no member named ‘ptr’
  oregexp.c:277: error: ‘struct RString’ has no member named ‘ptr’
  oregexp.c:278: error: ‘struct RString’ has no member named ‘len’
  oregexp.c:286: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘OnigCodePoint’
  oregexp.c:293: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:297: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:328: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:332: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:336: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:341: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:350: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:371: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:379: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:385: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:392: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c: In function ‘str_mod_check’:
  oregexp.c:405: error: ‘struct RString’ has no member named ‘ptr’
  oregexp.c:405: error: ‘struct RString’ has no member named ‘len’
  oregexp.c: In function ‘oregexp_gsub’:
  oregexp.c:444: error: ‘struct RString’ has no member named ‘ptr’
  oregexp.c:445: error: ‘struct RString’ has no member named ‘len’
  oregexp.c:462: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:484: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c:491: warning: pointer targets in passing argument 2 of ‘rb_str_buf_cat’ differ in signedness
  oregexp.c: In function ‘oregexp_safe_gsub’:
  oregexp.c:527: warning: passing argument 3 of ‘rb_ensure’ from incompatible pointer type
  oregexp.c: In function ‘oregexp_scan’:
  oregexp.c:614: error: ‘struct RString’ has no member named ‘ptr’
  oregexp.c:615: error: ‘struct RString’ has no member named ‘len’
  oregexp.c: In function ‘oregexp_m_scan’:
  oregexp.c:671: warning: passing argument 3 of ‘rb_ensure’ from incompatible pointer type
  make: *** [oregexp.o] Error 1
  
  
  Gem files will remain installed in /Users/bhaupt/.rvm/gems/ruby-1.9.2-p0/gems/oniguruma-1.1.0 for inspection.
  Results logged to /Users/bhaupt/.rvm/gems/ruby-1.9.2-p0/gems/oniguruma-1.1.0/ext/gem_make.out
  </code></pre>
  
  <p>Ideas?</p>
  
  <p>I have confirmed that <code>/opt/local/include</code> contains <code>oniggnu.h</code>, <code>onigposix.h</code>, and <code>oniguruma.h</code></p>