subobject-linkage error with GCC
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the GCC -Werror=subobject-linkage failure at ../include/sdbusplus/async/timer.hpp:109 with the shown sleep_for coroutine and latest stdexec. Compare the diagnostics from co_await sleep_sender(ctx, time) and co_await execution::schedule(get_scheduler(ctx)); done means both awaits compile without the subobject-linkage error.
Written by the indexing model from the issue text.
Description
This could very well be something wrong with my code. Using the latest stdexec, I'm started seeing this subobject-linkage warning in GCC. It isn't obvious which type is even being called out as a problem.
../include/sdbusplus/async/timer.hpp:109:5: error: ‘sdbusplus::async::timer_ns::sleep_sender::sleep_for(sdbusplus::async::context&, sdbusplus::event::event::time_resolution)::_ZN9sdbusplus5async8timer_ns12sleep_sender9sleep_forERNS0_7contextENSt6chrono8durationIlSt5ratioILl1ELl1000000EEEE.Frame’ has a field ‘stdexec::__as_awaitable::__sender_awaitable<stdexec::_Yp<exec::__task::basic_task<void, exec::__task::__default_task_context_impl<exec::__task::__scheduler_affinity::__sticky> >::__promise>, stdexec::__sexpr<stdexec::__detail::{anonymous}::<lambda(_Tag, _Captures&& ...)>::<lambda(_Cvref, _Fun&&)> > >::__t sdbusplus::async::timer_ns::sleep_sender::sleep_for(sdbusplus::async::context&, sdbusplus::event::event::time_resolution)::_ZN9sdbusplus5async8timer_ns12sleep_sender9sleep_forERNS0_7contextENSt6chrono8durationIlSt5ratioILl1ELl1000000EEEE.Frame::Aw1_2_4’ whose type has internal linkage [-Werror=subobject-linkage]
The affected code is a rather simple co-routine using the stdexec task.
static task<> sleep_for(context& ctx, event_t::time_resolution time)
{
// Run the delay sender and then switch back to the worker thread.
// The delay completion happens from the sd-event handler, which is
// ran on the 'caller' thread.
co_await sleep_sender(ctx, time);
co_await execution::schedule(get_scheduler(ctx));
}
Both co_awaits have this subobject-linkage problem, so even if I comment out the first one I still end up with it.
- Dominant language
- C++
- Stars
- 2.4k
- Forks
- 270
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/stdexec
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 66/100
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
mlcommons/mobile_app_open#1182 ·
-
Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/winget-cli#6547 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·