From 59a82a0645b086554c5137aec6ae3be848361716 Mon Sep 17 00:00:00 2001 From: Graeme Winter Date: Wed, 4 Feb 2026 10:50:34 -0600 Subject: [PATCH] Darwin aarch64 hack 1. replace .so with .dylib 2. recognise non-x64 processors Towards https://github.com/DiamondLightSource/epicsdbbuilder/issues/33 --- epicsdbbuilder/mydbstatic.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epicsdbbuilder/mydbstatic.py b/epicsdbbuilder/mydbstatic.py index 2e106b5..892f827 100644 --- a/epicsdbbuilder/mydbstatic.py +++ b/epicsdbbuilder/mydbstatic.py @@ -64,6 +64,8 @@ def ImportFunctions(epics_base, host_arch): } bits = platform.architecture()[0] host_arch = system_map[(platform.system(), bits)] + if platform.system() == 'Darwin' and platform.processor() == 'arm': + host_arch = 'darwin-aarch64' # So we can work with both EPICS 3.14 and 3.15, look for libdbCore.so first # before falling back to the older libdbStaticHost.so @@ -73,6 +75,9 @@ def ImportFunctions(epics_base, host_arch): if platform.system() == 'Windows': library_name_format = '{}.dll' library_location = 'bin' + elif platform.system() == 'Darwin': + library_name_format = '{}.dylib' + library_location = 'lib' try: ImportFunctionsFrom(os.path.join(