Skip to content

fix lookup path for tbb stub library on windows#250

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

fix lookup path for tbb stub library on windows#250
kevinushey merged 1 commit into
masterfrom
bugfix/windows-tbb-stub-path

Conversation

@kevinushey

Copy link
Copy Markdown
Contributor

Follow-up to #249: the stub loader resolved tbb.dll via tbbRoot(), which prefers TBB_LIB when set. On Windows, configure always sets TBB_LIB to the Rtools library directory (the source of the static TBB link), which contains no DLLs -- so the lookup silently failed and the stub was never loaded. Confirmed on a real Windows machine: after loading a patched RcppParallel, getLoadedDLLs() showed no tbb entry.

Resolve against the package's own lib/x64 directory instead, which is where install.libs.R places the stub.

The stub loader added in #249 resolved tbb.dll via tbbRoot(), which
prefers TBB_LIB when set -- and on Windows, configure always sets
TBB_LIB to the Rtools library directory, which contains only static
TBB libraries. As a result, the lookup silently failed and the stub
was never loaded.

Resolve against the package's own lib directory instead, which is
where install.libs.R places the stub.
@kevinushey
kevinushey merged commit d65bcd4 into master Jul 23, 2026
5 checks passed
@kevinushey
kevinushey deleted the bugfix/windows-tbb-stub-path branch July 23, 2026 22:31
kevinushey added a commit that referenced this pull request Jul 23, 2026
Stale or unexpected TBB libraries swept into the installed package have
been a subtle source of downstream load failures, and were invisible in
installation logs. Report which headers and libraries are installed and
from where, and note when the tbb stub build is skipped because a
tbb.dll is already present.

Additionally, when the VERBOSE environment variable is set (as already
used by the bundled TBB build), report how TBB libraries are resolved
and loaded at package load time; this would have surfaced the lookup
bug fixed in #250 immediately.
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