[squeak-dev] Can not load Aliens FFI in Squeak 4.1

Dmitry Matveev dmm1989 at gmail.com
Wed May 5 19:25:11 UTC 2010


Hello Igor!

Thank you for the patch, it has helped and now it looks like the Alien
is loaded... But.

When I'm sending an #asAlien message to a simple string, e.g.

'xmessage something' asAlien

The executions fails with the primitiveFailed exception here:
Alien >> sizeFieldPut: size "<Integer> ^<Integer>"
	<primitive: 'primSizeFieldPut' error: errorCode module: 'IA32ABI'>
	^self primitiveFailed

I assume that the Alien-Core package was not loaded properly. What am
I doing wrong?

2010/5/5, Igor Stasenko <siguctua at gmail.com>:
> On 5 May 2010 14:42, Dmitry Matveev <dmm1989 at gmail.com> wrote:
>> Hi everybody!
>>
>> Could you please help me?
>>
>> I'm experiencing the following trouble: when I'm loading the Alien FFI
>> (from
>> the squeaksource or from the .mcz files manually) in Squeak 4.1, I'm
>> getting
>> the DNU expection Array>>createMethod:header:
>>
>
> This happens, when you using an obsolete way of encoding
> a method's trailer - bytes instead of instance of CompiledMethodTrailer.
>
> Here the fix:
>
> MethodNode>>generate
> 	"The receiver is the root of a parse tree. Answer a CompiledMethod. The
> 	argument, trailer, is the references to the source code that is stored with
> 	every CompiledMethod."
>
> +++	^self generate: CompiledMethodTrailer empty
> ---	^self generate: #(0 0 0 0)
>
>
> Btw, this method is included by default in 4.1 images, and in pharo images,
> which integrated new compiled methods trailers.
> So, Alien don't needs to override this method anymore.
>
>> The Alien-Prereq module was already loaded.
>>
>> May be I've missed some dependencies? Or Alien does not work with the 4.1
>> and I should install an earlier version?
>>
>
>
>> Thanks,
>> Dmitry
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>



More information about the Squeak-dev mailing list