kaeawc / setup-jemalloc

A GitHub Action to download, install, and cache jemalloc
MIT License
3 stars 0 forks source link

Mac jemalloc preloading is not working as intended #4

Open kaeawc opened 1 week ago

kaeawc commented 1 week ago

Originally thought we just needed DYLD_INSERT_LIBRARIES, perhaps there is more

Example Mac CI run

dyld[2012]: terminating because inserted dylib '/usr/local/lib/libjemalloc.2.dylib' could not be loaded: tried: '/usr/local/lib/libjemalloc.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libjemalloc.2.dylib' (no such file), '/usr/local/lib/libjemalloc.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
dyld[2012]: tried: '/usr/local/lib/libjemalloc.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libjemalloc.2.dylib' (no such file), '/usr/local/lib/libjemalloc.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
Usage: ./scripts/mac/verify.sh <process_name>
kaeawc commented 1 week ago

As noted in #2 I probably need to do this https://stackoverflow.com/questions/34114587/dyld-library-path-dyld-insert-libraries-not-working