missing inline in experimental/task_region.hpp
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
experimental/task_region.hpp から始めて、handle_task_region_exceptions を調べます。extra.cpp を examples ディレクトリに追加して Jamfile に含め、その後 bjam fib_task_region を実行して問題を再現します。ヘッダーが複数の翻訳単位からインクルードされた場合でも、報告されている multiple-definition エラーなしに例が正常にリンクされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The function handle_task_region_exceptions in experimental/task_region.hpp is missing an inline modifier, so it will cause a "multiple definition" error if the file is included in more than one source file.
To reproduce, add a second translation unit extra.cpp to the examples directory with the single line:
#include <boost/thread/experimental/task_region.hpp>
and include it in the Jamfile:
exe fib_task_region : fib_task_region.cpp extra.cpp ;
This generates the following error on a Linux system with gcc 10:
> bjam fib_task_region
warning: No toolsets are configured.
warning: Configuring default toolset "gcc".
warning: If the default is wrong, your build may not work correctly.
warning: Use the "toolset=xxxxx" option to override our guess.
warning: For more configuration options, please consult
warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html
Performing configuration checks
- default address-model : 64-bit (cached)
- default architecture : x86 (cached)
- symlinks supported : yes (cached)
- lockfree boost::atomic_flag : yes (cached)
...patience...
...patience...
...found 3484 targets...
...updating 2 targets...
gcc.compile.c++ ../../../bin.v2/libs/thread/example/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden/extra.o
gcc.link ../../../bin.v2/libs/thread/example/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden/fib_task_region
/usr/bin/ld: ../../../bin.v2/libs/thread/example/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden/extra.o: in function `std::less<boost::system::error_category const*>::operator()(boost::system::error_category const*, boost::system::error_category const*) const':
/home/mbetter/src/boost/libs/thread/example/../../../boost/exception/detail/exception_ptr.hpp:335: multiple definition of `boost::experimental::parallel::v2::detail::handle_task_region_exceptions(boost::experimental::parallel::v1::exception_list&)'; ../../../bin.v2/libs/thread/example/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden/fib_task_region.o:/home/mbetter/src/boost/libs/thread/example/../../../boost/thread/experimental/parallel/v2/task_region.hpp:55: first defined here
collect2: error: ld returned 1 exit status
"g++" -Wl,-rpath -Wl,"/home/mbetter/src/boost/bin.v2/libs/chrono/build/gcc-10/debug/threading-multi/visibility-hidden" -Wl,-rpath -Wl,"/home/mbetter/src/boost/bin.v2/libs/thread/build/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden" -Wl,-rpath-link -Wl,"/home/mbetter/src/boost/bin.v2/libs/chrono/build/gcc-10/debug/threading-multi/visibility-hidden" -Wl,-rpath-link -Wl,"/home/mbetter/src/boost/bin.v2/libs/thread/build/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden" -o "../../../bin.v2/libs/thread/example/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden/fib_task_region" -Wl,--start-group "../../../bin.v2/libs/thread/example/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden/fib_task_region.o" "../../../bin.v2/libs/thread/example/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden/extra.o" "../../../bin.v2/libs/thread/build/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden/libboost_thread.so.1.75.0" "../../../bin.v2/libs/chrono/build/gcc-10/debug/threading-multi/visibility-hidden/libboost_chrono.so.1.75.0" -Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl,--end-group -fPIC -m64 -pthread -g -fvisibility=hidden -fvisibility-inlines-hidden
...failed gcc.link ../../../bin.v2/libs/thread/example/gcc-10/debug/threadapi-pthread/threading-multi/visibility-hidden/fib_task_region...
...failed updating 1 target...
...updated 1 target...
- 主要言語
- C++
- スター
- 213
- フォーク
- 171
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
boostorg/thread のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
boostorg/thread の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
AXERA-TECH/ax-llm#77 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
games-on-whales/wolf#509 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
bug-unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NVIDIA/cuda-samples#453 ·