I believe this is due to 11.2 containing a newer version of LLVM. If I add the following to the Makefile, the build completes successfully. .if ${COMPILER_TYPE} == clang .if ${COMPILER_VERSION} >= 60 CXXFLAGS+= -Wno-undefined-var-template -Wno-unused-private-field -Wno-unused-local-typedef -Wno-undefined-bool-conversion .endif .endif There is also one source code change that needs to be patched ... ../src/stub-cache.cc:1477:33: error: reinterpret_cast from 'nullptr_t' to 'char *' is not allowed : GetCodeWithFlags(flags, reinterpret_cast<char*>(NULL)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Changing the reinterpret_cast to a static_cast allows the build to complete.
Uggh, sorry. I was trying to fix two broken port builds and I mixed up the info for the two. Let me try again. Makefile Diff ... --- Makefile.old 2018-05-17 11:52:01.482886000 -0500 +++ Makefile 2018-05-17 12:00:06.856907000 -0500 @@ -38,7 +38,7 @@ OPTIONS_DEFAULT=SSL TEST_DESC= Add support for running regression test -USES= cpe scons +USES= cpe compiler scons MAKE_ARGS= --prefix=${STAGEDIR}${PREFIX} --cc=${CC} --cxx=${CXX} \ --use-system-pcre --use-system-snappy --use-system-v8 @@ -72,6 +72,14 @@ ALL_TARGET= core tools .endif +.include <bsd.port.pre.mk> + +.if ${COMPILER_TYPE} == clang +.if ${COMPILER_VERSION} >= 60 +CXXFLAGS+= -Wno-undefined-var-template -Wno-unused-private-field -Wno-unused-local-typedef -Wno-undefined-bool-conversion +.endif +.endif + post-patch: @${REINPLACE_CMD} 's/\["-O3"\]/"${CXXFLAGS}"/' \ ${WRKSRC}/SConstruct @@ -82,4 +90,4 @@ ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${TEST_TARGET} .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> Source code diff ( not sure how to make that conditional on clang 6.0 ) ... --- src/mongo/util/fail_point_registry.cpp.old 2018-05-17 12:03:41.963178000 -0500 +++ src/mongo/util/fail_point_registry.cpp 2018-05-17 12:03:52.764014000 -0500 @@ -53,7 +53,7 @@ } FailPoint* FailPointRegistry::getFailPoint(const string& name) const { - return mapFindWithDefault(_fpMap, name, reinterpret_cast<FailPoint *>(NULL)); + return mapFindWithDefault(_fpMap, name, static_cast<FailPoint *>(NULL)); } void FailPointRegistry::freeze() {
Note: when a patch for this issue is ready to be committed please remember about the ${name}_limits-related patch[1], which fixes this port on >=12.0. [1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227217
Is this PR also relevant for databases/mongodb3* ? This version (2.6.12) has been end-of-life upstream since 2016.
When I built the package last it was for mongodb-2.6.12_4.
Refers to expired and removed port.