Skip to content

Commit 5363457

Browse files
committed
prepare for the 6.2.0 release
Consolidate the NEWS entries for this cycle: three of them described intermediate states that later commits superseded, and contradicted the entries above them -- configure no longer probes for an Rtools TBB, and the tbb.dll stub is gone. Also correct the flags documentation, which claimed LdFlags() emits nothing on macOS; that stopped being true in 5.1.8, and this release adds an -rpath there. Drop patches/windows_arm64.diff, which patches files removed with the make-based TBB in 6.0.0 and whose one remaining hunk is now upstream. Exclude .worktrees from the build: R CMD build was sweeping local worktrees into the tarball, 1741 of its 2193 files.
1 parent d7b2c59 commit 5363457

9 files changed

Lines changed: 83 additions & 96 deletions

File tree

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
^tools/tbb$
2020
^\.github$
2121
^\.claude$
22+
^\.worktrees$
2223
^cran-comments\.md$
2324
^patches
2425
^CRAN-SUBMISSION$

.github/workflows/R-CMD-check.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
- {os: ubuntu-24.04-arm, r: 'release'}
2424
- {os: windows-latest, r: 'release'}
2525
- {os: windows-11-arm, r: 'release'}
26-
# Rtools42 provides only a pre-oneTBB copy of TBB, so this is the
27-
# one configuration that builds the bundled oneTBB on Windows
26+
# the oldest Rtools we build the bundled oneTBB with (gcc 10, and
27+
# the cmake shipped in Rtools42); the newest is covered above
2828
- {os: windows-latest, r: '4.2'}
2929

3030
env:
@@ -58,7 +58,8 @@ jobs:
5858
fail-fast: false
5959
matrix:
6060
config:
61-
# Rtools42 has no oneTBB, so this one builds the bundled copy
61+
# the oldest supported Rtools, and the one rstan could not build
62+
# against while RcppParallel used the TBB it provides
6263
- {os: windows-latest, r: '4.2'}
6364
- {os: windows-latest, r: 'release'}
6465
# RcppParallelLibs() changed for every Windows platform, and arm64

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: RcppParallel
22
Type: Package
33
Title: Parallel Programming Tools for 'Rcpp'
4-
Version: 6.1.1.9000
4+
Version: 6.2.0
55
Authors@R: c(
66
person("Kevin", "Ushey", role = c("aut", "cre"), email = "kevin@rstudio.com",
77
comment = c(ORCID = "0000-0003-2880-7407")),

NEWS.md

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
# RcppParallel (development version)
2-
3-
* On macOS, `RcppParallel::LdFlags()` now also emits an `-rpath` entry for the
4-
directory containing the TBB libraries. The libraries record an
5-
`@rpath`-relative install name, so packages linking against them previously
6-
produced binaries with no runtime search path for TBB; those binaries could
7-
only be loaded when RcppParallel (and hence TBB) already happened to be
8-
loaded into the process, and failed with "Library not loaded:
9-
@rpath/libtbb.dylib" otherwise. (#209)
1+
# RcppParallel 6.2.0
102

113
* On Windows, RcppParallel now builds the bundled oneTBB as a shared library
124
and links against it, shipping `tbb.dll` and `tbbmalloc.dll` alongside the
135
package -- the same arrangement already used on every other platform.
146
Previously it linked the static TBB provided by Rtools directly into
157
`RcppParallel.dll`, which meant the TBB version (and ABI) depended on the
168
user's toolchain, and left downstream packages with no TBB library to link
17-
against. Building it ourselves gives every platform the same oneTBB and makes
18-
the ABI a property of RcppParallel. `TBB_LIB` / `TBB_INC` are still honoured
19-
for anyone supplying their own build.
9+
against. Rtools42 in particular provides Intel TBB 2017, whose headers
10+
downstream packages cannot build against: StanHeaders uses
11+
`tbb::this_task_arena::isolate`, which that release still gates behind
12+
`TBB_PREVIEW_TASK_ISOLATION` and does not export from its library, so rstan
13+
could no longer be built on R 4.2 for Windows. Building TBB ourselves gives
14+
every platform the same oneTBB and makes the ABI a property of RcppParallel
15+
rather than of the toolchain. `TBB_LIB` / `TBB_INC` are still honoured for
16+
anyone supplying their own build. (#269, #274)
2017

2118
* Building RcppParallel now requires cmake (>= 3.5) on all platforms, as
2219
`SystemRequirements` has always declared. Previously a missing or unusable
@@ -26,6 +23,7 @@
2623
shipped cmake since Rtools42, so this should not affect Windows users in
2724
practice. Note that the tinythread backend remains selectable at runtime via
2825
`RCPP_PARALLEL_BACKEND=tinythread`; it is only no longer a build outcome.
26+
(#275)
2927

3028
* As a consequence, `RcppParallel::RcppParallelLibs()` now emits `-ltbb` and
3129
`-ltbbmalloc` on Windows, in addition to `-lRcppParallel` (which remains
@@ -42,43 +40,30 @@
4240
already was by the shared libraries on other platforms, so binaries built
4341
against RcppParallel 5.1.11 and earlier continue to resolve it.
4442

43+
* On macOS, `RcppParallel::LdFlags()` now also emits an `-rpath` entry for the
44+
directory containing the TBB libraries. The libraries record an
45+
`@rpath`-relative install name, so packages linking against them previously
46+
produced binaries with no runtime search path for TBB; those binaries could
47+
only be loaded when RcppParallel (and hence TBB) already happened to be
48+
loaded into the process, and failed with "Library not loaded:
49+
@rpath/libtbb.dylib" otherwise. (#209, #271)
50+
4551
* Fixed `RcppParallel::tbbLibraryPath()` returning `NULL` on Windows, and
4652
`tbbRoot()` reporting a directory that need not exist on the machine running
4753
the package -- for a pre-built binary, the Rtools tree of the machine that
48-
built it. Both now describe the installation actually in use. (#270)
54+
built it. Both now describe the installation actually in use. (#270, #273)
4955

5056
* Fixed an issue where compiling code including `tbb/parallel_for_each.h`
5157
could fail with toolchains that accept `-std=c++20` but provide a
5258
pre-C++20 standard library, with errors of the form "no member named
5359
'random_access_iterator' in namespace 'std'". This affected CRAN's macOS
54-
x86_64 machines, which pair Apple clang 14 with the macOS 11.3 SDK.
55-
56-
* On Windows, RcppParallel now only uses the copy of TBB provided by Rtools
57-
when that copy is oneTBB; otherwise, the bundled oneTBB is built from
58-
sources, as it already is on other platforms. Rtools42 provides Intel TBB
59-
2017, whose headers downstream packages cannot build against: StanHeaders
60-
uses `tbb::this_task_arena::isolate`, which that release still gates behind
61-
`TBB_PREVIEW_TASK_ISOLATION` and does not export from its library. As a
62-
result, rstan could no longer be built on R 4.2 for Windows. A TBB
63-
configured explicitly via `TBB_LIB` is still used as-is, whatever its
64-
vintage.
65-
66-
* On Windows, `RcppParallel::RcppParallelLibs()` once again offers the TBB
67-
stub library, so that packages taking all of their linker flags from it
68-
(e.g. rstan) can resolve TBB symbols which `RcppParallel.dll` does not
69-
itself re-export.
70-
71-
* Fixed an issue on Windows where a failure to build the TBB stub library
72-
could go unreported, since `R CMD SHLIB` has been seen to exit successfully
73-
even when the link failed. Installation completed, but shipped a package
74-
with no `tbb.dll` -- which packages linking `-ltbb` then discovered only
75-
when they failed to load. Installation now fails instead.
60+
x86_64 machines, which pair Apple clang 14 with the macOS 11.3 SDK. (#268)
7661

7762
* Fixed an issue where building the bundled oneTBB could fail when `CXX`
7863
(or `CC`) was configured with a leading compiler launcher such as `ccache`
7964
(e.g. `CXX = "ccache g++"`). The launcher is now forwarded to cmake via
8065
`CMAKE_<LANG>_COMPILER_LAUNCHER` instead of being mistaken for the compiler
81-
itself.
66+
itself. (#267)
8267

8368

8469
# RcppParallel 6.1.1

R/flags.R

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@
99
#' PKG_LIBS += $(shell "${R_HOME}/bin/Rscript" -e "RcppParallel::LdFlags()")
1010
#' ```
1111
#'
12-
#' On Windows, the flags ensure that the package links with the built-in TBB
13-
#' library. On Linux and macOS, the output is empty, because TBB is loaded
14-
#' dynamically on load by `RcppParallel`.
12+
#' What is emitted depends on how TBB is resolved at runtime on each platform.
13+
#' On Windows, every symbol has to be resolved at link time, so the flags name
14+
#' both the TBB libraries RcppParallel ships and RcppParallel itself. On macOS,
15+
#' they name the TBB libraries along with an `-rpath` entry, so that the
16+
#' resulting binary can find them without relying on `RcppParallel` having been
17+
#' loaded first. On Linux, the output is empty: TBB symbols are left undefined
18+
#' at link time and resolved from the libraries `RcppParallel` loads.
1519
#'
1620
#' \R packages using RcppParallel should also add the following to their
1721
#' `NAMESPACE` file:

R/tbb.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ tbbLdFlags <- function() {
9696
libsPath <- archSystemFile("libs")
9797
ldFlags <- sprintf("-L%s -lRcppParallel", asBuildPath(libsPath))
9898

99-
# only name the TBB libraries when there are TBB libraries to name: a
100-
# build that fell back to tinythread ships none, and asking the linker
101-
# for them would fail the downstream build outright
99+
# only name the TBB libraries when there are TBB libraries to name;
100+
# asking the linker for one that isn't there would fail the downstream
101+
# build outright. configure always enables TBB, so this should not
102+
# happen -- but a wrong answer here is only discovered by whoever is
103+
# compiling against us, so check rather than assume
102104
if (TBB_ENABLED && !is.null(tbbLibraryPath("tbb"))) {
103105
fmt <- "%s -L%s -l%s -l%s"
104106
ldFlags <- sprintf(

cran-comments.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## RcppParallel 6.2.0
2+
3+
This release follows closely on 6.1.1. We apologize for the quick turnaround;
4+
it repairs a regression that leaves Windows users of RcppParallel unable to
5+
build some downstream packages.
6+
7+
Since 6.0.0, RcppParallel has linked the static TBB provided by Rtools on
8+
Windows. That makes the TBB version, and its ABI, a property of the user's
9+
toolchain rather than of RcppParallel: Rtools42 ships Intel TBB 2017, whose
10+
headers downstream packages cannot build against (StanHeaders requires
11+
`tbb::this_task_arena::isolate`, which that release gates behind a preview
12+
macro and does not export), so rstan can no longer be built from source on
13+
R 4.2 for Windows. It also left downstream packages with no TBB library to
14+
link against.
15+
16+
RcppParallel now builds the bundled oneTBB as a shared library on Windows and
17+
ships it with the package, as it already does on every other platform. As a
18+
consequence, `RcppParallel::RcppParallelLibs()` now emits `-ltbb` and
19+
`-ltbbmalloc` there in addition to `-lRcppParallel`. Packages that take their
20+
linker flags from that function require no source changes; packages that
21+
hard-coded `-lRcppParallel` to pick up TBB symbols will need to use it.
22+
23+
Building the bundled oneTBB requires cmake, which is now required on Windows
24+
as well. This matches the `SystemRequirements: CMake (>= 3.5)` that DESCRIPTION
25+
has always declared, and Rtools has shipped cmake since Rtools42, so it should
26+
not affect Windows users in practice.
27+
28+
## R CMD check results
29+
30+
0 errors | 0 warnings | 1 note
31+
32+
The note is the incoming-feasibility check reporting the number of days since
33+
the last update, for the reason described above.
34+
35+
## revdepcheck results
36+
37+
<!-- TODO: fill in from a fresh revdepcheck run against 6.2.0 -->

man/flags.Rd

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patches/windows_arm64.diff

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)