Using FFI

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

Using FFI

Annick Fron-3
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron

Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Igor Stasenko



On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Annick Fron-3
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

EstebanLM
Hi Annick, 

Rapsberry (ARM) does not supports FFI either (current implementation is x86 architecture). 

Esteban

On Oct 30, 2013, at 5:41 AM, Annick Fron <[hidden email]> wrote:

My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.


Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Luc Fabresse
Hi Annick,

 Probably (others will correct me if I am wrong ;-)) that the easiest is to write a VM plugin, add it in your ARM-based VM and recompile it.

Cheers,

Luc


#Luc


2013/10/30 Esteban Lorenzano <[hidden email]>
Hi Annick, 

Rapsberry (ARM) does not supports FFI either (current implementation is x86 architecture). 

Esteban


On Oct 30, 2013, at 5:41 AM, Annick Fron <[hidden email]> wrote:

My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.



Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Igor Stasenko
In reply to this post by Annick Fron-3
AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

EstebanLM
mmm... but again, AFAIK... Old FFI will not work in ARM. 

On Oct 30, 2013, at 10:12 AM, Igor Stasenko <[hidden email]> wrote:

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Igor Stasenko



On 30 October 2013 16:11, Esteban Lorenzano <[hidden email]> wrote:
mmm... but again, AFAIK... Old FFI will not work in ARM. 

yes. but i replied before knowing that its about ARM :)
 
On Oct 30, 2013, at 10:12 AM, Igor Stasenko <[hidden email]> wrote:

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Annick Fron-3
In reply to this post by Igor Stasenko
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick

Le 30 oct. 2013 à 14:12, Igor Stasenko <[hidden email]> a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Igor Stasenko



On 31 October 2013 11:23, Annick Fron <[hidden email]> wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick


FFI not supported on ARM
 
Le 30 oct. 2013 à 14:12, Igor Stasenko <[hidden email]> a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Clément Béra
Does Alien support ARM ? 

How to do FFI on ARM then if NativeBoost and FFI does not support it ?


2013/10/31 Igor Stasenko <[hidden email]>



On 31 October 2013 11:23, Annick Fron <[hidden email]> wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick


FFI not supported on ARM
 
Le 30 oct. 2013 à 14:12, Igor Stasenko <[hidden email]> a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Luc Fabresse

2013/10/31 Clément Bera <[hidden email]>
Does Alien support ARM ? 

no
 

How to do FFI on ARM then if NativeBoost and FFI does not support it ?

IMHO you should do a VM plugin
easiest and fastest path currently

Luc
 


2013/10/31 Igor Stasenko <[hidden email]>



On 31 October 2013 11:23, Annick Fron <[hidden email]> wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick


FFI not supported on ARM
 
Le 30 oct. 2013 à 14:12, Igor Stasenko <[hidden email]> a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.


Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Annick Fron-3
In reply to this post by Igor Stasenko
I hâve thé error on Windows

Envoyé de mon iPod

Le 31 oct. 2013 à 14:51, Igor Stasenko <[hidden email]> a écrit :




On 31 October 2013 11:23, Annick Fron <[hidden email]> wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick


FFI not supported on ARM
 
Le 30 oct. 2013 à 14:12, Igor Stasenko <[hidden email]> a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

EstebanLM
ok... then we have a problem. 
but we need more data... 

which image version are you using?
and which vm version?

cheers, 
Esteban
 
On Oct 31, 2013, at 11:24 AM, Annick Fron <[hidden email]> wrote:

I hâve thé error on Windows

Envoyé de mon iPod

Le 31 oct. 2013 à 14:51, Igor Stasenko <[hidden email]> a écrit :




On 31 October 2013 11:23, Annick Fron <[hidden email]> wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick


FFI not supported on ARM
 
Le 30 oct. 2013 à 14:12, Igor Stasenko <[hidden email]> a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Annick Fron-3
I am using the latest download from version 2
Annick

Le 31 oct. 2013 à 18:47, Esteban Lorenzano <[hidden email]> a écrit :

ok... then we have a problem. 
but we need more data... 

which image version are you using?
and which vm version?

cheers, 
Esteban
 
On Oct 31, 2013, at 11:24 AM, Annick Fron <[hidden email]> wrote:

I hâve thé error on Windows

Envoyé de mon iPod

Le 31 oct. 2013 à 14:51, Igor Stasenko <[hidden email]> a écrit :




On 31 October 2013 11:23, Annick Fron <[hidden email]> wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick


FFI not supported on ARM
 
Le 30 oct. 2013 à 14:12, Igor Stasenko <[hidden email]> a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.


Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Stéphane Ducasse
Annick

You cannot expect people to respond to you if you do not provide 
full context + information.
On the long term people will stop to reply to you. 
Repeat after me:
which image?
which OS version?
which vm version?

I think that we are pretty nice people but do not force us to always ask the same questions.
We are all busy.


Stef


On Nov 6, 2013, at 6:15 PM, Annick Fron <[hidden email]> wrote:

I am using the latest download from version 2
Annick

Le 31 oct. 2013 à 18:47, Esteban Lorenzano <[hidden email]> a écrit :

ok... then we have a problem. 
but we need more data... 

which image version are you using?
and which vm version?

cheers, 
Esteban
 
On Oct 31, 2013, at 11:24 AM, Annick Fron <[hidden email]> wrote:

I hâve thé error on Windows

Envoyé de mon iPod

Le 31 oct. 2013 à 14:51, Igor Stasenko <[hidden email]> a écrit :




On 31 October 2013 11:23, Annick Fron <[hidden email]> wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick


FFI not supported on ARM
 
Le 30 oct. 2013 à 14:12, Igor Stasenko <[hidden email]> a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.



Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Annick Fron-3
I have answered I think

Envoyé de mon iPod

Le 9 nov. 2013 à 02:01, Stéphane Ducasse <[hidden email]> a écrit :

Annick

You cannot expect people to respond to you if you do not provide 
full context + information.
On the long term people will stop to reply to you. 
Repeat after me:
which image?
which OS version?
which vm version?

I think that we are pretty nice people but do not force us to always ask the same questions.
We are all busy.


Stef


On Nov 6, 2013, at 6:15 PM, Annick Fron <[hidden email]> wrote:

I am using the latest download from version 2
Annick

Le 31 oct. 2013 à 18:47, Esteban Lorenzano <[hidden email]> a écrit :

ok... then we have a problem. 
but we need more data... 

which image version are you using?
and which vm version?

cheers, 
Esteban
 
On Oct 31, 2013, at 11:24 AM, Annick Fron <[hidden email]> wrote:

I hâve thé error on Windows

Envoyé de mon iPod

Le 31 oct. 2013 à 14:51, Igor Stasenko <[hidden email]> a écrit :




On 31 October 2013 11:23, Annick Fron <[hidden email]> wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick


FFI not supported on ARM
 
Le 30 oct. 2013 à 14:12, Igor Stasenko <[hidden email]> a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFFI';
load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



On 30 October 2013 09:41, Annick Fron <[hidden email]> wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

Le 29 oct. 2013 à 16:57, Igor Stasenko <[hidden email]> a écrit :




On 29 October 2013 16:27, Annick Fron <[hidden email]> wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron


To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>
self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.




--
Best regards,
Igor Stasenko.



Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

Ben Coman

Hi Annick,

I hope you are able to achieve what you are aiming for (I don't have the technical knowledge to help) but as a bystander I must make an observation that I hope will be useful to you.

While your response "I have answered I think" could be technically correct if someone wade through the whole thread, its not really an appropriate answer to a specific question from someone whom you are asking devote their valuable time to your problem.  If you can take the tie to read [1] you will understand where I am coming from.  I personally found it very worthwhile reading and even like to refresh myself from time to time.

[1] http://www.catb.org/esr/faqs/smart-questions.html

I'd be interested in your thoughts on the article.

In good faith,
cheers -ben


Annick Fron wrote:
I have answered I think

Envoyé de mon iPod

  
Le 9 nov. 2013 à 02:01, Stéphane Ducasse [hidden email] a écrit :

Annick

You cannot expect people to respond to you if you do not provide 
full context + information.
On the long term people will stop to reply to you. 
Repeat after me:
	which image?
	which OS version?
	which vm version?

I think that we are pretty nice people but do not force us to always ask the same questions.
We are all busy.


Stef


    
On Nov 6, 2013, at 6:15 PM, Annick Fron [hidden email] wrote:

I am using the latest download from version 2
Annick

      
Le 31 oct. 2013 à 18:47, Esteban Lorenzano [hidden email] a écrit :

ok... then we have a problem. 
but we need more data... 

which image version are you using?
and which vm version?

cheers, 
Esteban
 
        
On Oct 31, 2013, at 11:24 AM, Annick Fron [hidden email] wrote:

I hâve thé error on Windows

Envoyé de mon iPod

          
Le 31 oct. 2013 à 14:51, Igor Stasenko [hidden email] a écrit :




            
On 31 October 2013 11:23, Annick Fron [hidden email] wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick
              
FFI not supported on ARM
 
            
Le 30 oct. 2013 à 14:12, Igor Stasenko [hidden email] a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
  squeaksource: 'MetacelloRepository';

  package: 'ConfigurationOfFFI';
  load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



                
On 30 October 2013 09:41, Annick Fron [hidden email] wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

                  
Le 29 oct. 2013 à 16:57, Igor Stasenko [hidden email] a écrit :




                    
On 29 October 2013 16:27, Annick Fron [hidden email] wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron
                      
To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>



self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


-- 
Best regards,
Igor Stasenko.
                    

-- 
Best regards,
Igor Stasenko.
                

-- 
Best regards,
Igor Stasenko.
            

  

Reply | Threaded
Open this post in threaded view
|

Re: Using FFI

EstebanLM
Hi Annik,

long time without a response to this, I'm sorry. I'm just catching up with this stuff (I'm really full of work this days). 

The problem here is that FFI does not have the type "int". You need to choose between short, ushort, long and ulong (depending of the real size you need). 

And you do not have also char** (or any other pointer-pointer). 

But the non-typed nature of C comes to help here too :)

You can easily declare: 

<apicall: void 'gst_init' (short ulong) module: 'blabla'>

since basically size will be the same (and that's the only thing that really matters).

you can see the allowed types here: 

ExternalType class>>#initializeFFIConstants

cheers, 
Esteban 




On Sat, Nov 9, 2013 at 10:09 AM, <[hidden email]> wrote:

Hi Annick,

I hope you are able to achieve what you are aiming for (I don't have the technical knowledge to help) but as a bystander I must make an observation that I hope will be useful to you.

While your response "I have answered I think" could be technically correct if someone wade through the whole thread, its not really an appropriate answer to a specific question from someone whom you are asking devote their valuable time to your problem.  If you can take the tie to read [1] you will understand where I am coming from.  I personally found it very worthwhile reading and even like to refresh myself from time to time.

[1] http://www.catb.org/esr/faqs/smart-questions.html

I'd be interested in your thoughts on the article.

In good faith,
cheers -ben



Annick Fron wrote:
I have answered I think

Envoyé de mon iPod

  
Le 9 nov. 2013 à 02:01, Stéphane Ducasse [hidden email] a écrit :

Annick

You cannot expect people to respond to you if you do not provide 
full context + information.
On the long term people will stop to reply to you. 
Repeat after me:
	which image?
	which OS version?
	which vm version?

I think that we are pretty nice people but do not force us to always ask the same questions.
We are all busy.


Stef


    
On Nov 6, 2013, at 6:15 PM, Annick Fron [hidden email] wrote:

I am using the latest download from version 2
Annick

      
Le 31 oct. 2013 à 18:47, Esteban Lorenzano [hidden email] a écrit :

ok... then we have a problem. 
but we need more data... 

which image version are you using?
and which vm version?

cheers, 
Esteban
 
        
On Oct 31, 2013, at 11:24 AM, Annick Fron [hidden email] wrote:

I hâve thé error on Windows

Envoyé de mon iPod

          
Le 31 oct. 2013 à 14:51, Igor Stasenko [hidden email] a écrit :




            
On 31 October 2013 11:23, Annick Fron [hidden email] wrote:
Hi Igor

I have done that, but still gets an error, do I need to remove NativeBoost ?
Annick
              
FFI not supported on ARM
 
            
Le 30 oct. 2013 à 14:12, Igor Stasenko [hidden email] a écrit :

AFAIK, it should be in Configurations browser.
Else try this:

Gofer new
  squeaksource: 'MetacelloRepository';

  package: 'ConfigurationOfFFI';
  load.
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load



                
On 30 October 2013 09:41, Annick Fron [hidden email] wrote:
My problem is that the Raspberry does not support native boost (as yet !).
Where can I load the old FFI ?

                  
Le 29 oct. 2013 à 16:57, Igor Stasenko [hidden email] a écrit :




                    
On 29 October 2013 16:27, Annick Fron [hidden email] wrote:
Hi

I want to launch a simple init with the following C signature :

void gst_init (int *argc, char **argv[])

If I write

<apicall: void 'gst_init' (int*, char**) module: 'blabla'>

I get a Smalltalk syntax error

Annick Fron
                      
To use this syntax, you must load old FFI implementation.
Or use NativeBoost:

init: intarg with: chararg
 <primitive: 'primitiveNativeCall' module: 'NativeBoostPlugin'>



self nbCall: 'void gst_init (int * intarg, char ** chararg)' module: 'blaba'


-- 
Best regards,
Igor Stasenko.
                    
-- 
Best regards,
Igor Stasenko.
                
-- 
Best regards,
Igor Stasenko.