I wanted to follow up about another thing:

On 2021-09-05 at 16:03 AEST, quoth paul <p...@inktvis.org>:
I had some difficulty getting my app to compile against Guile, but i eventually managed to link against a version of Guile installed with Homebrew (guile: stable 3.0.7 (bottled)), however when trying to boot it up i seemed to run into the same issue described by Jeffrey Walton [1]. My app would boot, and as soon as it hit the Guile initialisation calls, it would error out as follows:

allocating JIT code buffer failed: Permission denied
jit.c:5873: fatal: assertion failed

While the other person seems to imply the problem is with Apple's M1 silicon, i'm actually running an older machine (2.9 GHz Dual-Core Intel Core i5, macOS 11.5.2). I then managed to get further by downloading the Guile release tarball version 3.0.7 and and building with `./configure --enable-jit=no`;>

[...]

1. https://mail.gnu.org/archive/html/bug-guile/2021-03/msg00012.html

It turned out that the JIT issue was _also_ PEBKAC i am glad to report. Completely by accident i happened upon some settings in the Xcode project of my app, under the Target > Signing & Capabilities > Hardened Runtime options. One has to enable the following two items:

* Allow execution of JIT-compiled code

* Allow unsigned executable memory

Those two settings correspond to entries in the <myapp>.entitlements file as follows:

<dict>
        <key>com.apple.security.cs.allow-jit</key>
        <true/>
        <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
        <true/>
</dict>

Now, the app is able to build and run successfully against the Homebrew-packaged version of Guile - super convenient!

I thought i'd post my findings in case someone else hits these issues in the future. Or should i contribute a section to a README somewhere, so that folks don't have to laboriously work this out for themselves every time?

Cheers,
p.

Reply via email to