fix installation on windows without an rtools tbb#257
Merged
Conversation
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
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.
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:
TBB_LIBwas 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.tbb-compat.cppreferencestbb::detail::r1::observe, and with TBB disabledPKG_LIBSis just-lssp, so the stub DLL link failed andstop()killed the install. The stub is also useless in that configuration:RcppParallel.dllexports 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 fromtbb-autodetected.R, already sourced at the install-libs phase).Relevant given
DESCRIPTIONdeclaresDepends: R (>= 3.6.0). Logic-only change; not exercised on CRAN's builders (which all have TBB-providing Rtools).