0

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!

rocksNwaves
  • 5,331
  • 4
  • 38
  • 77
  • "*Is there any danger in changing those lines [...]*" Hard to say without seeing what the MakeFile actually does. This sounds like the type of question you should ask whoever gave you that MakeFile. Also, on a side note, your first link takes me to a blank blocked page. Is that actually a good link? – scohe001 Feb 04 '21 at 15:58
  • @scohe001 Well I got the makefile directly from a github repo, which I just included a link to in an edit. There were lots of installation instructions for different flavors of linux, but none for a mac. And I just fixed the link, thanks for pointing that out. – rocksNwaves Feb 04 '21 at 16:00
  • Github supports conversations like this. You can open an issue like you'd ask a question on StackOverflow, except all of the contributors to the repo will get a direct ping/email about it. But just from a ctrl-F for those variable names, it looks like it won't hurt you to change. – scohe001 Feb 04 '21 at 16:07
  • Thanks @scohe001. I indeed requested some clarifications on how to install for mac OS. It's been several days of radio silence, so I thought I'd try here. I guess I'll just give it a go and see what happens ;) – rocksNwaves Feb 04 '21 at 16:09
  • It looks like that repo only has one contributor and they haven't been active on GitHub for 3wks, so you may have to wait a bit for a response. But that's just how the world of open source can work :) – scohe001 Feb 04 '21 at 16:13

0 Answers0