[MacRuby] #1378: RE2 gem will not compile

MacRuby ruby-noreply at macosforge.org
Thu Aug 18 11:53:11 PDT 2011


#1378: RE2 gem will not compile
------------------------------+---------------------------------------------
 Reporter:  xperts@…          |       Owner:  lsansonetti@…        
     Type:  defect            |      Status:  new                  
 Priority:  blocker           |   Milestone:                       
Component:  MacRuby           |    Keywords:                       
------------------------------+---------------------------------------------
 I had thought that C based gems didn't work at all with MacRuby 1.0.  But
 Matt suggested I make a ticket on this issue.  I'm having an issue where I
 need named expression groups to work with my regexps, this doesn't work
 within MacRuby so I've tried to install RE2, but that doesn't work either:

 sudo macgem install re2
 Password:
 Building native extensions.  This could take a while...
 ERROR:  Error installing re2:
         ERROR: Failed to build gem native extension.

 /Library/Frameworks/MacRuby.framework/Versions/0.10/usr/bin/macruby
 extconf.rb
 checking for main() in -lstdc++... yes
 checking for main() in -lre2... yes
 creating Makefile

 make
 /usr/bin/g++ -I.
 -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2
 /universal-darwin10.0
 -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2/ruby/backward
 -I/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/include/ruby-1.9.2
 -I. -I/usr/local/include  -fno-common -arch x86_64 -fexceptions -fno-
 common -pipe -O3 -g -Wall -Wall -Wextra -funroll-loops -arch x86_64 -arch
 x86_64 -o re2.o -c re2.cc
 re2.cc: In function ‘void re2_matchdata_mark(re2_matchdata*)’:
 re2.cc:45: error: ‘rb_gc_mark’ was not declared in this scope
 re2.cc: In function ‘VALUE re2_Replace(VALUE, VALUE, VALUE, VALUE)’:
 re2.cc:933: error: invalid conversion from ‘const void*’ to ‘void*’
 re2.cc:933: error:   initializing argument 1 of ‘void* memcpy(void*, const
 void*, size_t)’
 re2.cc: In function ‘VALUE re2_GlobalReplace(VALUE, VALUE, VALUE, VALUE)’:
 re2.cc:983: error: invalid conversion from ‘const void*’ to ‘void*’
 re2.cc:983: error:   initializing argument 1 of ‘void* memcpy(void*, const
 void*, size_t)’
 make: *** [re2.o] Error 1

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1378>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list