Problem Installing r8s on mac: No rule to make target '/usr/include/string.h', needed by 'DrawTree.o'
Hi,
I'm trying to install the software r8s on a MacBook pro (M1). When trying to use the command make in the src folder (as explained in the manual and README) I get this error:
make: *** No rule to make target '/usr/include/string.h', needed by 'DrawTree.o'. Stop.
I have searched online for a solution but I was not able to find one. Some of you has any idea on how to resolve this?
Thank you in advance
Marcella
• 1,765 views
•
link
0 answers
No answers yet.
Log in to answer this question.
See if this helps: https://andreasfertig.blog/2021/02/clang-and-gcc-on-macos-catalina-finding-the-include-paths/
I assume you have
Xcodeand command line tools installed.Yes I have both Xcode and command line tools installed. It seems that it's the thing I need to do, but I'm quite new to mac and informatics in general and I can't understand what I need to do
Looks like you need to edit
.zshrcfile in your account (https://osxdaily.com/2021/11/18/where-the-zshrc-file-is-located-on-mac/ ) and add the following line to it. Open a new terminal after you do this.It does not work. I'm still using bash, so I edited my .bashrc and opened a new terminal.
If I use the command make I get the same error
I managed to edit the makefile so that it compiled on a Macbook Pro M4 OS 26.6.2. I used ChatGPT 4 to help figure it out.
I edited the makefile to:
give it the correct SDK path:
SDKROOT := $(shell xcrun --sdk macosx --show-sdk-path)<- due to error aboveremove defunct paths to the C header files:
sed -i '' 's| /usr/include/[^ ]*||g' makefile. There was one line (line 40) where I had to remove the path manually, even after the sed command. I changedmoment.o:/usr/include/math.h moment.h MyUtilities.htomoment.o: moment.h MyUtilities.h. <- also due to error abovechange FC to the correct gfortran version:
FC = gfortran-14and the path to the correct path:LPATH = -L/opt/homebrew/opt/gcc@14/lib/gcc/14<- due to error:ld: library 'gfortran' not found clang: error: linker command failed with exit code 1 (use -v to see invocation)set gfortran to allow some mismatches
FFLAGS = -fallow-argument-mismatch<- due to error:Error: Rank mismatch in argument 'ipivot' at (1) (rank-1 and scalar)Here is the text of the makefile:
Some of the lines are probably not necessary but I just edited it enough so it compiled and ran.