SyntaxError while loading FFI

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

SyntaxError while loading FFI

Christoph Thiede

Hi all,


I fear this could be a frequently discussed topic, but I did not know where to start else.


In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:


Metacello new configuration: 'FFI'; load.


If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:


ffiPrintString: aString

"FFITestLibrary ffiPrintString: 'Hello'"

<cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>

^self externalCallFailed


This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?

If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))

I just wanted to inform you about that.


Best,

Christoph



Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

Jakob Reschke
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:

>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>

Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

Christoph Thiede

Hi Jakob,


do you have a description of the correct loading order? In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Donnerstag, 10. September 2020 08:04:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>



Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

marcel.taeumel
Hi all.

 In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...

Loading FFI via the Preference Wizard -- which uses the Installer directly -- works fine in current (fresh) trunk. No debuggers to confirm. No syntax error.

I am updating that Metacello script right now. Be patient. :-)

Best,
Marcel

Am 14.09.2020 18:35:46 schrieb Thiede, Christoph <[hidden email]>:

Hi Jakob,


do you have a description of the correct loading order? In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Donnerstag, 10. September 2020 08:04:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>



Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

marcel.taeumel
Hi all.

There is a bug in Metacello in MetacelloSqueakPlatform >> #defaultPlatformAttributes. We will fix that ASAP.

Until then, use this to load FFI in Trunk via Metacello:

Metacello new
configuration: 'FFI';
version: '2.0';
load.

Best,
Marcel

Am 15.09.2020 15:26:51 schrieb Marcel Taeumel <[hidden email]>:

Hi all.

 In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...

Loading FFI via the Preference Wizard -- which uses the Installer directly -- works fine in current (fresh) trunk. No debuggers to confirm. No syntax error.

I am updating that Metacello script right now. Be patient. :-)

Best,
Marcel

Am 14.09.2020 18:35:46 schrieb Thiede, Christoph <[hidden email]>:

Hi Jakob,


do you have a description of the correct loading order? In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Donnerstag, 10. September 2020 08:04:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>



Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

Eliot Miranda-2
In reply to this post by marcel.taeumel
Hi Marcel,

On Tue, Sep 15, 2020 at 6:27 AM Marcel Taeumel <[hidden email]> wrote:
Hi all.

>  In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...

Loading FFI via the Preference Wizard -- which uses the Installer directly -- works fine in current (fresh) trunk. No debuggers to confirm. No syntax error.

That's good to know.  I'll alter my VMMaker image build scripts to use this.  But there's one code smell about this.  PreferenceWizardMorph is a morph.  i wonder if it's worth-while separating PreferenceWizardMorph into PreferenceWizardMorph and PreferenceWizard.  It feels better changing the script to read PreferenceWizard new installFFI than having it rad PreferenceWizardMorph new installFFI.  If you agree that this is OK, I can make the changes.


I am updating that Metacello script right now. Be patient. :-)

Best,
Marcel

Am 14.09.2020 18:35:46 schrieb Thiede, Christoph <[hidden email]>:

Hi Jakob,


do you have a description of the correct loading order? In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Donnerstag, 10. September 2020 08:04:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>




--
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

Eliot Miranda-2
Hi Marcel, Hi All,

On Tue, Sep 15, 2020 at 11:20 AM Eliot Miranda <[hidden email]> wrote:
Hi Marcel,

On Tue, Sep 15, 2020 at 6:27 AM Marcel Taeumel <[hidden email]> wrote:
Hi all.

>  In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...

Loading FFI via the Preference Wizard -- which uses the Installer directly -- works fine in current (fresh) trunk. No debuggers to confirm. No syntax error.

That's good to know.  I'll alter my VMMaker image build scripts to use this.  But there's one code smell about this.  PreferenceWizardMorph is a morph.  i wonder if it's worth-while separating PreferenceWizardMorph into PreferenceWizardMorph and PreferenceWizard.  It feels better changing the script to read PreferenceWizard new installFFI than having it rad PreferenceWizardMorph new installFFI.  If you agree that this is OK, I can make the changes.

Hmmm, maybe better is to move these install scripts to the Installer hierarchy.  Not sure where they should live.  But it would be nice to be able to say 
    Installer installFFI
and have it choose a default path, as well as be able to say
    Installer squeak installFFI
and have it install via InstallerMonticello


I am updating that Metacello script right now. Be patient. :-)

Best,
Marcel

Am 14.09.2020 18:35:46 schrieb Thiede, Christoph <[hidden email]>:

Hi Jakob,


do you have a description of the correct loading order? In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Donnerstag, 10. September 2020 08:04:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>




--
_,,,^..^,,,_
best, Eliot


--
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

marcel.taeumel
Hi Eliot, hi all.

We had the discussion about the role of Installer recently on the list. After fixing Metacello (and the script for FFI), the wizard will likely to use "Metacello new configuration: 'FFI'; load." again to manage support for different Squeak versions.

Here is the discussion about the future of "Installer":

Best,
Marcel

Am 15.09.2020 20:29:46 schrieb Eliot Miranda <[hidden email]>:

Hi Marcel, Hi All,

On Tue, Sep 15, 2020 at 11:20 AM Eliot Miranda <[hidden email]> wrote:
Hi Marcel,

On Tue, Sep 15, 2020 at 6:27 AM Marcel Taeumel <[hidden email]> wrote:
Hi all.

 In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...

Loading FFI via the Preference Wizard -- which uses the Installer directly -- works fine in current (fresh) trunk. No debuggers to confirm. No syntax error.

That's good to know.  I'll alter my VMMaker image build scripts to use this.  But there's one code smell about this.  PreferenceWizardMorph is a morph.  i wonder if it's worth-while separating PreferenceWizardMorph into PreferenceWizardMorph and PreferenceWizard.  It feels better changing the script to read PreferenceWizard new installFFI than having it rad PreferenceWizardMorph new installFFI.  If you agree that this is OK, I can make the changes.

Hmmm, maybe better is to move these install scripts to the Installer hierarchy.  Not sure where they should live.  But it would be nice to be able to say 
    Installer installFFI
and have it choose a default path, as well as be able to say
    Installer squeak installFFI
and have it install via InstallerMonticello


I am updating that Metacello script right now. Be patient. :-)

Best,
Marcel

Am 14.09.2020 18:35:46 schrieb Thiede, Christoph <[hidden email]>:

Hi Jakob,


do you have a description of the correct loading order? In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Donnerstag, 10. September 2020 08:04:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>




--
_,,,^..^,,,_
best, Eliot


--
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

Christoph Thiede

Hi Marcel,


thanks for fixing this. The problem was that per some package installed earlier, my main image already contained an older version of FFI. In fact, before I read your replies to this thread, I had fixed the problem in my image by loading the new FFI-Kernel versions step by step and copying a number of missing methods manually into the image. Not very elegant, but now I can use the latest FFI version in my image. 😅


I confirm that FFI loads now in a fresh trunk image without any problems, which is great. However, you have to look carefully when you the installation appears to take more than 10 minutes and the progress bars are not changing:




It still wants to know my author initials during installation, this is a bit confusing.


Best,

Christoph



Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 16. September 2020 09:49:25
An: squeak-dev
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Eliot, hi all.

We had the discussion about the role of Installer recently on the list. After fixing Metacello (and the script for FFI), the wizard will likely to use "Metacello new configuration: 'FFI'; load." again to manage support for different Squeak versions.

Here is the discussion about the future of "Installer":

Best,
Marcel

Am 15.09.2020 20:29:46 schrieb Eliot Miranda <[hidden email]>:

Hi Marcel, Hi All,

On Tue, Sep 15, 2020 at 11:20 AM Eliot Miranda <[hidden email]> wrote:
Hi Marcel,

On Tue, Sep 15, 2020 at 6:27 AM Marcel Taeumel <[hidden email]> wrote:
Hi all.

 In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...

Loading FFI via the Preference Wizard -- which uses the Installer directly -- works fine in current (fresh) trunk. No debuggers to confirm. No syntax error.

That's good to know.  I'll alter my VMMaker image build scripts to use this.  But there's one code smell about this.  PreferenceWizardMorph is a morph.  i wonder if it's worth-while separating PreferenceWizardMorph into PreferenceWizardMorph and PreferenceWizard.  It feels better changing the script to read PreferenceWizard new installFFI than having it rad PreferenceWizardMorph new installFFI.  If you agree that this is OK, I can make the changes.

Hmmm, maybe better is to move these install scripts to the Installer hierarchy.  Not sure where they should live.  But it would be nice to be able to say 
    Installer installFFI
and have it choose a default path, as well as be able to say
    Installer squeak installFFI
and have it install via InstallerMonticello


I am updating that Metacello script right now. Be patient. :-)

Best,
Marcel

Am 14.09.2020 18:35:46 schrieb Thiede, Christoph <[hidden email]>:

Hi Jakob,


do you have a description of the correct loading order? In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Donnerstag, 10. September 2020 08:04:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>




--
_,,,^..^,,,_
best, Eliot


--
_,,,^..^,,,_
best, Eliot


Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

marcel.taeumel
Hi Christoph.

It still wants to know my author initials during installation, this is a bit confusing.

Good catch! We may want to set those initials to "FFI" when auto-generating methods.

Best,
Marcel

Am 16.09.2020 13:41:26 schrieb Thiede, Christoph <[hidden email]>:

Hi Marcel,


thanks for fixing this. The problem was that per some package installed earlier, my main image already contained an older version of FFI. In fact, before I read your replies to this thread, I had fixed the problem in my image by loading the new FFI-Kernel versions step by step and copying a number of missing methods manually into the image. Not very elegant, but now I can use the latest FFI version in my image. 😅


I confirm that FFI loads now in a fresh trunk image without any problems, which is great. However, you have to look carefully when you the installation appears to take more than 10 minutes and the progress bars are not changing:




It still wants to know my author initials during installation, this is a bit confusing.


Best,

Christoph



Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 16. September 2020 09:49:25
An: squeak-dev
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Eliot, hi all.

We had the discussion about the role of Installer recently on the list. After fixing Metacello (and the script for FFI), the wizard will likely to use "Metacello new configuration: 'FFI'; load." again to manage support for different Squeak versions.

Here is the discussion about the future of "Installer":

Best,
Marcel

Am 15.09.2020 20:29:46 schrieb Eliot Miranda <[hidden email]>:

Hi Marcel, Hi All,

On Tue, Sep 15, 2020 at 11:20 AM Eliot Miranda <[hidden email]> wrote:
Hi Marcel,

On Tue, Sep 15, 2020 at 6:27 AM Marcel Taeumel <[hidden email]> wrote:
Hi all.

 In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...

Loading FFI via the Preference Wizard -- which uses the Installer directly -- works fine in current (fresh) trunk. No debuggers to confirm. No syntax error.

That's good to know.  I'll alter my VMMaker image build scripts to use this.  But there's one code smell about this.  PreferenceWizardMorph is a morph.  i wonder if it's worth-while separating PreferenceWizardMorph into PreferenceWizardMorph and PreferenceWizard.  It feels better changing the script to read PreferenceWizard new installFFI than having it rad PreferenceWizardMorph new installFFI.  If you agree that this is OK, I can make the changes.

Hmmm, maybe better is to move these install scripts to the Installer hierarchy.  Not sure where they should live.  But it would be nice to be able to say 
    Installer installFFI
and have it choose a default path, as well as be able to say
    Installer squeak installFFI
and have it install via InstallerMonticello


I am updating that Metacello script right now. Be patient. :-)

Best,
Marcel

Am 14.09.2020 18:35:46 schrieb Thiede, Christoph <[hidden email]>:

Hi Jakob,


do you have a description of the correct loading order? In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Donnerstag, 10. September 2020 08:04:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>




--
_,,,^..^,,,_
best, Eliot


--
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: SyntaxError while loading FFI

Christoph Thiede

By the way, I did not yet trace this down, but I found a couple of methods in my image that I have written myself but are annotated with the "FFI" user. Probably FFI is missing an #ensure: somewhere and forgets to reset the initials ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 16. September 2020 13:56:00
An: squeak-dev
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph.

It still wants to know my author initials during installation, this is a bit confusing.

Good catch! We may want to set those initials to "FFI" when auto-generating methods.

Best,
Marcel

Am 16.09.2020 13:41:26 schrieb Thiede, Christoph <[hidden email]>:

Hi Marcel,


thanks for fixing this. The problem was that per some package installed earlier, my main image already contained an older version of FFI. In fact, before I read your replies to this thread, I had fixed the problem in my image by loading the new FFI-Kernel versions step by step and copying a number of missing methods manually into the image. Not very elegant, but now I can use the latest FFI version in my image. 😅


I confirm that FFI loads now in a fresh trunk image without any problems, which is great. However, you have to look carefully when you the installation appears to take more than 10 minutes and the progress bars are not changing:




It still wants to know my author initials during installation, this is a bit confusing.


Best,

Christoph



Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 16. September 2020 09:49:25
An: squeak-dev
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Eliot, hi all.

We had the discussion about the role of Installer recently on the list. After fixing Metacello (and the script for FFI), the wizard will likely to use "Metacello new configuration: 'FFI'; load." again to manage support for different Squeak versions.

Here is the discussion about the future of "Installer":

Best,
Marcel

Am 15.09.2020 20:29:46 schrieb Eliot Miranda <[hidden email]>:

Hi Marcel, Hi All,

On Tue, Sep 15, 2020 at 11:20 AM Eliot Miranda <[hidden email]> wrote:
Hi Marcel,

On Tue, Sep 15, 2020 at 6:27 AM Marcel Taeumel <[hidden email]> wrote:
Hi all.

 In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...

Loading FFI via the Preference Wizard -- which uses the Installer directly -- works fine in current (fresh) trunk. No debuggers to confirm. No syntax error.

That's good to know.  I'll alter my VMMaker image build scripts to use this.  But there's one code smell about this.  PreferenceWizardMorph is a morph.  i wonder if it's worth-while separating PreferenceWizardMorph into PreferenceWizardMorph and PreferenceWizard.  It feels better changing the script to read PreferenceWizard new installFFI than having it rad PreferenceWizardMorph new installFFI.  If you agree that this is OK, I can make the changes.

Hmmm, maybe better is to move these install scripts to the Installer hierarchy.  Not sure where they should live.  But it would be nice to be able to say 
    Installer installFFI
and have it choose a default path, as well as be able to say
    Installer squeak installFFI
and have it install via InstallerMonticello


I am updating that Metacello script right now. Be patient. :-)

Best,
Marcel

Am 14.09.2020 18:35:46 schrieb Thiede, Christoph <[hidden email]>:

Hi Jakob,


do you have a description of the correct loading order? In my main image, I tried to load FFI via the Preference Wizard, and after some loading conflicts which I explicitly needed to #allow through the debugger, I got the same syntax error ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Donnerstag, 10. September 2020 08:04:51
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] SyntaxError while loading FFI
 
Hi Christoph,

I had a similar issue and if I remember correctly got it resolved by
loading the Tools subpackage of FFI. I think Marcel has recently split
it.

So if that is true, the load order in the baseline of FFI should be updated.

Kind regards,
Jakob

Am Mi., 9. Sept. 2020 um 23:50 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Hi all,
>
>
> I fear this could be a frequently discussed topic, but I did not know where to start else.
>
>
> In the web, you can find the following instruction in order to load FFI at several places, amongst them the Swiki:
>
>
> Metacello new configuration: 'FFI'; load.
>
>
> If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
>
>
> ffiPrintString: aString
>
> "FFITestLibrary ffiPrintString: 'Hello'"
>
> <cdecl: "Literal constant expected ->"char* 'ffiPrintString' (char *) module:'SqueakFFIPrims'>
>
> ^self externalCallFailed
>
>
> This is at the very least confusing, I think :-) Are there any undocumented dependencies or something like this?
>
> If I use the preference wizard instead, the installation succeeds. (It's not very convenient that it asks you for your initials during the installation, but this is only a small critique. :-))
>
> I just wanted to inform you about that.
>
>
> Best,
>
> Christoph
>
>




--
_,,,^..^,,,_
best, Eliot


--
_,,,^..^,,,_
best, Eliot


Carpe Squeak!