However we have seen more than 300 ports back in 2017 [1] and saw many emerging patterns. This enabled us to write rules to transpile and optimize 100s of build-systems to buck using buildinfer [2] [3]. We hope that more sane decisions will be made regarding build-systems in new projects. We discovered analyzing over 300 projects that a lot of complexity is not needed and often a non-turing complete language for describing the build is sufficient. In fact we found that over 90% of projects can be described solely by using glob expressions.
[1] https://hackernoon.com/lessons-learned-from-porting-300-proj...
[2] https://hackernoon.com/announcing-buildinfer-for-c-3dfa3eb15...
OpenSSL buildsystem is over 6k lines of perl scripts which communicate over pipes.
OpenCV uses cmake, python and prolog for it's build. Until this day, I have no clue why there is prolog involved.
You can read some bits about it in our initial announcement of buildinfer: https://hackernoon.com/announcing-buildinfer-for-c-3dfa3eb15...
You could structure something around CMake.
One immediate issue is compilation flags and platforms management. You may need to use some custom flags, for example, you need to compile against a specific architecture. You want those flags to be passed to all libraries uniformly.
But the horrible problem is quickly the compatibility matrix.
In other words, if you are making available, let's say you are using alib v1 and blib v2, you need to check the two libraries compile, link, and work together nicely. So when you upgrade one of the libraries, you need to check that compatibility again.
It's an important problem because if you're working on production software, you need to be able to build all versions and maintain them. And maybe you will have to upgrade only one library. You can't always be "current" everywhere.
So very quickly, using a package manager becomes more painful than having the libraries management manually with a couple of custom scripts.
I'll be happily be proven wrong by a package manager (and we tried a lot).
I mostly work in Windows development. CMake scripts created by a professional build engineer caused a lot of havoc. It injected itself into the project files in such an insidious fashion, that it was nearly impossible to tell if dependencies were correct. It completely broke Intellisense, making code navigation an exercise in frustration.
I was not happy, and wound up ripping out the scripts and creating new solution and project files that actually supported the needs of the developers.
(Edited to remove typos and improve grammar)
so i mean what e.g. conan does is acknowledge this and require that package creators provide "recipes" that tell conan how to build the project.
buckaroo seems to take a similar approach: https://github.com/LoopPerfect/buckaroo/wiki/Creating-a-Pack...
i will say that in my time using conan to attempt to solve for compiling an application for x86 and a few flavors of ARM, this is NOT a silver bullet.. a huge fraction of third party libraries we tried to pull in needed to have their recipes modified to build correctly.
1. Conan does not require a server. If a project contains a conanfile.py with build instructions, you can also run `conan create` from a project's source repository (no server required).
2. You can easily force build dependencies with the `--build *` flag
What we really need are automated porting tools to fix this mess!
The wildcard is cross-platform. vcpkg doesn't seem to be 100% there and has many bugs for example the folders where includes and libraries are kept changes based on platform.
The other problem is static vs dynamic linking, as well as conflicts between different combinations of cmt libs etc. it gets very messy quickly.
Its almost like you're spending more time trying to get all the libraries you want working together than actually coding.
[1] https://buckbuild.com/files-and-dirs/buckconfig.html#cache
Lastly I'd like to note that Buck and Bazel are converging to Skylark for describing builds. The differences between Buck and Bazel should become smaller over time
The main problem seems to be that because there is no standard C++ build system, every library uses a different one. Wrangling all those together without requiring the library authors to do anything is extremely difficult.
Hell many C++ libraries still use autotools or hand-written Makefiles. I don't really see how it is even possible to automatically download and build those projects.