[MacRuby] #727: re.h header missing
#727: re.h header missing --------------------------------+------------------------------------------- Reporter: spamfaenger@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- I've tried to install the cucumber gem and this almost works, but when gherkin tries to compile it's native extension, it dies because it's missing the re.h header. Here's the error output: -- snip -- ["/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/bin/macruby extconf.rb", "checking for main() in -lc... yes creating Makefile ", "make", "/usr/bin/gcc -I. -I/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/include/ruby-1.9.0 /universal-darwin10.0 -I/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/include/ruby-1.9.0/ruby/backward -I/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/include/ruby-1.9.0 -I. -fno-common -fexceptions -fno-common -pipe -O3 -g -Wall -Wno- parentheses -O0 -Wall -Werror -arch i386 -arch x86_64 -o gherkin_lexer_ar.o -c gherkin_lexer_ar.c /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:11:16: error: re.h: No such file or directory cc1: warnings being treated as errors /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl: In function ‘store_pystring_content’: /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:298: warning: implicit declaration of function ‘rb_reg_regcomp’ /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl: In function ‘CLexer_scan’: /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:373: warning: initialization discards qualifiers from pointer target type {standard input}:5519:non-relocatable subtraction expression, \"L_rb_each$non_lazy_ptr\" minus \"L00000000003$pb\" {standard input}:5519:symbol: \"L_rb_each$non_lazy_ptr\" can't be undefined in a subtraction expression {standard input}:105:non-relocatable subtraction expression, \"L_rb_cFalseClass$non_lazy_ptr\" minus \"L00000000001$pb\" {standard input}:105:symbol: \"L_rb_cFalseClass$non_lazy_ptr\" can't be undefined in a subtraction expression {standard input}:95:non-relocatable subtraction expression, \"L_rb_cNilClass$non_lazy_ptr\" minus \"L00000000001$pb\" {standard input}:95:symbol: \"L_rb_cNilClass$non_lazy_ptr\" can't be undefined in a subtraction expression {standard input}:80:non-relocatable subtraction expression, \"L_rb_cTrueClass$non_lazy_ptr\" minus \"L00000000001$pb\" {standard input}:80:symbol: \"L_rb_cTrueClass$non_lazy_ptr\" can't be undefined in a subtraction expression {standard input}:70:non-relocatable subtraction expression, \"L_rb_cFloat$non_lazy_ptr\" minus \"L00000000001$pb\" {standard input}:70:symbol: \"L_rb_cFloat$non_lazy_ptr\" can't be undefined in a subtraction expression {standard input}:58:non-relocatable subtraction expression, \"L_rb_cFixnum$non_lazy_ptr\" minus \"L00000000001$pb\" {standard input}:58:symbol: \"L_rb_cFixnum$non_lazy_ptr\" can't be undefined in a subtraction expression {standard input}:unknown:Undefined local symbol L_rb_cFixnum$non_lazy_ptr {standard input}:unknown:Undefined local symbol L_rb_cFloat$non_lazy_ptr {standard input}:unknown:Undefined local symbol L_rb_cTrueClass$non_lazy_ptr {standard input}:unknown:Undefined local symbol L_rb_cNilClass$non_lazy_ptr {standard input}:unknown:Undefined local symbol L_rb_cFalseClass$non_lazy_ptr {standard input}:unknown:Undefined local symbol L_rb_each$non_lazy_ptr /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:11:16: error: re.h: No such file or directory cc1: warnings being treated as errors /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl: In function ‘store_pystring_content’: /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:298: warning: implicit declaration of function ‘rb_reg_regcomp’ /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl: In function ‘CLexer_scan’: /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:373: warning: initialization discards qualifiers from pointer target type lipo: can't open input file: /var/folders/LF/LFMUjaMKFXapXskEhAG4+k+++TI/-Tmp-//ccEJtX9n.out (No such file or directory) make: *** [gherkin_lexer_ar.o] Error 1 "] -- snap -- -- Ticket URL: <http://www.macruby.org/trac/ticket/727> MacRuby <http://macruby.org/>
#727: re.h header missing --------------------------------+------------------------------------------- Reporter: spamfaenger@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by lsansonetti@…): In 0.6 we switched to another regular expression engine (ICU) and so I deleted the oniguruma headers. I will see what API of re.h the cucumber extension is using, we should try to emulate it somehow. -- Ticket URL: <http://www.macruby.org/trac/ticket/727#comment:1> MacRuby <http://macruby.org/>
#727: re.h header missing --------------------------------+------------------------------------------- Reporter: spamfaenger@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by spamfaenger@…): From my last look at the re.h header from ruby it seemed to be quite small - maybe it can be emulated completely? -- Ticket URL: <http://www.macruby.org/trac/ticket/727#comment:3> MacRuby <http://macruby.org/>
#727: re.h header missing --------------------------------+------------------------------------------- Reporter: spamfaenger@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by lsansonetti@…): The header is indeed small and could be emulated. However, apparently we already do ship an empty re.h file, but it can only be required using "#include <ruby/re.h>" like Ruby 1.9. I suspect the cucumber gem either doesn't support 1.9 or does not recognize MacRuby as 1.9. -- Ticket URL: <http://www.macruby.org/trac/ticket/727#comment:4> MacRuby <http://macruby.org/>
#727: re.h header missing --------------------------------+------------------------------------------- Reporter: spamfaenger@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: Looks like we missed the HAVE_RUBY_RE_H define. I added it and exported the function the gem is using in r4399 and it builds better. However, it still fails, because it compiles with -Werror and there is a warning. {{{ /usr/bin/gcc -I. -I/Library/Frameworks/MacRuby.framework/Versions/0.7/usr/include/ruby-1.9.2 /universal-darwin11.0 -I/Library/Frameworks/MacRuby.framework/Versions/0.7/usr/include/ruby-1.9.2/ruby/backward -I/Library/Frameworks/MacRuby.framework/Versions/0.7/usr/include/ruby-1.9.2 -I. -fno-common -arch i386 -arch x86_64 -fexceptions -fno-common -pipe -O3 -g -Wall -O0 -Wall -Werror -arch i386 -arch x86_64 -o gherkin_lexer_ar.o -c gherkin_lexer_ar.c cc1: warnings being treated as errors /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl: In function ‘CLexer_scan’: /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:402: warning: initialization discards qualifiers from pointer target type cc1: warnings being treated as errors /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl: In function ‘CLexer_scan’: /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:402: warning: initialization discards qualifiers from pointer target type }}} {{{ VALUE input_copy = rb_str_dup(input); rb_str_append(input_copy, rb_str_new2("\n%_FEATURE_END_%")); char *data = RSTRING_PTR(input_copy); size_t len = RSTRING_LEN(input_copy); }}} In MacRuby, RSTRING_PTR returns a const pointer. I'm afraid this isn't going to change. If the gem wants to be used in MacRuby the developer has to modify this. Since the re.h problem is solved, I'm closing this bug. -- Ticket URL: <http://www.macruby.org/trac/ticket/727#comment:5> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby