@Perk what version of osquery are you trying to build though? Because the document on readthedocs is not up to date with the latest version of osquery (which is still in pre-release, but it's the current master branch), and until we finish the work with third party dependencies, it's very hard to obtain what you want because there's "no way" to build them from source, they currently come prebuilt.
If you want the latest stable, osquery 3.3.2, that should still have the homebrew formulas you can change to build from source.
But then I think the issue there is that you need a Clang toolchain that can build C++14, which means that you need to compile Clang yourself (it's well documented by the LLVM people), but to do that you need a compiler with C++11 support, so you need to also compile a newer GCC.