<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Yes, thanks. I’ve created a very simple test app using mpfr. However, in xcode, at least, I have to explicitly link in both libgmp.dylib and libmpfr.dylib , which are both aliases pointing to the actual libriaries containing the code.<div class=""><br class=""></div><div class="">ALL the libraries of all types created by the MacPort and put into the macport directory have been copied into the resources via duplication rather than simply moving aliases around.<br class=""><div class=""><br class=""></div><div class="">I first referred to “libmpfr.dylib” — which is an aliias —  but starting using libmpfr.6.dylib (what the alias points to) on the outside chance that it was the alias causing problems.</div><div class=""><br class=""></div><div class="">I don’t  see how the references to code in the gmp dylib  found in the mpfr dylib are going to automatically resolve if xcode requires one to explicitly link both dylibs in order for something to compile and run.</div><div class=""><br class=""></div><div class="">.</div><div class=""><br class=""></div><div class="">My next test is to compile some absolutely trivial library without external references and see if I can get that to work.</div><div class=""><br class=""></div><div class="">Thanks for your input.</div><div class=""><br class=""></div><div class="">L</div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 13, 2020, at 4:21 AM, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" class="">marcel.taeumel@hpi.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="__MailbirdStyleContent" style="font-size: 10pt; font-family: Arial;" class="">
                                        
                                        
                                            
                                        
                                        
                                        Hi Lawson.<div class=""><br class=""></div><div class="">> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class=""> </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class="">I think: the mpfr library uses the gmp library. So how does one do THAT with squeak?</span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class=""><br class=""></span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class="">You don't. Your operating system does that for you. Well, the same lookup rules for that dependent library apply, I suppose. Do you have the gmp library installed in your system?</span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class=""><br class=""></span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class="">Yes, not having all dependent libraries does raise that "external module not found" error, too. It can be confusing.</span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class=""><br class=""></span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class="">Working with FFI requires knowledge about working with shared libraries in your operating system. It's one of those "leaky abstractions" where Squeak is -- understandably -- not able to hold your hand for all kinds of configurations out there. :-)</span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class=""><br class=""></span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class="">You can try using a debug-build VM, which produces a more descriptive error log.</span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class=""><br class=""></span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class="">Best,</span></div><div class=""><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px" class="">Marcel</span></div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px"><p style="color: #AAAAAA; margin-top: 10px;" class="">Am 13.08.2020 12:11:53 schrieb LawsonEnglish <<a href="mailto:lenglish5@cox.net" class="">lenglish5@cox.net</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif" class="">So I tested a simple mandelbrot set rendering algorithm using the ArbitraryPrecisionFloat package and it works just fine, but terribly slowly.<br class=""><br class="">So I had the idea of using mpfr via FFI and find that I can’t even begin.<br class=""><br class="">I’m getting the dreaded External module not found error and just can’t get rid of it.<br class=""><br class="">I thought I was taking the easy route and simply copying the mpfr library into the Squeak all-in-one Resources directory but no matter what I try, that error pops up.<br class=""><br class=""><br class="">initPrecision: aDefaultPrecision<br class="">       “initialize default precision"<br class=""><br class=""><cdecl: void="" 'mpfr_init'="" (long="" )="" module:'libmpfr.6.dylib'="" class=""><br class="">        ^self externalCallFailed <br class=""><br class="">This is roughly the “hello world” of using mpfr, I thought, but can’t even do that.<br class=""><br class="">Now, waiting in the wings is a bigger problem, I think: the mpfr library uses the gmp library. So how does one do THAT with squeak? Compile both libraries into a single target? (yikes!).<br class=""><br class="">That might be an issue later on, but the impression I’m getting is that squeak simply can’t find libmpfr.6.dylib, so errors that result from calling a second library from the first haven’t even popped up yet.<br class=""><br class=""><br class="">Squeak5.3-19435-64bit, Mac OS X 10.15.6<br class=""><br class=""><br class="">Thanks <br class=""><br class=""><br class="">Lawson<br class=""><br class=""></cdecl:></div></blockquote></div><br class=""></div></blockquote></div><br class=""></div></div></body></html>