Bug 2178210

Summary: boost: multiple definitions of boost::phoenix::placeholders::uargX
Product: [Fedora] Fedora Reporter: Kaleb KEITHLEY <kkeithle>
Component: boostAssignee: Jonathan Wakely <jwakely>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: denis.arnaud_fedora, jwakely, laurent.rineau__fedora, mcermak, trodgers
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: boost-1.81.0-1.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-16 16:10:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2158241    
Attachments:
Description Flags
build.log with linker error none

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