Compiling Trouble Shooting: Segmentation Fault and GCC Illegal Instruction

Recently I have been re-organizing and re-compiling all third-party dependencies of Nebula Graph, an open-source distributed graph database. And I have come across two interesting issues and would like to share with you.

Flex Segmentation Fault — Segmentation Fault (Core Dumped)

Segmentation fault happened upon compiling Flex: