subobject-linkage error with GCC
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、示されている sleep_for コルーチンと最新の stdexec を使って、../include/sdbusplus/async/timer.hpp:109 における GCC の -Werror=subobject-linkage エラーを再現します。co_await sleep_sender(ctx, time) と co_await execution::schedule(get_scheduler(ctx)) の診断を比較します。両方の await が subobject-linkage エラーなしでコンパイルできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C++
- スター
- 2.4k
- フォーク
- 274
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 39
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/stdexec のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
NVIDIA/stdexec#1751 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Sequence operation states that don't retain sender-owned data: `write_env` over a sequence (#2294) and `exec::iterate`対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
NVIDIA/stdexec#2305 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
メンテナーはふだん 1 日以内に返信
-
continues_on: hop opstate not connected with secondary environment対応中かも @ericniebler が 17 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NVIDIA/stdexec#2268 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
NVIDIA/stdexec#2240 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug iOS 🍎 ui/ux
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MerginMaps/mobile#4744 ·
メンテナーはふだん 1 日以内に返信
-
Component: Ruby Type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
kokkos/kokkos-kernels#3328 ·
メンテナーはふだん 1 日以内に返信
-
bug needs triage tcp
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
project-chip/connectedhomeip#74644 ·
メンテナーはふだん 1 日以内に返信