Cmake build error due to PATH, CPPFLAGS, CFLAGS and LDFLAGS environment variables

The /usr/bin/as file comes from the lxi-tools snap that you’re staging. It’s worth mentioning that this particular snap is based on core (Ubuntu 16.04) and therefore the binaries included will be incompatible with your snap’s core20 base (Ubuntu 20.04).