With the update of devel/cmake to 3.10.1, it requires jsoncpp to be built with c++11. Without that, the following linker errors are emitted: [ 95%] Linking CXX executable ../bin/ccmake libCMakeLib.a(cmNinjaTargetGenerator.cxx.o): In function `cmNinjaTargetGenerator::WriteTargetDependInfo(std::__cxx11::basic_string<char, std::char_traits<char>, std: :allocator<char> > const&)': cmNinjaTargetGenerator.cxx:(.text+0x8e7c): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmNinjaTargetGenerator.cxx:(.text+0x900c): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmNinjaTargetGenerator.cxx:(.text+0x91e8): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmNinjaTargetGenerator.cxx:(.text+0x9278): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' libCMakeLib.a(cmake.cxx.o): In function `cmake::ReportCapabilitiesJson(bool) const': cmake.cxx:(.text+0x4648): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' libCMakeLib.a(cmake.cxx.o):cmake.cxx:(.text+0x476c): more undefined references to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::a llocator<char> > const&)' follow libCMakeLib.a(cmake.cxx.o): In function `cmake::ReportCapabilities[abi:cxx11](bool) const': cmake.cxx:(.text+0x4afc): undefined reference to `Json::FastWriter::write[abi:cxx11](Json::Value const&)' libCMakeLib.a(cmGlobalNinjaGenerator.cxx.o): In function `cmcmd_cmake_ninja_depends(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<ch ar>, std::allocator<char> > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_s tring<char, std::char_traits<char>, std::allocator<char> > > > >, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato r<char> > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::c har_traits<char>, std::allocator<char> > > > >)': cmGlobalNinjaGenerator.cxx:(.text+0xa240): undefined reference to `Json::Reader::getFormattedErrorMessages[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xa568): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xa7c0): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmGlobalNinjaGenerator.cxx:(.text+0xa824): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmGlobalNinjaGenerator.cxx:(.text+0xa970): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' libCMakeLib.a(cmGlobalNinjaGenerator.cxx.o): In function `cmGlobalNinjaGenerator::WriteDyndepFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::alloc ator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_tr aits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11:: basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)': cmGlobalNinjaGenerator.cxx:(.text+0xaf3c): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xb01c): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xb0d8): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xb554): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xb5f0): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xb910): undefined reference to `Json::Value::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<ch ar> > const&)' cmGlobalNinjaGenerator.cxx:(.text+0xb920): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmGlobalNinjaGenerator.cxx:(.text+0xbe2c): undefined reference to `Json::Reader::getFormattedErrorMessages[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xbfcc): undefined reference to `Json::Reader::getFormattedErrorMessages[abi:cxx11]() const' libCMakeLib.a(cmGlobalNinjaGenerator.cxx.o): In function `cmcmd_cmake_ninja_dyndep(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<cha r>, std::allocator<char> > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_st ring<char, std::char_traits<char>, std::allocator<char> > > > >, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator <char> > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::ch ar_traits<char>, std::allocator<char> > > > >)': cmGlobalNinjaGenerator.cxx:(.text+0xc99c): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xc9b8): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xc9d4): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xc9f0): undefined reference to `Json::Value::asString[abi:cxx11]() const' cmGlobalNinjaGenerator.cxx:(.text+0xca0c): undefined reference to `Json::Value::asString[abi:cxx11]() const' libCMakeLib.a(cmGlobalNinjaGenerator.cxx.o):cmGlobalNinjaGenerator.cxx:(.text+0xcab0): more undefined references to `Json::Value::asString[abi:cxx11]() const' follow libCMakeLib.a(cmGlobalNinjaGenerator.cxx.o): In function `cmcmd_cmake_ninja_dyndep(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >)': cmGlobalNinjaGenerator.cxx:(.text+0xcc48): undefined reference to `Json::Reader::getFormattedErrorMessages[abi:cxx11]() const' libCMakeLib.a(cmGlobalGenerator.cxx.o): In function `cmGlobalGenerator::WriteSummary(cmGeneratorTarget*)': cmGlobalGenerator.cxx:(.text+0x114bc): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmGlobalGenerator.cxx:(.text+0x11624): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmGlobalGenerator.cxx:(.text+0x11770): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmGlobalGenerator.cxx:(.text+0x117e8): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' cmGlobalGenerator.cxx:(.text+0x11944): undefined reference to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' libCMakeLib.a(cmGlobalGenerator.cxx.o):cmGlobalGenerator.cxx:(.text+0x11a88): more undefined references to `Json::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' follow
Maintainer informed via mail
devel/jsoncpp is a dependency of CMake. CMake uses compiler:c++11-lang -- which isn't relevant on Tier-1 architectures, but is on Tier-2 which don't have a base compiler that is C++11 compatible. Now it looks like that causes a cascade of sorts -- devel/jsoncpp is presumably compiled with base system's C++ compiler, and the C++11 compiler / linker doesn't like that.
(In reply to Adriaan de Groot from comment #2) Your assessment is correct, and that's the case for quite a few ports that have some dependencies building with base g++ and others building with c++11 (ports) g++.
Created attachment 189629 [details] devel/jsoncpp Makefile patch to use c++11 (In reply to Justin Hibbits from comment #0) Good catch! I patched my devel/jsoncpp/Makefile to use c++11, (re)built jsoncpp, and was able to successfully build devel/cmake 3.10.1 as a result. Thanks!
Anyone? Presumably if this is only visible on tier2 ports, the patch shouldn't affect tier1 ports. Does it need an exprun?
Added yuri@, maintainer, and tcberner@, mentor.
I didn't get the e-mail from "Maintainer informed via mail".
A commit references this bug: Author: yuri Date: Mon Feb 19 22:25:14 UTC 2018 New revision: 462353 URL: https://svnweb.freebsd.org/changeset/ports/462353 Log: devel/jsoncpp: USES=compiler:c++11-lang (for cmake-3.10.1, etc) Additional port changes: * Bumped PORTREVISION (binaries changed) * Updated MAINTAINER PR: 224720 Submitted by: jhibbits Approved by: tcberner (mentor, implicit) Changes: head/devel/jsoncpp/Makefile
Committed, thanks!
*** Bug 226123 has been marked as a duplicate of this bug. ***