I received the following error while configuring mesa version 7.9.1 from its source code (running ./configure).
Error: “brw_program.c:39:20: error: talloc.h: No such file or directory”
To solve this issue, I added a statement to the ./configure line that added talloc’s include directory into the CPPFLAGS.
CPPFLAGS="-I<PATH TO TALLOC INCLUDE DIRECTORY>" ./configure
Make sure to keep the “-I” before the path with no spaces between them. I had talloc installed in a unique location, with a different prefix than the norm. Mesa wasn’t looking in the right places for it. To provide mesa with the correct path, I added it into CPPFLAGS. These flags are used to define include directory paths for the compiler.