I finally had the chance run Pd [1] on an M1-Mac with Monterey. Here's what I found:
When starting Pd normally, two processes (Pd and pd) are running in native mode. Deken shows only arm64 externals. When installing an external, it can be loaded afterwards.
When 'Open with Rosetta' is checked in the information dialog and Pd is started, both processes (Pd and pd) are running in Rosetta mode (the intel binary is executed). Trying to load the previously downloaded arm64 external fails with an error message indicating wront architecture. Now, Deken only shows amd64 externals. When downloading and installing an external now, it can be loaded successfully afterwards.
tl;dr: Pd and Deken seem to do everything correctly on M1 Macs.
Child processed are launched with the same arch as their parent. I observed this also with QjackCtl and jackd. Normally, both run in native mode. When 'Open with Rosetta' is checked in QjackCtl, jackd runs under Rosetta too.
Roman
[1] http://msp.ucsd.edu/Software/pd-0.52-2.macos.zip
On Wed, 2022-04-27 at 09:01 +0200, Roman Haefeli wrote:
On Wed, 2022-04-27 at 08:42 +0200, IOhannes m zmoelnig wrote:
so here's a better solution (also untested). instead if *everything* i wrote above do this:
- find the file Pd.app/Content/Resources/tcl/pd-gui.tcl
- open it in an editor
- locate the line (somewhere around line:846) that says:
"[exec -- $pd_exec -guiport $::port {*}$::pd_startup_args &]" 4. in this line put an "arch -x86_64" before the $pd_exec, so it now reads: "[exec -- arch -x86_64 $pd_exec -guiport $::port {*}$::pd_startup_args &]"
That's valuable to know. Thanks, IOHannes. I still have two questions regarding this matter:
- How does Deken detect current platform/arch? Does it something
like `uname -m` or does it check what arch Pd has, or something else?
- Does the code-signing take into account only the compiled binaries
or the whole app? Do I have to re-code-sign after having modified pd- gui.tcl?
BTW: I have access to an M1 with macOS Monterey and hopefully will soon be able to build a few externals and test stuff.
Roman