[squeak-dev] Got FFI working on my own builds (production and debug) but downloaded all-in-one always never works

LawsonEnglish LEnglish5 at cox.net
Tue Aug 25 02:21:10 UTC 2020


[hopefully this won’t cause my ISP more headaches like it did last night]

I did the test of changing info.plist and adding the libraries and image/changes files to the SqueakDebug, Squeak and Squeak.assert apps and they all work just fine with my FFI.

So my own compiled Squeak dylib doesn’t have the problem, while the Squeak dylib in the MacOS director in the all-in-one package does.

.



The big holdup now is to get mpfr_get_str() working.

char * mpfr_get_str (char *str, mpfr_exp_t *expptr, int base, size_t n, mpfr_t op, mpfr_rnd_t rnd)

In the  simplest call, giving a NULL buffer and passing 0 via expptr returns the answer in a string buffer allocated by mpfr itself and returns the exponent via expptr.


Thus far, I can’t quite get that to work. Crashes squeak every time.

Some people didn’t even realize that you can pass a "hand-made” external pointer into a variable using the FFI library, so the documentation isn’t exactly clear here. I couldn’t find an example of doing this in the test library so I’m trying to figure it out on my own and so far, Its not quite working.

anyway, thanks for everyone’s suggestions.

L


> On Aug 22, 2020, at 10:38 AM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> 
> Hi Lawson,
> 
> On Thu, Aug 20, 2020 at 1:56 PM LawsonEnglish <LEnglish5 at cox.net <mailto:LEnglish5 at cox.net>> wrote:
> So, with Craig Latta’s help, I managed to build my own vm. I added back in the 5.3-19435 image and changes files, and sources file, and changed the plist appropriately and it works just fine.
> 
> Yay!
> 
> However, I never did get the distributed version to work. I can sorta make it work with enough swapping of files, but it eventually crashes on startup even though FFI to my own dylib is working.
> 
> The unmodified distributed 5.3 all-in-work apparently ALWAYS eventually crashes onstartup after trying to load a dylib and then staving, if I do it enough times, but thus far the ones I built do not do this.
> 
> If you run with an assert 5.3 VM build do you see anything indicative?  And are you saying that the 5.3 distribution also crashes on a recent VM?
>  
> I can continue with my FFI experiments now (thanks everyone for their help), but unless something is very wrong with my Mac’s setup, the latst vesion of catalina isn’t stable for FFI via dylib.
> 
> 
> L
> 
> _,,,^..^,,,_
> best, Eliot
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200824/230e18bf/attachment.html>


More information about the Squeak-dev mailing list