Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 594844 - dev-ros/topic_tools-1.12.4: /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../lib64/librosconsole.so: undefined reference to `boost::re_detail_106100::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
Summary: dev-ros/topic_tools-1.12.4: /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Robot Operating System team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-22 23:39 UTC by Peter Levine
Modified: 2019-09-14 18:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,72.33 KB, text/x-log)
2016-09-22 23:41 UTC, Peter Levine
Details
emerge --info (emerge-info.txt,21.47 KB, text/plain)
2016-09-22 23:43 UTC, Peter Levine
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Levine 2016-09-22 23:39:41 UTC
If dev-ros/rosconsole-1.12.4 is built with gcc-5.4.0, regardless of whether '-std=c++14' was in CXXFLAGS or not, and gcc-6.2.0 is used to build dev-ros/topic_tools-1.12.4, if fails with:

> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../lib64/librosconsole.so: undefined reference to `boost::re_detail_106100::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../lib64/librosconsole.so: undefined reference to `boost::re_detail_106100::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
> collect2: error: ld returned 1 exit status

Reproducible: Always
Comment 1 Peter Levine 2016-09-22 23:41:46 UTC
Created attachment 447466 [details]
build.log
Comment 2 Peter Levine 2016-09-22 23:43:19 UTC
Created attachment 447468 [details]
emerge --info
Comment 3 eroen 2016-10-04 23:21:52 UTC
I saw the same error in grive until I rebuilt boost. Perhaps you could check if that solves it for you too?
Comment 4 Peter Levine 2016-10-05 02:46:38 UTC
(In reply to eroen from comment #3)
> I saw the same error in grive until I rebuilt boost. Perhaps you could check
> if that solves it for you too?

I built dev-libs/boost-1.62.0.


If boost-1.62.0 and rosconsole-1.12.4 are built with dissimilar gcc versions (i.e., one with gcc-5* and one with gcc-6*), then building dev-ros/topic_tools-1.12.4 with version fails either with:

/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../lib64/librosconsole.so: undefined reference to `boost::re_detail_106200::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const

or with:

/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/librosconsole.so: undefined reference to `boost::re_detail_106200::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const

depending on the differing compiler versions used to build boost and rosconsole.  



There was a change from 'boost::re_detail_106100' to 'boost::re_detail_106200' reflecting the change from boost-1.61.0 to boost-1.62.0.

Not a C++11 ABI incompatibility issue because the c++ dialect seems to make no difference, and the fact that the path of librosconsole.so is shown relative to the path of a version specific gcc library directory is a little telling.
Comment 5 Peter Levine 2016-10-05 02:50:41 UTC
(In reply to Peter Levine from comment #4)
> then building dev-ros/topic_tools-1.12.4 with version fails either with:

Meant to say:

...then building dev-ros/topic_tools-1.12.4 with either version fails with:
Comment 6 David Seifert gentoo-dev 2016-10-05 15:13:28 UTC
(In reply to Peter Levine from comment #5)
> (In reply to Peter Levine from comment #4)
> > then building dev-ros/topic_tools-1.12.4 with version fails either with:
> 
> Meant to say:
> 
> ...then building dev-ros/topic_tools-1.12.4 with either version fails with:

Peter, have you tried rebuilding topic_tools with C++14? This problem is similar to the source-highlight thing, and I recall it being caused by the missing C++11 support.
Comment 7 Peter Levine 2016-10-05 18:52:07 UTC
(In reply to David Seifert from comment #6)
> (In reply to Peter Levine from comment #5)
> > (In reply to Peter Levine from comment #4)
> > > then building dev-ros/topic_tools-1.12.4 with version fails either with:
> > 
> > Meant to say:
> > 
> > ...then building dev-ros/topic_tools-1.12.4 with either version fails with:
> 
> Peter, have you tried rebuilding topic_tools with C++14? This problem is
> similar to the source-highlight thing, and I recall it being caused by the
> missing C++11 support.

Yes.  I've tried forcing -std=c++14 and -std=c++98 and the dialect is not the problem. It might be some kind of compiler dependent rpath issue but the problem only shows up with different compilers building boost and rosconsole.
Comment 8 David Seifert gentoo-dev 2016-10-05 22:08:06 UTC
(In reply to Peter Levine from comment #7)
> (In reply to David Seifert from comment #6)
> > (In reply to Peter Levine from comment #5)
> > > (In reply to Peter Levine from comment #4)
> > > > then building dev-ros/topic_tools-1.12.4 with version fails either with:
> > > 
> > > Meant to say:
> > > 
> > > ...then building dev-ros/topic_tools-1.12.4 with either version fails with:
> > 
> > Peter, have you tried rebuilding topic_tools with C++14? This problem is
> > similar to the source-highlight thing, and I recall it being caused by the
> > missing C++11 support.
> 
> Yes.  I've tried forcing -std=c++14 and -std=c++98 and the dialect is not
> the problem. It might be some kind of compiler dependent rpath issue but the
> problem only shows up with different compilers building boost and rosconsole.

So you use different versions of GCC to build two different packages? This is generally only really a supported configuration for C and not for C++, due to the ABI issues involved. If you build both with GCC 5 or GCC 6, does it work then?
Comment 9 Peter Levine 2016-10-05 23:59:16 UTC
(In reply to David Seifert from comment #8)
> So you use different versions of GCC to build two different packages? This
> is generally only really a supported configuration for C and not for C++,
> due to the ABI issues involved. If you build both with GCC 5 or GCC 6, does
> it work then?

Yes, topic_tools builds fine as long as boost and rosconsole are built with the same compiler, regardless of which.  I'm not sure how or if this corner case can or should be handled.  EWARN maybe? If I get some free time I'll try taking a look at the source and see if there's an upstream solution.
Comment 10 Ladislav Zitka 2017-06-04 19:28:12 UTC
I confirm very similar situation just with different package: agregator

Resoved by recompiling dependencies with same versions.

Other problem is on my Skylake CPU system:
While tried to compile whole ros-meta/desktop which pull all required packages on GCC, some of the packages are autodetecting CPU architecture and were failing saying "Skylake arch not supported/unknown by GCC". In my make.conf I have broadwell arch, but some packages overrides this configuration.
Comment 11 Larry the Git Cow gentoo-dev 2019-09-14 18:30:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0deae762d9373aa9362c2867e9e1fccdc140f71a

commit 0deae762d9373aa9362c2867e9e1fccdc140f71a
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2019-09-14 18:29:44 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2019-09-14 18:29:44 +0000

    dev-libs/boost: Version bump to 1.71.0
    
    * Added a message in `pkg_postinst` to remind users to rebuild boost
      and revdeps when upgrading the C++ toolchain.
    
    Closes: https://bugs.gentoo.org/594844
    Closes: https://bugs.gentoo.org/627302
    Closes: https://bugs.gentoo.org/629976
    Closes: https://bugs.gentoo.org/641738
    Package-Manager: Portage-2.3.76, Repoman-2.3.17
    Signed-off-by: David Seifert <soap@gentoo.org>

 dev-libs/boost/Manifest            |   1 +
 dev-libs/boost/boost-1.71.0.ebuild | 340 +++++++++++++++++++++++++++++++++++++
 2 files changed, 341 insertions(+)