stan-dev / stan-dev/rstan

stanheaders seems to rely on outdated tbb header file task_scheduler_init.h

Open
#1,101 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

Summary:

This report is about stanheaders. Actually the issue occures on the Debian packaged source that is available at CRAN. It is using a header file that was available in the Debian packaged TBB library of version 2020.3 but droped in 2021.4.0 (together with the rename to onetbb which has broken the old tbb interface).

My attempt to build rstanarm ended up in

/usr/lib/R/site-library/StanHeaders/include/stan/math/prim/core/init_threadpool_tbb.hpp:12:10: fatal error: tbb/task_scheduler_init.h: No such file or directory
  12 | #include <tbb/task_scheduler_init.h>
     |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 compilation terminated.

since the header file task_scheduler_init.h does not exist any more in onetbb since 2021.

Description:

The issue becomes visible in different ways when StanHeaders is used. There is a complete build log when trying to build rstanarm (which reproduces the code cited above). You can also have a look at the complete build log od rstan in the CI of the rstan Debian package.

The following bug reports in Debian seems to be closely related to the outdated tbb interface:

Reproducible Steps:

You should be able to reproduce the issue when creating a Debian unstable (== sid) container / chroot and build the packages r-cran-rstan or r-cran-rstanarm.

RStan Version:
  • StanHeaders: Version: 2.26.28
  • rstanarm: 2.21.4 (This has built before for whatever reason. For the moment I can't build it due to the requirement of higher version of rstan which does not build)
  • rstan: 2.32.3
R Version:

Debian package of version 4.3.1

Operating System:

Debian unstable

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with stan/math/prim/core/init_threadpool_tbb.hpp and inspect how StanHeaders includes the TBB interface. Reproduce the failure in a Debian unstable container by building r-cran-rstan or r-cran-rstanarm, then verify the package builds without the missing tbb/task_scheduler_init.h error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, r
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.