I've been trying for several days to install a C++ library dependency for a python package I want to use. In addition to having no idea how to install something from source (when homebrew/anaconda/pip don't have what I need), I'm also working on a Mac for the first time. Woohoo!
Thanks to some excellent help in a different question of mine, I think I'm almost there. Answers and comments on that question got me to the point where when I use sudo make install
, I get this error:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
(standard_in) 1: parse error
Checking the headers installation directory (/usr/include/libspot)
mkdir: /usr/include/libspot: Operation not permitted
So that lead me to this answer which says that on newer macs you can't install to the /usr/ directory but should use /usr/local/. So I looked at the makefile and found these two lines:
###
INSTALL_HEAD_DIR = $(DESTDIR)/usr/include/libspot
INSTALL_LIB_DIR = $(DESTDIR)/usr/lib
###
I recon that these need to be changed to match this /local/ requirement, but I'm a bit scared to do so. Is there any danger in changing those lines to
###
INSTALL_HEAD_DIR = $(DESTDIR)/usr/local/include/libspot
INSTALL_LIB_DIR = $(DESTDIR)/usr/local/lib
###
Thanks!