Skip to content

Issues building on M1(ARM) #24

@ch-hristov

Description

@ch-hristov

Best I managed to get is to modify the compile to:


swig -python trace_skeleton.i
gcc -fPIC -O3 -c trace_skeleton.c trace_skeleton_wrap.c -I/$(python3-config --cflags)
gcc $(python3-config --ldflags) -dynamiclib *.o -o _trace_skeleton.so -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/libpython3.9m.dylib -undefined dynamic_lookup

# quick tests
# python3 -i -c "import trace_skeleton; trace_skeleton.trace('\0\0\0\1\1\1\0\0\0',3,3); print(trace_skeleton.len_polyline());"
# python3 -i -c "import trace_skeleton; print(trace_skeleton.from_list([0,0,0,1,1,1,0,0,0],3,3))"
# python3 example.py

Result:

ImportError: dlopen(/Users/christosavovchristov/symbol-api/api/infrastructure/algorithms/_trace_skeleton.so, 0x0002): tried: '/Users/christosavovchristov/symbol-api/api/infrastructure/algorithms/_trace_skeleton.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/christosavovchristov/symbol-api/api/infrastructure/algorithms/_trace_skeleton.so' (no such file), '/Users/christosavovchristov/symbol-api/api/infrastructure/algorithms/_trace_skeleton.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions