I am trying to repro this locally but it will take time (small VM). That error usually comes incorrect usage of MONGO_INITIALIZER_GENERAL (and related functions) which want to define a DAG for a list of functions to call at startup. It does a topological sort so it is incompatible with a graph with cycles.
What build command were you using? Below is the command I am using (I am building debug to aid troubleshooting) on FreeBSD 13.1-STABLE.
I had to add define into SConstruct for _LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS to fix an issue in ASIO with the recent upgrade to C++ 20 in the MongoDB source code.
Are there any local patches that you may have applied?
And added “# define ASIO_HAS_STD_INVOKE_RESULT” to src/third_party/asio-master/asio/include/asio/detail/config.hpp to make asio compile.
In the meantime I found that mongod runs fine if I don’t use --use-system-* for various libraries. Currently trying to find which use-system was the cause. It runs at least if I disable all of them.
Succeeded in running mongod without errors by removing --use-system-icu from the build parameters.
The port is submitted: https://www.freshports.org/databases/mongodb70/.
Now testing some of you parameters like --ninja and --allocator=system.
What would be the benefits of using those settings?
In terms of the two options, --ninja is a useful for developers as it compiles faster then scons. For packaging, It is simpler to just use scons. The --allocator=system tells MongoDB to use system allocator instead of the vendored GPerfTools/tcmalloc. Since FreeBSD uses jemalloc, which is comparable in performance too tcmalloc, you save a tiny bit of binary size by just using it.