I'm trying to install tmail in macruby 0.6. While building the native extensions, I get the following. Ideas? Building native extensions. This could take a while... ERROR: Error installing tmail: make failed: ["/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/bin/macruby extconf.rb", "creating Makefile\n", "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 -D_FILE_OFFSET_BITS=64 -arch i386 -arch x86_64 -o tmailscanner.o -c tmailscanner.c\ntmailscanner.c:32:16: error: re.h: No such file or directory\ntmailscanner.c: In function 'mails_s_new':\ntmailscanner.c:93: warning: assignment discards qualifiers from pointer target type\ntmailscanner.c: In function 'skip_japanese_string':\ntmailscanner.c:218: warning: implicit declaration of function 'ismbchar'\ntmailscanner.c:219: warning: implicit declaration of function 'mbclen'\ntmailscanner.c: In function 'digit_p':\ntmailscanner.c:410: warning: assignment discards qualifiers from pointer target type\ntmailscanner.c: In function 'atomsym':\ntmailscanner.c:430: warning: initialization discards qualifiers from pointer target type\ntmailscanner.c:32:16: error: re.h: No such file or directory\ntmailscanner.c: In function 'mails_s_new':\ntmailscanner.c:93: warning: assignment discards qualifiers from pointer target type\ntmailscanner.c: In function 'skip_japanese_string':\ntmailscanner.c:218: warning: implicit declaration of function 'ismbchar'\ntmailscanner.c:219: warning: implicit declaration of function 'mbclen'\ntmailscanner.c: In function 'digit_p':\ntmailscanner.c:410: warning: assignment discards qualifiers from pointer target type\ntmailscanner.c: In function 'atomsym':\ntmailscanner.c:430: warning: initialization discards qualifiers from pointer target type\nlipo: can't open input file: /var/tmp//ccheFt8w.out (No such file or directory)\nmake: *** [tmailscanner.o] Error 1\n"] ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
Sorry - I posted that too fast. Ignore it. I'll do more digging. ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
The problem with installing TMail are lines like this in tmailscanner.c #ifdef HAVE_RUBY_VM_H #include "ruby/re.h" #include "ruby/encoding.h" #else #include "re.h" #endif I suspect "HAVE_RUBY_VM_H" is being used as a synonym for "on 1.9". It's defined once in the 1.9 source I have, never used. It's not defined in either 1.8.7 or MacRuby. Is there a more correct way to say "compiling against 1.9"? I don't see anything obvious in the include files, other than parsing it out of paths. (Is there a correct way to say "compiling against MacRuby?") ============= Hacking around that gets tmailscanner.c to compile, but tmail also requires 'nkf.bundle', which exists in 1.8 but not in MacRuby. I might try to compile the version out of 1.9, but this pile of yak hair is getting pretty deep, considering I just want to parse RFC822 headers. ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
Well, loading a compiled NKF library leads to this: dyld: lazy symbol binding failed: Symbol not found: _rb_enc_find_index Referenced from: /Users/marick/src/clients/SES/Lib/nkf.bundle Expected in: flat namespace dyld: Symbol not found: _rb_enc_find_index Referenced from: /Users/marick/src/clients/SES/Lib/nkf.bundle Expected in: flat namespace Compilation looked like this: /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 -arch i386 -arch x86_64 -o nkf.o -c nkf.c /usr/bin/gcc -dynamic -bundle -undefined suppress -flat_namespace -arch i386 -arch x86_64 -o nkf.bundle nkf.o -L. -L/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib -arch i386 -arch x86_64 -lmacruby It's been 15-some years since I last used a C compiler in anger, so I'm out of my depth. ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
Hi Brian, On May 12, 2010, at 10:17 AM, Brian Marick wrote:
The problem with installing TMail are lines like this in tmailscanner.c
#ifdef HAVE_RUBY_VM_H #include "ruby/re.h" #include "ruby/encoding.h" #else #include "re.h" #endif
I suspect "HAVE_RUBY_VM_H" is being used as a synonym for "on 1.9". It's defined once in the 1.9 source I have, never used. It's not defined in either 1.8.7 or MacRuby.
Is there a more correct way to say "compiling against 1.9"? I don't see anything obvious in the include files, other than parsing it out of paths.
(I should have read all the messages first :-).) I agree, it sounds like they use HAVE_RUBY_VM_H to determine if they build against 1.9. We need to define that variable in MacRuby too. I don't think there is a better way yet. I know that Nokogiri does something even worse (it assumes it's 1.9 if the encoding.h header exists, or something similar).
Hacking around that gets tmailscanner.c to compile, but tmail also requires 'nkf.bundle', which exists in 1.8 but not in MacRuby. I might try to compile the version out of 1.9, but this pile of yak hair is getting pretty deep, considering I just want to parse RFC822 headers.
We don't compile the nkf extension yet because we thought it wouldn't been necessary with the new 1.9 encodings API. But it looks like we might have to ship it nevertheless. I suspect we should be able to make a pure Ruby version for it. In the meantime, I'm afraid you will have to hack the tmail sources to avoid using nkf (or create a fake nkf.rb file and put it in the path). Laurent
On May 12, 2010, at 2:42 PM, Laurent Sansonetti wrote:
In the meantime, I'm afraid you will have to hack the tmail sources to avoid using nkf (or create a fake nkf.rb file and put it in the path).
I switched to trying mail-2.2.0, but it runs into problems with various pieces of active_support. # require 'active_support/dependencies' # include ActiveSupport::CoreExtensions::String::OutputSafety # include ActiveSupport::CoreExtensions::Range::IncludeRange # include ActiveSupport::CoreExtensions::Range::BlocklessStep I notice active_support didn't make it into 0.6. Is it a priority for 0.7? ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
On May 12, 2010, at 1:52 PM, Brian Marick wrote:
On May 12, 2010, at 2:42 PM, Laurent Sansonetti wrote:
In the meantime, I'm afraid you will have to hack the tmail sources to avoid using nkf (or create a fake nkf.rb file and put it in the path).
I switched to trying mail-2.2.0, but it runs into problems with various pieces of active_support.
# require 'active_support/dependencies' # include ActiveSupport::CoreExtensions::String::OutputSafety
# include ActiveSupport::CoreExtensions::Range::IncludeRange # include ActiveSupport::CoreExtensions::Range::BlocklessStep
I notice active_support didn't make it into 0.6. Is it a priority for 0.7?
Hopefully yes! Running the Rails libraries has never been a priority so far, but hopefully we might be able to run it out of the box in 0.7. Laurent
On May 12, 2010, at 12:42 PM, Laurent Sansonetti wrote:
Hi Brian,
On May 12, 2010, at 10:17 AM, Brian Marick wrote:
The problem with installing TMail are lines like this in tmailscanner.c
#ifdef HAVE_RUBY_VM_H #include "ruby/re.h" #include "ruby/encoding.h" #else #include "re.h" #endif
I suspect "HAVE_RUBY_VM_H" is being used as a synonym for "on 1.9". It's defined once in the 1.9 source I have, never used. It's not defined in either 1.8.7 or MacRuby.
Is there a more correct way to say "compiling against 1.9"? I don't see anything obvious in the include files, other than parsing it out of paths.
(I should have read all the messages first :-).)
I agree, it sounds like they use HAVE_RUBY_VM_H to determine if they build against 1.9. We need to define that variable in MacRuby too.
I don't think there is a better way yet. I know that Nokogiri does something even worse (it assumes it's 1.9 if the encoding.h header exists, or something similar).
Hacking around that gets tmailscanner.c to compile, but tmail also requires 'nkf.bundle', which exists in 1.8 but not in MacRuby. I might try to compile the version out of 1.9, but this pile of yak hair is getting pretty deep, considering I just want to parse RFC822 headers.
We don't compile the nkf extension yet because we thought it wouldn't been necessary with the new 1.9 encodings API. But it looks like we might have to ship it nevertheless. I suspect we should be able to make a pure Ruby version for it.
In the meantime, I'm afraid you will have to hack the tmail sources to avoid using nkf (or create a fake nkf.rb file and put it in the path).
I added HAVE_RUBY_VM_H in r4086 and filed https://www.macruby.org/trac/ticket/708 to track the nkf support. Laurent
"mailscanner.c:32:16: error: re.h: No such file or directory" I suspect it's doing require "re.h" In Ruby 1.9, the following should be done instead require "ruby/re.h" Laurent On May 12, 2010, at 8:01 AM, Brian Marick wrote:
I'm trying to install tmail in macruby 0.6. While building the native extensions, I get the following. Ideas?
Building native extensions. This could take a while... ERROR: Error installing tmail: make failed:
["/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/bin/macruby extconf.rb", "creating Makefile\n", "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 -D_FILE_OFFSET_BITS=64 -arch i386 -arch x86_64 -o tmailscanner.o -c tmailscanner.c\ntmailscanner.c:32:16: error: re.h: No such file or directory\ntmailscanner.c: In function 'mails_s_new':\ntmailscanner.c:93: warning: assignment discards qualifiers from pointer target type\ntmailscanner.c: In function 'skip_japanese_string':\ntmailscanner.c:218: warning: implicit declaration of function 'ismbchar'\ntmailscanner.c:219: warning: implicit declaration of function 'mbclen'\ntmailscanner.c: In function 'digit_p':\ntmai lscanner.c:410: warning: assignment discards qualifiers from pointer target type\ntmailscanner.c: In function 'atomsym':\ntmailscanner.c:430: warning: initialization discards qualifiers from pointer target type\ntmailscanner.c:32:16: error: re.h: No such file or directory\ntmailscanner.c: In function 'mails_s_new':\ntmailscanner.c:93: warning: assignment discards qualifiers from pointer target type\ntmailscanner.c: In function 'skip_japanese_string':\ntmailscanner.c:218: warning: implicit declaration of function 'ismbchar'\ntmailscanner.c:219: warning: implicit declaration of function 'mbclen'\ntmailscanner.c: In function 'digit_p':\ntmailscanner.c:410: warning: assignment discards qualifiers from pointer target type\ntmailscanner.c: In function 'atomsym':\ntmailscanner.c:430: warning: initialization discards qualifiers from pointer target type\nlipo: can't open input file: /var/tmp//ccheFt8w.out (No such file or directory)\nmake: *** [tmailscanner.o] Error 1\n"]
----- Brian Marick, independent consultant Mostly on agile methods with a testing slant Author of /Programming Cocoa with Ruby/ www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (2)
-
Brian Marick
-
Laurent Sansonetti