[squeak-dev] FFI on linux

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

[squeak-dev] FFI on linux

Sebastian Sastre-2
hi there, I can't make it work FFI in linux. I have all test red. The external
function handle is '@ 16r00000000' for all tests. Sounds like a an installation
issue.
I'm on an ubuntu 8.04 and I've installed via apt-get packages:
squeakvm
squeak
squeak-plugins

>From the image (runing as root) I've installed FFI from universes. And is all
red
any ideas?

sebastian


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] FFI on linux

John Thornborrow
Hi,

Have you installed libffi?

apt-get install libffi

I don't use Ubuntu (Gentoo :)  but a quick google tells me that's the
apt-get command to use.

Regards,
John.

Sebastian Sastre wrote:

> hi there, I can't make it work FFI in linux. I have all test red. The external
> function handle is '@ 16r00000000' for all tests. Sounds like a an installation
> issue.
> I'm on an ubuntu 8.04 and I've installed via apt-get packages:
> squeakvm
> squeak
> squeak-plugins
>
> >From the image (runing as root) I've installed FFI from universes. And is all
> red
> any ideas?
>
> sebastian
>
>
>
>  


Consider your responsibility to the environment - think before you print!

******************************************************************************************************************************************
This email is from Pinesoft Limited. Its contents are confidential to the intended recipient(s) at the email address(es) to which it has been addressed. It may not be disclosed to or used by anyone other than the addressee(s), nor may it be copied in anyway. If received in error, please contact the sender, then delete it from your system. Although this email and attachments are believed to be free of virus, or any other defect which might affect any computer or IT system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Pinesoft for any loss or damage arising in any way from receipt or use thereof. *******************************************************************************************************************************************


Pinesoft Limited are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA

Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] FFI on linux

Sebastian Sastre-2
hi Jhon,
ok, it is installed now. Still same results
sebastian

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En
> nombre de John Thornborrow
> Enviado el: Monday, March 02, 2009 12:21
> Para: The general-purpose Squeak developers list
> Asunto: Re: [squeak-dev] FFI on linux
>
> Hi,
>
> Have you installed libffi?
>
> apt-get install libffi
>
> I don't use Ubuntu (Gentoo :)  but a quick google tells me that's the
> apt-get command to use.
>
> Regards,
> John.
>
> Sebastian Sastre wrote:
> > hi there, I can't make it work FFI in linux. I have all
> test red. The external
> > function handle is '@ 16r00000000' for all tests. Sounds
> like a an installation
> > issue.
> > I'm on an ubuntu 8.04 and I've installed via apt-get packages:
> > squeakvm
> > squeak
> > squeak-plugins
> >
> > >From the image (runing as root) I've installed FFI from
> universes. And is all
> > red
> > any ideas?
> >
> > sebastian
> >
> >
> >
> >  
>
>
> Consider your responsibility to the environment - think
> before you print!
>
> **************************************************************
> **************************************************************
> **************
> This email is from Pinesoft Limited. Its contents are
> confidential to the intended recipient(s) at the email
> address(es) to which it has been addressed. It may not be
> disclosed to or used by anyone other than the addressee(s),
> nor may it be copied in anyway. If received in error, please
> contact the sender, then delete it from your system. Although
> this email and attachments are believed to be free of virus,
> or any other defect which might affect any computer or IT
> system into which they are received and opened, it is the
> responsibility of the recipient to ensure that they are virus
> free and no responsibility is accepted by Pinesoft for any
> loss or damage arising in any way from receipt or use
> thereof.
> **************************************************************
> **************************************************************
> ***************
>
>
> Pinesoft Limited are registered in England, Registered
> number: 2914825. Registered office: 266-268 High Street,
> Waltham Cross, Herts, EN8 7EA
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] FFI on linux

Bert Freudenberg
In reply to this post by John Thornborrow
On 02.03.2009, at 16:21, John Thornborrow wrote:

> Hi,
>
> Have you installed libffi?


On x86 Linux, Squeak does not use libffi.

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] FFI on linux

John Thornborrow
Is that the same for x86_64? I ask because both use the same kernel. :)

J.

Bert Freudenberg wrote:

> On 02.03.2009, at 16:21, John Thornborrow wrote:
>
>> Hi,
>>
>> Have you installed libffi?
>
>
> On x86 Linux, Squeak does not use libffi.
>
> - Bert -
>
>
>


Consider your responsibility to the environment - think before you print!

******************************************************************************************************************************************
This email is from Pinesoft Limited. Its contents are confidential to the intended recipient(s) at the email address(es) to which it has been addressed. It may not be disclosed to or used by anyone other than the addressee(s), nor may it be copied in anyway. If received in error, please contact the sender, then delete it from your system. Although this email and attachments are believed to be free of virus, or any other defect which might affect any computer or IT system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Pinesoft for any loss or damage arising in any way from receipt or use thereof. *******************************************************************************************************************************************


Pinesoft Limited are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] FFI on linux

Bert Freudenberg
In reply to this post by Sebastian Sastre-2

On 02.03.2009, at 16:04, Sebastian Sastre wrote:

> hi there, I can't make it work FFI in linux. I have all test red.  
> The external
> function handle is '@ 16r00000000' for all tests. Sounds like a an  
> installation
> issue.
> I'm on an ubuntu 8.04 and I've installed via apt-get packages:
> squeakvm
> squeak
> squeak-plugins

According to

        http://packages.ubuntu.com/search?keywords=squeak

there is no ubuntu package named "squeak-plugins".

> From the image (runing as root) I've installed FFI from universes.  
> And is all
> red
> any ideas?


Well, are you sure the ubuntu package comes with FFI? If so, it should  
be listed in

        Smalltalk listBuiltinModules

because it is not an external module:

        http://packages.ubuntu.com/en/hardy/i386/squeak-vm/filelist

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] FFI on linux

Bert Freudenberg
In reply to this post by John Thornborrow
> Bert Freudenberg wrote:
>> On 02.03.2009, at 16:21, John Thornborrow wrote:
>>
>>> Hi,
>>>
>>> Have you installed libffi?
>>
>>
>> On x86 Linux, Squeak does not use libffi.
>>
>> - Bert -


On 02.03.2009, at 17:03, John Thornborrow wrote:

> Is that the same for x86_64? I ask because both use the same  
> kernel. :)
>
> J.

I don't know. See

http://squeakvm.org/svn/squeak/trunk/platforms/unix/plugins/SqueakFFIPrims/

- Bert -


Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] FFI on linux

Sebastian Sastre-2
In reply to this post by Bert Freudenberg
Hi Bert,
I've added:

deb     http://ftp.squeak.org/debian/ stable main
deb-src http://ftp.squeak.org/debian/ stable main

sources (as says in http://wiki.squeak.org/squeak/3616)
when you do so you'll see 'squeak-plugin' (without 's') package.

I'm making
SmalltalkImage current listBuiltInModules
and none is FFI
what can I do now I know is not installed?
thanks,
sebastian

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En
> nombre de Bert Freudenberg
> Enviado el: Monday, March 02, 2009 13:05
> Para: The general-purpose Squeak developers list
> Asunto: Re: [squeak-dev] FFI on linux
>
>
> On 02.03.2009, at 16:04, Sebastian Sastre wrote:
>
> > hi there, I can't make it work FFI in linux. I have all test red.  
> > The external
> > function handle is '@ 16r00000000' for all tests. Sounds like a an  
> > installation
> > issue.
> > I'm on an ubuntu 8.04 and I've installed via apt-get packages:
> > squeakvm
> > squeak
> > squeak-plugins
>
> According to
>
> http://packages.ubuntu.com/search?keywords=squeak
>
> there is no ubuntu package named "squeak-plugins".
>
> > From the image (runing as root) I've installed FFI from universes.  
> > And is all
> > red
> > any ideas?
>
>
> Well, are you sure the ubuntu package comes with FFI? If so,
> it should  
> be listed in
>
> Smalltalk listBuiltinModules
>
> because it is not an external module:
>
> http://packages.ubuntu.com/en/hardy/i386/squeak-vm/filelist
>
> - Bert -
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] FFI on linux

Bert Freudenberg

On 02.03.2009, at 17:19, Sebastian Sastre wrote:

> Hi Bert,
> I've added:
>
> deb     http://ftp.squeak.org/debian/ stable main
> deb-src http://ftp.squeak.org/debian/ stable main
>
> sources (as says in http://wiki.squeak.org/squeak/3616)
> when you do so you'll see 'squeak-plugin' (without 's') package.
>
> I'm making
> SmalltalkImage current listBuiltInModules
> and none is FFI
> what can I do now I know is not installed?

That only means it is not built-in. It may still be installed - check  
if there is a SqueakFFIPrims module in your VM directory. Or, after  
you tried an FFI call, do

        Smalltalk listLoadedModules

which lists all the modules in use, both external and internal ones.

If you indeed do not have it, complain loudly on the bug tracker, and  
then compile it yourself.

- Bert -



Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] FFI on linux

Sebastian Sastre-2
ok, I've checked. No module after runing tests (which invocates the thing).
Also checked and there is not *Prims* in the entire system in a search starting
from /
I've found a /usr/bin/FT2Plugin but not FFI* thing

To build the plugin should I follow this guide?
http://www.squeakvm.org/unix/devel.html

thanks,
sebastian

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En
> nombre de Bert Freudenberg
> Enviado el: Monday, March 02, 2009 13:47
> Para: The general-purpose Squeak developers list
> Asunto: Re: [squeak-dev] FFI on linux
>
>
> On 02.03.2009, at 17:19, Sebastian Sastre wrote:
>
> > Hi Bert,
> > I've added:
> >
> > deb     http://ftp.squeak.org/debian/ stable main
> > deb-src http://ftp.squeak.org/debian/ stable main
> >
> > sources (as says in http://wiki.squeak.org/squeak/3616)
> > when you do so you'll see 'squeak-plugin' (without 's') package.
> >
> > I'm making
> > SmalltalkImage current listBuiltInModules
> > and none is FFI
> > what can I do now I know is not installed?
>
> That only means it is not built-in. It may still be installed
> - check  
> if there is a SqueakFFIPrims module in your VM directory. Or, after  
> you tried an FFI call, do
>
> Smalltalk listLoadedModules
>
> which lists all the modules in use, both external and internal ones.
>
> If you indeed do not have it, complain loudly on the bug
> tracker, and  
> then compile it yourself.
>
> - Bert -
>
>
>


Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] FFI on linux

Sebastian Sastre-2
I've installed the linux intel x86 3.10-4 vm and now the SqueakFFIPrims is in
the system.
Now the tests are yellow and when I evaluate
SmalltalkImage current listBuiltInModules
I can see the module is not loaded.
How can I ensure it to be loaded?
thanks,
sebastian

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En
> nombre de Sebastian Sastre
> Enviado el: Monday, March 02, 2009 13:59
> Para: 'The general-purpose Squeak developers list'
> Asunto: RE: [squeak-dev] FFI on linux
>
> ok, I've checked. No module after runing tests (which
> invocates the thing).
> Also checked and there is not *Prims* in the entire system in
> a search starting
> from /
> I've found a /usr/bin/FT2Plugin but not FFI* thing
>
> To build the plugin should I follow this guide?
> http://www.squeakvm.org/unix/devel.html
>
> thanks,
> sebastian
>
> > -----Mensaje original-----
> > De: [hidden email]
> > [mailto:[hidden email]] En
> > nombre de Bert Freudenberg
> > Enviado el: Monday, March 02, 2009 13:47
> > Para: The general-purpose Squeak developers list
> > Asunto: Re: [squeak-dev] FFI on linux
> >
> >
> > On 02.03.2009, at 17:19, Sebastian Sastre wrote:
> >
> > > Hi Bert,
> > > I've added:
> > >
> > > deb     http://ftp.squeak.org/debian/ stable main
> > > deb-src http://ftp.squeak.org/debian/ stable main
> > >
> > > sources (as says in http://wiki.squeak.org/squeak/3616)
> > > when you do so you'll see 'squeak-plugin' (without 's') package.
> > >
> > > I'm making
> > > SmalltalkImage current listBuiltInModules
> > > and none is FFI
> > > what can I do now I know is not installed?
> >
> > That only means it is not built-in. It may still be installed
> > - check  
> > if there is a SqueakFFIPrims module in your VM directory.
> Or, after  
> > you tried an FFI call, do
> >
> > Smalltalk listLoadedModules
> >
> > which lists all the modules in use, both external and internal ones.
> >
> > If you indeed do not have it, complain loudly on the bug
> > tracker, and  
> > then compile it yourself.
> >
> > - Bert -
> >
> >
> >
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] FFI on linux

David T. Lewis
In reply to this post by John Thornborrow
On Mon, Mar 02, 2009 at 04:03:20PM +0000, John Thornborrow wrote:

> Bert Freudenberg wrote:
> > On 02.03.2009, at 16:21, John Thornborrow wrote:
> >>
> >> Have you installed libffi?
> >
> > On x86 Linux, Squeak does not use libffi.
> >
> > - Bert -
> >
> Is that the same for x86_64? I ask because both use the same kernel. :)
>
> J.

FFI requires some updates in order to work on a 64 bit system:
  http://bugs.squeak.org/view.php?id=7237

The patches are on the Mantis report, but it is not a small change.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] FFI on linux

Bert Freudenberg
In reply to this post by Sebastian Sastre-2

On 02.03.2009, at 18:50, Sebastian Sastre wrote:

> I've installed the linux intel x86 3.10-4 vm and now the  
> SqueakFFIPrims is in
> the system.
> Now the tests are yellow and when I evaluate
> SmalltalkImage current listBuiltInModules
> I can see the module is not loaded.
> How can I ensure it to be loaded?


It is loaded automatically when you call an FFI function.

- Bert -



Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] FFI on linux

Sebastian Sastre-2
ok, I've made invocations in a couple of function in libc-2.7 and it works!
for the record, even after succesfully invocating those, the module was not
being listed
thanks for the help,
sebastian

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En
> nombre de Bert Freudenberg
> Enviado el: Monday, March 02, 2009 16:09
> Para: The general-purpose Squeak developers list
> Asunto: Re: [squeak-dev] FFI on linux
>
>
> On 02.03.2009, at 18:50, Sebastian Sastre wrote:
>
> > I've installed the linux intel x86 3.10-4 vm and now the  
> > SqueakFFIPrims is in
> > the system.
> > Now the tests are yellow and when I evaluate
> > SmalltalkImage current listBuiltInModules
> > I can see the module is not loaded.
> > How can I ensure it to be loaded?
>
>
> It is loaded automatically when you call an FFI function.
>
> - Bert -
>
>
>