fix lookup path for tbb stub library on windows#250
Merged
Conversation
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.
This was referenced Jul 23, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #249: the stub loader resolved
tbb.dllviatbbRoot(), which prefersTBB_LIBwhen set. On Windows, configure always setsTBB_LIBto 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 notbbentry.Resolve against the package's own
lib/x64directory instead, which is whereinstall.libs.Rplaces the stub.