[MacRuby-devel] [MacRuby] #765: framework is not supported in MacRuby static

2010-06-29 Thread MacRuby
#765: framework is not supported in MacRuby static
+---
 Reporter:  jazz...@…   |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:  MacRuby 0.7  
Component:  MacRuby |Keywords:   
+---
 {{{
 $ cat test.rb
 framework 'Foundation'
 p NSGregorianCalendar
 }}}

 {{{
 $ macruby test.rb
 "gregorian"
 }}}

 {{{
 $ macrubyc -o test --static test.rb
 $ ./test
 framework: is not supported in MacRuby static (RuntimeError)
 }}}

 Commenting out the framework  'Foundation' results in a

 {{{
 ./test.rb:4:in `': uninitialized constant NSGregorianCalendar
 (NameError)
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Compilation Clarification

2010-06-29 Thread B. Ohr
Hi!

> 
> In the upcoming 0.7 release static compilation will be permitted, you will be 
> able to generate a standalone binary that contains both the MacRuby runtime 
> (some features disabled) and your application code, in about 1.5MB for 
> regular-size apps.
> 

I tested that and it is looking great: only 1379704 bytes for my small app!

That size makes MacRuby really useable for Quicklook and Spotlight plugins. But 
what about garbage collection? 

If Macruby.sharedRuntime.evaluateString could use memory of an enclosing 
NSAutoreleasePool it would be very easy:


OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef 
preview, 
CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options)
{
  if (QLPreviewRequestIsCancelled(preview))
return noErr;
  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  …;
  NSMutableString* html = [[MacRuby sharedRuntime] evaluateString ….];
  QLPreviewRequestSetDataRepresentation(preview,
 (CFDataRef)[html dataUsingEncoding:NSUTF8StringEncoding], 
 kUTTypeHTML, (CFDictionaryRef)props);
  [pool release];
  return noErr;
}

- Bernd

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] Problems building r4303 trunk

2010-06-29 Thread Kenny Lovrin
Hi

I've been trying to build the MacRuby trunk for a few weeks now, but can't
get it to work. Via twitter I heard that r4303 fixed an issue with building,
so I just gave it a shot with the following result:

$ rake

echo '' > .objs/kernel_data.c
/Developer/usr/bin/llvm-gcc -arch i386 -fexceptions -fno-stack-protector -I.
-I./include -I./icu-1060  --emit-llvm -c kernel.c -o .objs/kernel-i386.bc
/usr/local/bin/opt -O3 .objs/kernel-i386.bc -o=.objs/kernel-i386.bc
/bin/dd if=/dev/zero count=1 bs=1 conv=notrunc >> .objs/kernel-i386.bc
2>/dev/null
/usr/bin/xxd -i .objs/kernel-i386.bc >> .objs/kernel_data.c
/Developer/usr/bin/llvm-gcc -arch x86_64 -fexceptions -fno-stack-protector
-I. -I./include -I./icu-1060  --emit-llvm -c kernel.c -o
.objs/kernel-x86_64.bc
/usr/local/bin/opt -O3 .objs/kernel-x86_64.bc -o=.objs/kernel-x86_64.bc
/bin/dd if=/dev/zero count=1 bs=1 conv=notrunc >> .objs/kernel-x86_64.bc
2>/dev/null
/usr/bin/xxd -i .objs/kernel-x86_64.bc >> .objs/kernel_data.c
/usr/bin/gcc-4.2 -std=c99 -I. -I./include -fno-common -pipe -g -Wall
-fexceptions -O3 -Wno-deprecated-declarations -Werror -arch i386 -arch
x86_64 -I./icu-1060 -c array.c -o .objs/array.o
Assertion failed: ((b->flags & flags) == flags), function
rb_vm_prepare_block, file dispatcher.cpp, line 1773.
Abort trap


This is after installing r106781 of llvm as described in both the commit log
and the updated README.
I am suspecting the problem is me, but I was wondering if there is anything
I can do to make it build? I have two computers on different versions of
MacRuby now, where one of them supports a gem i am using (managed to build
trunk a while ago), but I can't build trunk on my other machine (or any of
them actually), so I can't code on that machine. :)

Thanks,
Kenny
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #766: Problems building "any" revision of trunk

2010-06-29 Thread MacRuby
#766: Problems building "any" revision of trunk
---+
 Reporter:  kennylov...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  blocker|   Milestone:   
Component:  MacRuby|Keywords:   
---+
 Been trying to build trunk for several weeks, but always end up with
 "Assertion failed". Even after reinstalling llvm several times, trying
 several revisions (including those indicated in README). Following README
 with cut n paste doesn't build.

 I have the same problem on two separate machines, one iMac 24" 3.06ghz and
 one 2.53ghz Macbook Pro. Both running 10.6.4 and have XCode 3.2.3
 installed.

 Console output when trying to build:
 $ rake

 echo '' > .objs/kernel_data.c
 /Developer/usr/bin/llvm-gcc -arch i386 -fexceptions -fno-stack-protector
 -I. -I./include -I./icu-1060  --emit-llvm -c kernel.c -o
 .objs/kernel-i386.bc
 /usr/local/bin/opt -O3 .objs/kernel-i386.bc -o=.objs/kernel-i386.bc
 /bin/dd if=/dev/zero count=1 bs=1 conv=notrunc >> .objs/kernel-i386.bc
 2>/dev/null
 /usr/bin/xxd -i .objs/kernel-i386.bc >> .objs/kernel_data.c
 /Developer/usr/bin/llvm-gcc -arch x86_64 -fexceptions -fno-stack-protector
 -I. -I./include -I./icu-1060  --emit-llvm -c kernel.c -o .objs/kernel-
 x86_64.bc
 /usr/local/bin/opt -O3 .objs/kernel-x86_64.bc -o=.objs/kernel-x86_64.bc
 /bin/dd if=/dev/zero count=1 bs=1 conv=notrunc >> .objs/kernel-x86_64.bc
 2>/dev/null
 /usr/bin/xxd -i .objs/kernel-x86_64.bc >> .objs/kernel_data.c
 /usr/bin/gcc-4.2 -std=c99 -I. -I./include -fno-common -pipe -g -Wall
 -fexceptions -O3 -Wno-deprecated-declarations -Werror -arch i386 -arch
 x86_64 -I./icu-1060 -c array.c -o .objs/array.o
 Assertion failed: ((b->flags & flags) == flags), function
 rb_vm_prepare_block, file dispatcher.cpp, line 1773.
 Abort trap

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #766: Problems building "any" revision of trunk

2010-06-29 Thread MacRuby
#766: Problems building "any" revision of trunk
---+
 Reporter:  kennylov...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  blocker|   Milestone:   
Component:  MacRuby|Keywords:   
---+

Comment(by lsansone...@…):

 I suspect your /usr/bin/rake command is actually using an old version of
 MacRuby.

 Try editing the #! line of /usr/bin/rake and set it to /usr/bin/ruby
 instead.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #765: framework is not supported in MacRuby static

2010-06-29 Thread MacRuby
#765: framework is not supported in MacRuby static
+---
 Reporter:  jazz...@…   |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:  MacRuby 0.7  
Component:  MacRuby |Keywords:   
+---

Comment(by lsansone...@…):

 #framework is not supported via static compilation. You should specify the
 frameworks you need using --framework to macrubyc instead.

 FYI, static compilation is still a work in progress, so a lot of things
 will not work yet.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #766: Problems building "any" revision of trunk

2010-06-29 Thread MacRuby
#766: Problems building "any" revision of trunk
---+
 Reporter:  kennylov...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  blocker|   Milestone:   
Component:  MacRuby|Keywords:   
---+

Comment(by kennylov...@…):

 Replying to [comment:1 lsansone...@…]:
 > I suspect your /usr/bin/rake command is actually using an old version of
 MacRuby.
 >
 > Try editing the #! line of /usr/bin/rake and set it to /usr/bin/ruby
 instead.

 You are absolutely right, changing it seems to work (still building).
 It makes me wonder though, was that supposed to happen from the beginning?
 I thought macrake would be installed leaving rake untouched?
 How does this affect for example a rails app running ruby rather than
 macruby, when rake invokes macruby?

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #766: Problems building "any" revision of trunk

2010-06-29 Thread MacRuby
#766: Problems building "any" revision of trunk
---+
 Reporter:  kennylov...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  blocker|   Milestone:   
Component:  MacRuby|Keywords:   
---+

Comment(by lsansone...@…):

 Thanks for the confirmation. Indeed, installing rake using macgem should
 not override the system rake. That's a well known problem.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel