Closed dantonnoriega closed 2 years ago
Homebrew on M1 is still a bit of a pain out if the box. I have
CFLAGS=-I/opt/homebrew/include
CPPFLAGS=-I/opt/homebrew/include
CXXFLAGS=-I/opt/homebrew/include
CXX11FLAGS=-I/opt/homebrew/include
LDFLAGS=-L/opt/homebrew/lib
in my ~/.R/Makevars
and that seems to take care of it all. I'm not sure why solution 2 didn't work but I assume it might be because it only sets the flags for part of the build step or something
Let me start off by saying that I eventually installed
ragg
after some trial and error.I'm here to help others and to see if I can get help understanding my own solutions. Because frankly, I don't.
TLDR
Adding the following to my empty
~/.R/Makevars
did the trick.~/.R/Makevars
What left me confused is why passing
INCLUDE_DIR
andLIB_DIR
did not work.Below are my other failed attempts. All are installing from source.
Installation Attempts
To start off, I confirmed, looking at configure, that I had all the right libraries installed via homebrew:
Attempt 01 -- Empty Makevars & no
configure.vars
Pasting the relevant parts of in the failed installation (
'jpeglib.h' file not found
)Attempt 02 -- Empty Makevars & update
configure.vars
Added appropriate
INCLUDE_DIR
andLIB_DIR
toconfigure.vars
.Fails but this time it's
'ft2build.h' file not found
.Attempt 03 -- Update
Makevars
& no other adjustmentsAt this point I was confused and I just took an educated guess with my
Makevars
.~/.R/Makevars
Then it installed just fine.
My question to you all is: Why did attempt 02 fail?
I'm stumped between attempt 02 and 03 because I thought passing
INCLUDE_DIR
andLIB_DIR
was essentially passing along what I added manually toMakevars
.sessionInfo()