https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84715
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Don't run ./configure in the source dir: https://gcc.gnu.org/wiki/FAQ#configure If you're building a snapshot or modifying the source, you need Flex: https://gcc.gnu.org/install/prerequisites.html#Tools_002fpackages-necessary-for-modifying-GCC We don't want the configure script to require flex, because most users don't need it. If you're building a snapshot (not an official release) or modifying the source then you're expected to read the docs and install the required prerequisites.