Bug 224720 - devel/jsoncpp now needs c++11
Summary: devel/jsoncpp now needs c++11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
: 226123 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-30 04:24 UTC by Justin Hibbits
Modified: 2018-02-23 19:16 UTC (History)
6 users (show)

See Also:


Attachments
devel/jsoncpp Makefile patch to use c++11 (338 bytes, patch)
2018-01-11 19:25 UTC, Chip Cuccio
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Hibbits freebsd_committer 2017-12-30 04:24:41 UTC
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
Comment 1 Bugzilla Automation freebsd_committer 2017-12-30 04:24:41 UTC
Maintainer informed via mail
Comment 2 Adriaan de Groot freebsd_committer 2018-01-01 01:50:10 UTC
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.
Comment 3 Justin Hibbits freebsd_committer 2018-01-01 05:18:48 UTC
(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++.
Comment 4 Chip Cuccio 2018-01-11 19:25:43 UTC
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!
Comment 5 Justin Hibbits freebsd_committer 2018-02-19 17:12:10 UTC
Anyone?  Presumably if this is only visible on tier2 ports, the patch shouldn't affect tier1 ports.  Does it need an exprun?
Comment 6 Adriaan de Groot freebsd_committer 2018-02-19 21:23:49 UTC
Added yuri@, maintainer, and tcberner@, mentor.
Comment 7 Yuri Victorovich freebsd_committer 2018-02-19 22:10:11 UTC
I didn't get the e-mail from "Maintainer informed via mail".
Comment 8 commit-hook freebsd_committer 2018-02-19 22:25:19 UTC
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
Comment 9 Yuri Victorovich freebsd_committer 2018-02-19 22:25:23 UTC
Committed, thanks!
Comment 10 Teemu Toivola 2018-02-23 19:16:32 UTC
*** Bug 226123 has been marked as a duplicate of this bug. ***