Howdy all,
I'm building an application which uses libpd and a couple pre-compiled externals as universal macOS app for x86_64 and arm64 (new Apple CPU). So far, building and signing etc is working but now I'm running into an issue when the externals are being loaded on arm64:
Pd: error:../pd/zirkhoa.d_fat: dlopen(.../pd/zirkhoa.d_fat, 10): Symbol not found: _class_addlist Referenced from:.../pd/zirkhoa.d_fat Expected in: flat namespace in .../pd/zirkhoa.d_fat
None of the external sources use class_addlist, so I assume that's something internal? Could this be an issue with the new architecture within libpd / the pd core?
The x86_64 builds run fine on Intel machines.
-------- Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
Hmm... I think if there are 100s of undefined symbols the extern loader in Pd only reports one of them (seemingly choosing one at random). So this is probably a failure of dlopen to see any symbols from the calling pd at all.
But why this should happen for arm and not for intel arch escapes me... perhaps Mac has added some more hurdles to dynamically loading code, but only turned them on for arm?
M
On Wed, Jun 09, 2021 at 11:57:47PM +0200, Dan Wilcox wrote:
Howdy all,
I'm building an application which uses libpd and a couple pre-compiled externals as universal macOS app for x86_64 and arm64 (new Apple CPU). So far, building and signing etc is working but now I'm running into an issue when the externals are being loaded on arm64:
Pd: error:../pd/zirkhoa.d_fat: dlopen(.../pd/zirkhoa.d_fat, 10): Symbol not found: _class_addlist Referenced from:.../pd/zirkhoa.d_fat Expected in: flat namespace in .../pd/zirkhoa.d_fat
None of the external sources use class_addlist, so I assume that's something internal? Could this be an issue with the new architecture within libpd / the pd core?
The x86_64 builds run fine on Intel machines.
Dan Wilcox @danomatika <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_danomatika&a... > danomatika.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__danomatika.com_&d=Dw... > robotcowboy.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__robotcowboy.com_&d=D... >
Pd-dev mailing list Pd-dev@lists.iem.at https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_lis...
More likely that my additions to pd-lib-builder form arm64 are incomplete. I’m just sure where to start debugging.
enohp ym morf tnes ----------- Dan Wilcox danomatika.com robotcowboy.com
On Jun 10, 2021, at 12:11 AM, Miller Puckette msp@ucsd.edu wrote:
Hmm... I think if there are 100s of undefined symbols the extern loader in Pd only reports one of them (seemingly choosing one at random). So this is probably a failure of dlopen to see any symbols from the calling pd at all.
But why this should happen for arm and not for intel arch escapes me... perhaps Mac has added some more hurdles to dynamically loading code, but only turned them on for arm?
M
On Wed, Jun 09, 2021 at 11:57:47PM +0200, Dan Wilcox wrote: Howdy all,
I'm building an application which uses libpd and a couple pre-compiled externals as universal macOS app for x86_64 and arm64 (new Apple CPU). So far, building and signing etc is working but now I'm running into an issue when the externals are being loaded on arm64:
Pd: error:../pd/zirkhoa.d_fat: dlopen(.../pd/zirkhoa.d_fat, 10): Symbol not found: _class_addlist Referenced from:.../pd/zirkhoa.d_fat Expected in: flat namespace in .../pd/zirkhoa.d_fat
None of the external sources use class_addlist, so I assume that's something internal? Could this be an issue with the new architecture within libpd / the pd core?
The x86_64 builds run fine on Intel machines.
Dan Wilcox @danomatika <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_danomatika&a... > danomatika.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__danomatika.com_&d=Dw... > robotcowboy.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__robotcowboy.com_&d=D... >
Pd-dev mailing list Pd-dev@lists.iem.at https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_lis...
--
In the end, I didn't have the time to find a deep fix and instead resorted to compiling the external sources into the application. Thankfully, everything is working and I can make the release.
When I revisit building Pd for native Apple arm64, I imagine this issue will need to be fixed for general dynamic external usage.
On Jun 10, 2021, at 1:48 AM, Dan Wilcox danomatika@gmail.com wrote:
More likely that my additions to pd-lib-builder form arm64 are incomplete. I’m just sure where to start debugging.
enohp ym morf tnes
Dan Wilcox danomatika.com robotcowboy.com
On Jun 10, 2021, at 12:11 AM, Miller Puckette msp@ucsd.edu wrote:
Hmm... I think if there are 100s of undefined symbols the extern loader in Pd only reports one of them (seemingly choosing one at random). So this is probably a failure of dlopen to see any symbols from the calling pd at all.
But why this should happen for arm and not for intel arch escapes me... perhaps Mac has added some more hurdles to dynamically loading code, but only turned them on for arm?
M
On Wed, Jun 09, 2021 at 11:57:47PM +0200, Dan Wilcox wrote: Howdy all,
I'm building an application which uses libpd and a couple pre-compiled externals as universal macOS app for x86_64 and arm64 (new Apple CPU). So far, building and signing etc is working but now I'm running into an issue when the externals are being loaded on arm64:
Pd: error:../pd/zirkhoa.d_fat: dlopen(.../pd/zirkhoa.d_fat, 10): Symbol not found: _class_addlist Referenced from:.../pd/zirkhoa.d_fat Expected in: flat namespace in .../pd/zirkhoa.d_fat
None of the external sources use class_addlist, so I assume that's something internal? Could this be an issue with the new architecture within libpd / the pd core?
The x86_64 builds run fine on Intel machines.
Dan Wilcox @danomatika <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_danomatika&a... > danomatika.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__danomatika.com_&d=Dw... > robotcowboy.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__robotcowboy.com_&d=D... >
Pd-dev mailing list Pd-dev@lists.iem.at https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_lis...
--
-------- Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/