Please remove LDLIBS_TB from stan/lib/stan_math/make/compiler_flags

オープン
#1,329 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
cpp
領域
build-system

調査の方向性

stan/lib/stan_math/make/compiler_flags を開き、-ltbb を追加している 2 つの LDLIBS_TBB 行を調べます。CentOS 7 で bernoulli 例をビルドして問題を再現します。これらの行を削除すると、表示されている TBB undefined-reference エラーなしでモデルをリンクできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

Describe the bug
The two lines:

LDLIBS_TBB ?= -ltbb

in:

stan/lib/stan_math/make/compiler_flags

add:

-ltbb

in the Linking model command before:

stan/lib/stan_math/lib/tbb/libtbb.so.2

thus always selecting the system tbb and producing the error:

/u/local/compilers/gcc/10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/cmdstan/main.o: in function `cmdstan::command(int, char const**)': main.cpp:(.text+0x28d3f): undefined reference to `tbb::interface7::internal::task_arena_base::internal_initialize()' /u/local/compilers/gcc/10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: main.cpp:(.text+0x2a77e): undefined reference to `tbb::interface9::global_control::internal_create()' /u/local/compilers/gcc/10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/cmdstan/main.o: in function `tbb::interface7::task_arena::~task_arena()': main.cpp:(.text._ZN3tbb10interface710task_arenaD2Ev[_ZN3tbb10interface710task_arenaD5Ev]+0x15): undefined reference to `tbb::interface7::internal::task_arena_base::internal_terminate()' /u/local/compilers/gcc/10.2.0/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/cmdstan/main.o: in function `tbb::interface9::global_control::~global_control()': main.cpp:(.text._ZN3tbb10interface914global_controlD2Ev[_ZN3tbb10interface914global_controlD5Ev]+0x5): undefined reference to `tbb::interface9::global_control::internal_destroy()' collect2: error: ld returned 1 exit status make: *** [examples/bernoulli/bernoulli] Error 1

To Reproduce

Try building the bernoulli example (on a CentOS 7 system)

Expected behavior
A description of what you expected to happen.

After removing the offending lines I can proceed to linking the model correctly.

Operating system
Your operating system (e.g. mac os x 10.15, windows 10, etc.)

CentOS 7.9

CmdStanR version number
Your CmdStanR version number (e.g. from packageVersion("cmdstanr")).

2.36.0

Additional context
Add any other context about the problem here.

主要言語
C++
スター
240
フォーク
105
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stan-dev/cmdstan のほかの issue

stan-dev/cmdstan の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。