https://github.com/qgis/QGIS/commit/a20c909c1b2bd0dfcae281fb6e55226d3d3dc423 relax flex requirement as QGIS builds and runs fine with our flex. Index: CMakeLists.txt --- CMakeLists.txt.orig +++ CMakeLists.txt @@ -329,7 +329,7 @@ if(WITH_CORE) set (USING_NINJA TRUE) endif() - find_package(FLEX 2.6 REQUIRED) + find_package(FLEX 2.5.39 REQUIRED) find_package(BISON REQUIRED) #############################################################