Skip to content

Remove obsolete flag for WINARM64, fix TBB library lookup on Windows#241

Merged
kevinushey merged 2 commits into
RcppCore:masterfrom
andrjohns:remove-winarm64-flags
Oct 7, 2025
Merged

Remove obsolete flag for WINARM64, fix TBB library lookup on Windows#241
kevinushey merged 2 commits into
RcppCore:masterfrom
andrjohns:remove-winarm64-flags

Conversation

@andrjohns

@andrjohns andrjohns commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

Now that RcppParallel is using a newer version of the TBB, the TBB_USE_GCC_BUILTINS flag is irrelevant on Windows arm64

The tbbLibraryPath() function was also looking for .dll files on windows, so wasn't returning the static lib

@andrjohns andrjohns changed the title Remove obsolete flag for WINARM64 Remove obsolete flag for WINARM64, fix TBB library lookup on Windows Oct 7, 2025
@kevinushey

Copy link
Copy Markdown
Contributor

LGTM, thanks!

@kevinushey
kevinushey merged commit e4e33f4 into RcppCore:master Oct 7, 2025
3 checks passed
kevinushey added a commit that referenced this pull request Jul 23, 2026
RcppParallel 6.0.0 (via #241) stopped loading any TBB library in .onLoad
on Windows, on the grounds that TBB is statically linked there. However,
we still ship a stub tbb.dll (see src/install.libs.R) for packages that
link with '-ltbb', e.g. via StanHeaders' LdFlags(). Those packages record
a load-time dependency on 'tbb.dll' in their DLL's import table, and the
Windows loader can only resolve it against an already-loaded module --
RcppParallel's lib/x64 directory is not on the DLL search path.

As a result, with 6.0.0 on Windows, Stan-based packages fail to load with:

  LoadLibrary failure:  The specified module could not be found.

as seen with e.g. WSPsignal on r-universe:
https://github.com/r-universe/cran/actions/runs/30028540221/job/89334243681

Restore the preload, resolving the stub directly (tbbLibraryPath() now
reports static library names on Windows, so it cannot be used here).
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.

2 participants