I have heard about that issue before, and it’s unique to M1 Macs. The boost package for brew doesn’t add the symlink which is required for gcc to find the header.( unlike the x86 darwin package ).
Given that I don’t have a M1 machine, I won’t be able to provide step by step instruction, but the workaround would be to add the missing symlink.
Ideally, the brew package would get fixed, and the workaround wouldn’t be needed.
The suggested solution did not work for me. brew had the right symlinks. Besides, I have had this exact error in both my older Intel-based Mac and my new M1 Mac. Thus, I don’t this that this is specific to M1 Macs.
It tuned out that the problem was that the underlying gcc needed to be made aware of where all the header files are located. So adding this snippet to the Makefile of the go-algorand did the trick: