Skip to content

fix installation on windows without an rtools tbb#257

Merged
kevinushey merged 1 commit into
masterfrom
bugfix/windows-no-tbb
Jul 23, 2026
Merged

fix installation on windows without an rtools tbb#257
kevinushey merged 1 commit into
masterfrom
bugfix/windows-no-tbb

Conversation

@kevinushey

Copy link
Copy Markdown
Contributor

On Windows systems whose Rtools does not provide TBB (R < 4.2.0, per 6.0.0's NEWS), two code paths broke installation from source:

  1. configure required cmake whenever TBB_LIB was empty -- but the bundled TBB is never built on Windows (the dispatch prints "building RcppParallel without tbb backend" instead), so the requirement is spurious there. Configure would die with "cmake was not found" on machines without cmake.
  2. The tbb stub library was built unconditionally on Windows -- but tbb-compat.cpp references tbb::detail::r1::observe, and with TBB disabled PKG_LIBS is just -lssp, so the stub DLL link failed and stop() killed the install. The stub is also useless in that configuration: RcppParallel.dll exports no TBB symbols, so pre-built TBB-using binaries could not run against it regardless of load resolution.

Skip the cmake requirement on Windows, and gate the stub build on TBB_ENABLED (available from tbb-autodetected.R, already sourced at the install-libs phase).

Relevant given DESCRIPTION declares Depends: R (>= 3.6.0). Logic-only change; not exercised on CRAN's builders (which all have TBB-providing Rtools).

On Windows systems whose Rtools does not provide TBB (R < 4.2.0), two
code paths broke the install:

- configure required cmake whenever TBB_LIB was empty, but the bundled
  TBB is never built on Windows; skip the cmake requirement there

- the tbb stub library was built unconditionally on Windows, but
  tbb-compat.cpp references tbb::detail::r1::observe, which nothing
  provides when TBB is disabled, so the link (and thus the install)
  failed; the stub is also useless in that configuration, as
  RcppParallel.dll exports no TBB symbols for old binaries to bind
@kevinushey
kevinushey merged commit 83dede3 into master Jul 23, 2026
5 checks passed
@kevinushey
kevinushey deleted the bugfix/windows-no-tbb branch July 23, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant