Stripped main to bare bones, setup CMake, discovered and solved build issues.