compiled VM with Alien for JNIPort

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

compiled VM with Alien for JNIPort

laurent laffont
Hi,

is there a compiled VM available with Alien for OSX ? I want to use JNIPort.

Laurent Laffont - @lolgzs

Pharo Smalltalk Screencasts: http://www.pharocasts.com/
Blog: http://magaloma.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

laurent laffont
On Mon, May 9, 2011 at 4:02 PM, laurent laffont <[hidden email]> wrote:
Hi,

is there a compiled VM available with Alien for OSX ? I want to use JNIPort.


Second question, if I need to compile the VM, which one should I use for Alien ? Cog is OK ?

Laurent
Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

Eliot Miranda-2


On Mon, May 9, 2011 at 11:27 AM, laurent laffont <[hidden email]> wrote:
On Mon, May 9, 2011 at 4:02 PM, laurent laffont <[hidden email]> wrote:
Hi,

is there a compiled VM available with Alien for OSX ? I want to use JNIPort.


Second question, if I need to compile the VM, which one should I use for Alien ? Cog is OK ?

Yes.  Cog is OK.
 

Laurent

Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

Igor Stasenko
On 9 May 2011 21:23, Eliot Miranda <[hidden email]> wrote:

>
>
> On Mon, May 9, 2011 at 11:27 AM, laurent laffont <[hidden email]>
> wrote:
>>
>> On Mon, May 9, 2011 at 4:02 PM, laurent laffont
>> <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> is there a compiled VM available with Alien for OSX ? I want to use
>>> JNIPort.
>>
>>
>> Second question, if I need to compile the VM, which one should I use for
>> Alien ? Cog is OK ?
>
> Yes.  Cog is OK.

And what plugin? NewsqueakIA32ABIPlugin, right?

>
>>
>> Laurent
>
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

Fernando olivero-2
In case you just want to quickly use Alien , the latest vm's from John
came with the plugin .
For example, Lumiere using Alien, works on Squeak 4.2.2beta1U.
Fernando

On Mon, May 9, 2011 at 10:01 PM, Igor Stasenko <[hidden email]> wrote:

> On 9 May 2011 21:23, Eliot Miranda <[hidden email]> wrote:
>>
>>
>> On Mon, May 9, 2011 at 11:27 AM, laurent laffont <[hidden email]>
>> wrote:
>>>
>>> On Mon, May 9, 2011 at 4:02 PM, laurent laffont
>>> <[hidden email]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> is there a compiled VM available with Alien for OSX ? I want to use
>>>> JNIPort.
>>>
>>>
>>> Second question, if I need to compile the VM, which one should I use for
>>> Alien ? Cog is OK ?
>>
>> Yes.  Cog is OK.
>
> And what plugin? NewsqueakIA32ABIPlugin, right?
>
>>
>>>
>>> Laurent
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

laurent laffont
OK I will try.

For info I want to use JNIPort just to write some small Java  script to learn and prototype on several Java frameworks. Prototyping with Java is tedious. I've tried Groovy, it's better but lacks all goodies of Pharo IDE. So I thought JNIPort would be a good candidate to play with.

Laurent.


On Mon, May 9, 2011 at 10:39 PM, Fernando Olivero <[hidden email]> wrote:
In case you just want to quickly use Alien , the latest vm's from John
came with the plugin .
For example, Lumiere using Alien, works on Squeak 4.2.2beta1U.
Fernando

On Mon, May 9, 2011 at 10:01 PM, Igor Stasenko <[hidden email]> wrote:
> On 9 May 2011 21:23, Eliot Miranda <[hidden email]> wrote:
>>
>>
>> On Mon, May 9, 2011 at 11:27 AM, laurent laffont <[hidden email]>
>> wrote:
>>>
>>> On Mon, May 9, 2011 at 4:02 PM, laurent laffont
>>> <[hidden email]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> is there a compiled VM available with Alien for OSX ? I want to use
>>>> JNIPort.
>>>
>>>
>>> Second question, if I need to compile the VM, which one should I use for
>>> Alien ? Cog is OK ?
>>
>> Yes.  Cog is OK.
>
> And what plugin? NewsqueakIA32ABIPlugin, right?
>
>>
>>>
>>> Laurent
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

Eliot Miranda-2
In reply to this post by Igor Stasenko


On Mon, May 9, 2011 at 1:01 PM, Igor Stasenko <[hidden email]> wrote:
On 9 May 2011 21:23, Eliot Miranda <[hidden email]> wrote:
>
>
> On Mon, May 9, 2011 at 11:27 AM, laurent laffont <[hidden email]>
> wrote:
>>
>> On Mon, May 9, 2011 at 4:02 PM, laurent laffont
>> <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> is there a compiled VM available with Alien for OSX ? I want to use
>>> JNIPort.
>>
>>
>> Second question, if I need to compile the VM, which one should I use for
>> Alien ? Cog is OK ?
>
> Yes.  Cog is OK.

And what plugin? NewsqueakIA32ABIPlugin, right?

No, just IA32ABIPlugin.  The difference between the two is only that NewsqueakIA32ABIPlugin implements immutability checks.
 

>
>>
>> Laurent
>
>



--
Best regards,
Igor Stasenko AKA sig.


Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

SergeStinckwich
In reply to this post by laurent laffont
Hi Laurent,

i'm interested by a report with your experiment with JNIPort.

Regards,

On Tue, May 10, 2011 at 3:55 AM, laurent laffont
<[hidden email]> wrote:

> OK I will try.
>
> For info I want to use JNIPort just to write some small Java  script to
> learn and prototype on several Java frameworks. Prototyping with Java is
> tedious. I've tried Groovy, it's better but lacks all goodies of Pharo IDE.
> So I thought JNIPort would be a good candidate to play with.
>
> Laurent.
>
>
> On Mon, May 9, 2011 at 10:39 PM, Fernando Olivero <[hidden email]>
> wrote:
>>
>> In case you just want to quickly use Alien , the latest vm's from John
>> came with the plugin .
>> For example, Lumiere using Alien, works on Squeak 4.2.2beta1U.
>> Fernando
>>
>> On Mon, May 9, 2011 at 10:01 PM, Igor Stasenko <[hidden email]> wrote:
>> > On 9 May 2011 21:23, Eliot Miranda <[hidden email]> wrote:
>> >>
>> >>
>> >> On Mon, May 9, 2011 at 11:27 AM, laurent laffont
>> >> <[hidden email]>
>> >> wrote:
>> >>>
>> >>> On Mon, May 9, 2011 at 4:02 PM, laurent laffont
>> >>> <[hidden email]> wrote:
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> is there a compiled VM available with Alien for OSX ? I want to use
>> >>>> JNIPort.
>> >>>
>> >>>
>> >>> Second question, if I need to compile the VM, which one should I use
>> >>> for
>> >>> Alien ? Cog is OK ?
>> >>
>> >> Yes.  Cog is OK.
>> >
>> > And what plugin? NewsqueakIA32ABIPlugin, right?
>> >
>> >>
>> >>>
>> >>> Laurent
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Best regards,
>> > Igor Stasenko AKA sig.
>> >
>> >
>>
>
>



--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Every DSL ends up being Smalltalk
http://doesnotunderstand.org/

Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

Igor Stasenko
In reply to this post by Eliot Miranda-2
On 10 May 2011 00:37, Eliot Miranda <[hidden email]> wrote:

>
>
> On Mon, May 9, 2011 at 1:01 PM, Igor Stasenko <[hidden email]> wrote:
>>
>> On 9 May 2011 21:23, Eliot Miranda <[hidden email]> wrote:
>> >
>> >
>> > On Mon, May 9, 2011 at 11:27 AM, laurent laffont
>> > <[hidden email]>
>> > wrote:
>> >>
>> >> On Mon, May 9, 2011 at 4:02 PM, laurent laffont
>> >> <[hidden email]> wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> is there a compiled VM available with Alien for OSX ? I want to use
>> >>> JNIPort.
>> >>
>> >>
>> >> Second question, if I need to compile the VM, which one should I use
>> >> for
>> >> Alien ? Cog is OK ?
>> >
>> > Yes.  Cog is OK.
>>
>> And what plugin? NewsqueakIA32ABIPlugin, right?
>
> No, just IA32ABIPlugin.  The difference between the two is only
> that NewsqueakIA32ABIPlugin implements immutability checks.
>

Okay.

So, Laurent, you can use one of the latest Cog VMs. This plugin are
included as internal into VM by default.

To check it you can just run:

Smalltalk listBuiltinModules select: [:name | name beginsWith: 'IA32']




--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

laurent laffont
In reply to this post by Eliot Miranda-2
So following Mariano's blog and pharocasts I've built Cog with IA32ABIPlugin (works, cool !)

When starting the JVM following JNIPort instructions on SqueakSource wiki, the VM crashes.

GDB bt gives:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x000d267a in primCallOutIntegralReturn () at /Users/laurentlaffont/dev/pharo/vm/blessed/src/plugins/IA32ABI/IA32ABI.c:500
#2  0x00023a3e in interpret () at /Users/laurentlaffont/dev/pharo/vm/blessed/src/vm/gcc3x-cointerpmt.c:2037
#3  0x962ede02 in __CFRunLoopDoObservers ()
#4  0x962a9d8d in __CFRunLoopRun ()
#5  0x962a9464 in CFRunLoopRunSpecific ()
#6  0x962a9291 in CFRunLoopRunInMode ()
#7  0x934dce04 in RunCurrentEventLoopInMode ()
#8  0x934dcaf5 in ReceiveNextEventCommon ()
#9  0x934dca3e in BlockUntilNextEventMatchingListInMode ()
#10 0x9644778d in _DPSNextEvent ()
#11 0x96446fce in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#12 0x96409247 in -[NSApplication run] ()
#13 0x964012d9 in NSApplicationMain ()
#14 0x00078247 in main (argc=1, argv=0xbffff680, envp=0xbffff688) at /Users/laurentlaffont/dev/pharo/vm/blessed/platforms/iOS/vm/Common/main.m:52
(gdb) 

Any idea ?

Laurent.


On Tue, May 10, 2011 at 12:37 AM, Eliot Miranda <[hidden email]> wrote:


On Mon, May 9, 2011 at 1:01 PM, Igor Stasenko <[hidden email]> wrote:
On 9 May 2011 21:23, Eliot Miranda <[hidden email]> wrote:
>
>
> On Mon, May 9, 2011 at 11:27 AM, laurent laffont <[hidden email]>
> wrote:
>>
>> On Mon, May 9, 2011 at 4:02 PM, laurent laffont
>> <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> is there a compiled VM available with Alien for OSX ? I want to use
>>> JNIPort.
>>
>>
>> Second question, if I need to compile the VM, which one should I use for
>> Alien ? Cog is OK ?
>
> Yes.  Cog is OK.

And what plugin? NewsqueakIA32ABIPlugin, right?

No, just IA32ABIPlugin.  The difference between the two is only that NewsqueakIA32ABIPlugin implements immutability checks.
 

>
>>
>> Laurent
>
>



--
Best regards,
Igor Stasenko AKA sig.



Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

Luc Fabresse
In reply to this post by SergeStinckwich


2011/5/10 Serge Stinckwich <[hidden email]>
Hi Laurent,

i'm interested by a report with your experiment with JNIPort.


+1

#Luc

 


Regards,

On Tue, May 10, 2011 at 3:55 AM, laurent laffont
<[hidden email]> wrote:
> OK I will try.
>
> For info I want to use JNIPort just to write some small Java  script to
> learn and prototype on several Java frameworks. Prototyping with Java is
> tedious. I've tried Groovy, it's better but lacks all goodies of Pharo IDE.
> So I thought JNIPort would be a good candidate to play with.
>
> Laurent.
>
>
> On Mon, May 9, 2011 at 10:39 PM, Fernando Olivero <[hidden email]>
> wrote:
>>
>> In case you just want to quickly use Alien , the latest vm's from John
>> came with the plugin .
>> For example, Lumiere using Alien, works on Squeak 4.2.2beta1U.
>> Fernando
>>
>> On Mon, May 9, 2011 at 10:01 PM, Igor Stasenko <[hidden email]> wrote:
>> > On 9 May 2011 21:23, Eliot Miranda <[hidden email]> wrote:
>> >>
>> >>
>> >> On Mon, May 9, 2011 at 11:27 AM, laurent laffont
>> >> <[hidden email]>
>> >> wrote:
>> >>>
>> >>> On Mon, May 9, 2011 at 4:02 PM, laurent laffont
>> >>> <[hidden email]> wrote:
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> is there a compiled VM available with Alien for OSX ? I want to use
>> >>>> JNIPort.
>> >>>
>> >>>
>> >>> Second question, if I need to compile the VM, which one should I use
>> >>> for
>> >>> Alien ? Cog is OK ?
>> >>
>> >> Yes.  Cog is OK.
>> >
>> > And what plugin? NewsqueakIA32ABIPlugin, right?
>> >
>> >>
>> >>>
>> >>> Laurent
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Best regards,
>> > Igor Stasenko AKA sig.
>> >
>> >
>>
>
>



--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Every DSL ends up being Smalltalk
http://doesnotunderstand.org/


Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

Mariano Martinez Peck
In reply to this post by laurent laffont
No idea. Maybe cc'ing vm list may help.


On Tue, May 10, 2011 at 10:27 PM, laurent laffont <[hidden email]> wrote:
So following Mariano's blog and pharocasts I've built Cog with IA32ABIPlugin (works, cool !)

When starting the JVM following JNIPort instructions on SqueakSource wiki, the VM crashes.

GDB bt gives:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x000d267a in primCallOutIntegralReturn () at /Users/laurentlaffont/dev/pharo/vm/blessed/src/plugins/IA32ABI/IA32ABI.c:500
#2  0x00023a3e in interpret () at /Users/laurentlaffont/dev/pharo/vm/blessed/src/vm/gcc3x-cointerpmt.c:2037
#3  0x962ede02 in __CFRunLoopDoObservers ()
#4  0x962a9d8d in __CFRunLoopRun ()
#5  0x962a9464 in CFRunLoopRunSpecific ()
#6  0x962a9291 in CFRunLoopRunInMode ()
#7  0x934dce04 in RunCurrentEventLoopInMode ()
#8  0x934dcaf5 in ReceiveNextEventCommon ()
#9  0x934dca3e in BlockUntilNextEventMatchingListInMode ()
#10 0x9644778d in _DPSNextEvent ()
#11 0x96446fce in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#<a href="tel:12%200x96409247" value="+12096409247" target="_blank">12 0x96409247 in -[NSApplication run] ()
#13 0x964012d9 in NSApplicationMain ()
#14 0x00078247 in main (argc=1, argv=0xbffff680, envp=0xbffff688) at /Users/laurentlaffont/dev/pharo/vm/blessed/platforms/iOS/vm/Common/main.m:52
(gdb) 

Any idea ?

Laurent.


On Tue, May 10, 2011 at 12:37 AM, Eliot Miranda <[hidden email]> wrote:


On Mon, May 9, 2011 at 1:01 PM, Igor Stasenko <[hidden email]> wrote:
On 9 May 2011 21:23, Eliot Miranda <[hidden email]> wrote:
>
>
> On Mon, May 9, 2011 at 11:27 AM, laurent laffont <[hidden email]>
> wrote:
>>
>> On Mon, May 9, 2011 at 4:02 PM, laurent laffont
>> <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> is there a compiled VM available with Alien for OSX ? I want to use
>>> JNIPort.
>>
>>
>> Second question, if I need to compile the VM, which one should I use for
>> Alien ? Cog is OK ?
>
> Yes.  Cog is OK.

And what plugin? NewsqueakIA32ABIPlugin, right?

No, just IA32ABIPlugin.  The difference between the two is only that NewsqueakIA32ABIPlugin implements immutability checks.
 

>
>>
>> Laurent
>
>



--
Best regards,
Igor Stasenko AKA sig.






--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: compiled VM with Alien for JNIPort

Igor Stasenko
In reply to this post by laurent laffont
On 10 May 2011 22:27, laurent laffont <[hidden email]> wrote:

> So following Mariano's blog and pharocasts I've built Cog with IA32ABIPlugin
> (works, cool !)
> When starting the JVM following JNIPort instructions on SqueakSource wiki,
> the VM crashes.
> GDB bt gives:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
> 0x00000000 in ?? ()
> (gdb) bt
> #0  0x00000000 in ?? ()
> #1  0x000d267a in primCallOutIntegralReturn () at
> /Users/laurentlaffont/dev/pharo/vm/blessed/src/plugins/IA32ABI/IA32ABI.c:500
> #2  0x00023a3e in interpret () at
> /Users/laurentlaffont/dev/pharo/vm/blessed/src/vm/gcc3x-cointerpmt.c:2037
> #3  0x962ede02 in __CFRunLoopDoObservers ()
> #4  0x962a9d8d in __CFRunLoopRun ()
> #5  0x962a9464 in CFRunLoopRunSpecific ()
> #6  0x962a9291 in CFRunLoopRunInMode ()
> #7  0x934dce04 in RunCurrentEventLoopInMode ()
> #8  0x934dcaf5 in ReceiveNextEventCommon ()
> #9  0x934dca3e in BlockUntilNextEventMatchingListInMode ()
> #10 0x9644778d in _DPSNextEvent ()
> #11 0x96446fce in -[NSApplication
> nextEventMatchingMask:untilDate:inMode:dequeue:] ()
> #12 0x96409247 in -[NSApplication run] ()
> #13 0x964012d9 in NSApplicationMain ()
> #14 0x00078247 in main (argc=1, argv=0xbffff680, envp=0xbffff688) at
> /Users/laurentlaffont/dev/pharo/vm/blessed/platforms/iOS/vm/Common/main.m:52
> (gdb)
> Any idea ?
> Laurent.
>
A smalltalk stack trace would help.
As usual, check what you passing to the foreign function.
Is everything set up correctly? Because from the above i see that some
piece of software accessing null pointer.
And this is usually problem with proper initialization or missing
error handling.



--
Best regards,
Igor Stasenko AKA sig.