Bug 2178210 - boost: multiple definitions of boost::phoenix::placeholders::uargX
Summary: boost: multiple definitions of boost::phoenix::placeholders::uargX
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Wakely
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2158241
TreeView+ depends on / blocked
 
Reported: 2023-03-14 14:46 UTC by Kaleb KEITHLEY
Modified: 2023-04-03 16:11 UTC (History)
5 users (show)

Fixed In Version: boost-1.81.0-1.fc39
Clone Of:
Environment:
Last Closed: 2023-03-16 16:10:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
build.log with linker error (1.48 MB, text/plain)
2023-03-14 14:46 UTC, Kaleb KEITHLEY
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github boostorg phoenix issues 111 0 None open boost 1.8.1 beta1+gcc-12: multiple definition of `boost::phoenix::placeholders::uarg1' 2023-03-14 16:22:00 UTC

Description Kaleb KEITHLEY 2023-03-14 14:46:00 UTC
Created attachment 1950649 [details]
build.log with linker error

Description of problem:

If two or more compilation units each #include <boost/phoenix.hpp> in a shared lib, there are multiple defintions of boost::phoenix::placeholders::uargX and you get a link error

See https://kojipkgs.fedoraproject.org//work/tasks/6935/98666935/build.log (included as an attachment too.)

gcc, since gcc-11 or so, IIRC, has stopped silently combining 'global' definitions of variables.

Version-Release number of selected component (if applicable):

boost-1.81

How reproducible:

build ceph-18 snapshot

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Kaleb KEITHLEY 2023-03-14 14:56:24 UTC
(In reply to Kaleb KEITHLEY from comment #0)
> ...
> gcc, since gcc-11 or so, IIRC, has stopped silently combining 'global'
> definitions of variables.

My notes say this started with gcc-10 in fedora.

Comment 2 Jonathan Wakely 2023-03-14 15:45:33 UTC
The -fno-common change in gcc-10 only affects C, not C++, so is nothing to do with this.

Comment 3 Jonathan Wakely 2023-03-14 16:22:00 UTC
Certainly seems like a multiple definition bug in boost:

    // Make unpacked argument placeholders
    namespace placeholders {
        #define BOOST_PP_LOCAL_LIMITS (1, BOOST_PHOENIX_ARG_LIMIT)
        #define BOOST_PP_LOCAL_MACRO(N)                                                \
            auto uarg##N =                                                             \
            boost::phoenix::get_<(N)-1>(boost::phoenix::placeholders::arg1);
        #include BOOST_PP_LOCAL_ITERATE()
    }
}} // namespace boost::phoenix


This expands to:

    namespace placeholders {
    
      
      
    
# 1 "/usr/include/boost/preprocessor/iteration/detail/local.hpp" 1 3 4
# 818 "/usr/include/boost/preprocessor/iteration/detail/local.hpp" 3 4
# 1 "/usr/include/boost/preprocessor/iteration/detail/limits/local_256.hpp" 1 3 4
# 16 "/usr/include/boost/preprocessor/iteration/detail/limits/local_256.hpp" 3 4
        auto uarg1 = boost::phoenix::get_<(1)-1>(boost::phoenix::placeholders::arg1);
    
        etc.


That's a new header in boost 1.81.0

Ah this is https://github.com/boostorg/phoenix/issues/111

Comment 4 Jonathan Wakely 2023-03-14 16:23:32 UTC
The new tuple support in phoenix seems totally broken:
https://github.com/boostorg/phoenix/issues/115

Comment 5 Jonathan Wakely 2023-03-15 10:04:28 UTC
Building boost-1.81.0-1.fc39 for rawhide
Created task: 98715627
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=98715627

Comment 6 Kaleb KEITHLEY 2023-03-15 15:33:47 UTC
confirming that ceph-18 snapshot builds (without my hack patches) with 1.81.0-1

Comment 7 Jonathan Wakely 2023-03-16 16:10:35 UTC
The fix in is rawhide now


Note You need to log in before you can comment on or make changes to this bug.