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:
If I do this in a fresh trunk image (#19838) without any extra installs, I get a syntax error:
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. Christoph
Carpe Squeak!
|
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 > > |
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!
|
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
|
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
|
In reply to this post by marcel.taeumel
Hi Marcel, On Tue, Sep 15, 2020 at 6:27 AM Marcel Taeumel <[hidden email]> wrote:
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.
_,,,^..^,,,_ best, Eliot |
Hi Marcel, Hi All, On Tue, Sep 15, 2020 at 11:20 AM Eliot Miranda <[hidden email]> wrote:
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
_,,,^..^,,,_ best, Eliot |
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
|
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
Carpe Squeak!
|
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
|
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
Carpe Squeak!
|
Free forum by Nabble | Edit this page |