Open wwwxmu opened 6 years ago
I am also working on a Mac, and had both this and then subsequently some of the other reported installation problems.
Firstly this one - replace '-shared' with '-dylib'
After that, if you have multiple python installations and use some sort of Python virtual environment (I'm using Anaconda) you'll probably still have problems, first with building, and then potentially with runtime errors (Fatal Python error: PyThreadState_Get: no current thread).
To resolve these you need to ensure that you are building the EMD module against the correct libraries for your runtime Python installation. Assuming you have your runtime python activated then changing the makefile like this should solve your issues:
...
WRAPPERS := _emd.so emd.py
INCLUDES := $(shell python2-config --includes)
CC = cc
LD = ld
LIBS := $(shell python2-config --prefix)/lib
LD_FLAGS := -L$(LIBS) $(shell python2-config --ldflags)
CFLAGS := $(shell python2-config --cflags)
CFLAGS += -fPIC
all: $(WRAPPERS)
_%.so: %.o %_wrap.o
@echo ">>> Linking wrapper library '$(@)'."
@echo -n " "
$(LD) $(LD_LIBS) $(LD_FLAGS) -dylib -o $@ $^
@echo
%.o: %.c
@echo ">>> Building object file '$(@)'."
@echo -n " "
$(CC) -o $@ -c $< $(CFLAGS) $(INCLUDES) $(LIBS)
@echo
...
mac os high sierra 10.13 install error