xorg_dri2.c includes "dri2.h". This header file is originated from xorg-server:hw/xfree86/dri2/dri2.h. If there is already an X-Server with dri2-acceleration installed, the header file is found. If you are just going to build it the first time, it is missing. Workaround: copy dri2.h from xorg-server sources to src/gallium/state_trackers/xorg. Solution: I don't know, if it is a solution to include a private copy of this header dri2.h in Mesa sources, or if it would be better to move it from xorg-server to the dri2proto package.
Something was wrong on your end installing proto should be enough, no issue here
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.