Mailing List Archive

cmake-3.18.5 build fails
64-bit Gentoo on a new 12-core machine. The build fails in the
compile phase. Switching makeopts from -j4 to -j1 didn't help. Build
log is attached.

--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
Re: cmake-3.18.5 build fails [ In reply to ]
On 2021.02.12 14:49, Walter Dnes wrote:
> 64-bit Gentoo on a new 12-core machine. The build fails in the
> compile phase. Switching makeopts from -j4 to -j1 didn't help.
> Build log is attached.
The error seems to be at linking:

/usr/lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/lib64/libjsoncpp.so: undefined reference to
`std::__cxx11::basic_ostringstream<char, std::char_traits<char>,
std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'

/usr/lib64/libjsoncpp.so belongs to dev-libs/jsoncpp. cmake depends
on >=dev-libs/jsoncpp-1.9.2-r2:0=

I have 1.9.4 installed. (1.9.3 is the only other one I see in
Portage.) Is it possible you have an older version, and the dep needs
to be updated?

Also, might it be related to gcc version? I'm currently using
10.2.0-r5 ~amd64.

Jack
Re: cmake-3.18.5 build fails [ In reply to ]
Hello,

On Fri, 12 Feb 2021, Jack wrote:
>On 2021.02.12 14:49, Walter Dnes wrote:
>> 64-bit Gentoo on a new 12-core machine. The build fails in the compile
>> phase. Switching makeopts from -j4 to -j1 didn't help. Build log is
>> attached.
>The error seems to be at linking:
>
>/usr/lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>/usr/lib64/libjsoncpp.so: undefined reference to
>`std::__cxx11::basic_ostringstream<char, std::char_traits<char>,
>std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'
>
>/usr/lib64/libjsoncpp.so belongs to dev-libs/jsoncpp. cmake depends on
>>=dev-libs/jsoncpp-1.9.2-r2:0=
>
>I have 1.9.4 installed. (1.9.3 is the only other one I see in Portage.) Is
>it possible you have an older version, and the dep needs to be updated?

I needs just to be recompiled, I think. With '-std=c++11' or later.
Search for
'undefined reference to std::__cxx11::basic_'
(no quotes) on your least untrusted search engine, or better, if your
search-engine supports the 'site:' parameter, for
'undefined reference to std::__cxx11::basic_ site:gentoo.org'

AFAIR, there were both at least one news item and tons of
mails/forum-posts about this issue with 'std::__cxx11::basic.*string'
stuff. It's that C++ ABI change for all that string related stuff. It
all basically boils down to just recompile all your C++ libs using
some form of (basic_)string (and all stuff depending on those) using
the new cxx11 ABI. ISTR that was rather well communicated in the news
items and on this ML. And there's stuff on the wiki, e.g.:
https://wiki.gentoo.org/wiki/Upgrading_GCC

ISTR there's more specific stuff, but that's the gist of it. Rebuild
what depends on libstdc++. IIRC:

$ revdep-rebuild -v -p --library /usr/lib/libstdc++.so.5

(change /usr/lib/ to whatever matches your platform and don't forget
/usr/lib32 if you do multilib ;)

>Also, might it be related to gcc version? I'm currently using 10.2.0-r5
>~amd64.

Nah. It's libstdc++ ;)

HTH,
-dnh

--
The only languages that can comfortably be written with the repertoire of
US-ASCII happen to be Latin, Swahili, Hawaiian and American English without
most typographic frills. It is rumoured that there are more languages in the
world. -- Roman Czyborra