When I attempt to run:

g.extension r.stream.order

I get the following error:

Fetching <r.stream.order> from GRASS GIS Addons repository (be patient)...
clang: warning: no such sysroot directory:
'/Developer/SDKs/MacOSX10.9.sdk' [-Wmissing-sysroot]
In file included from io.c:1:
./io.h:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
1 error generated.
make: *** [OBJ.x86_64-apple-darwin18.5.0/io.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
(Tue Jul  2 09:53:36 2019) Command finished (0 sec)   

When I attempt to install other extensions, it seems to work fine.

If anyone is familiar with this error on OSX, is there a solution to this problem?

I am running GRASS 7.6 on OSX 10.14 (have also tried GRASS 7.4, same issue).


1 Answer 1


Have you installed the development libraries for C and for grass?

The extension needs to be compiled so you need both a compiler (which is giving you an error so it is installed), and the relevant header files.

It can't find stdio.h which is part of the base C library. You would probably get the same error if you tried to compile anything in C.

  • Thank you for the response! As far as I'm aware, I have not installed those. However, how is it that other packages install successfully? If you get the chance, could you let me know where to find the appropriate libraries for OS X so that I can try this? Thank you
    – David
    Jul 31, 2019 at 22:11
  • I'm not familiar with mac, but it's a regular trip hazard with linux. See here for some hints stackoverflow.com/questions/28362994/where-is-my-stdio-h-in-mac . Python packages will install without a problem. If you look at the source, for python packages the source files end in .py, C in .h and .c, and fortran in .for.
    – vinh
    Aug 1, 2019 at 9:37
  • Once you have located stdio.h what is the solution? I am running Grass 8.3.4 on macOS 10.15.15
    – Bryce
    Jun 23, 2020 at 0:04
  • Try to export the location of the stdio.h e.g. export PATH=$PATH:/path/to/folder/containing/ then try g.extension again.
    – vinh
    Jun 23, 2020 at 1:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.