Skip to content

Commit 781819c

Browse files
committed
Check if libtbb.so exists if not found on Linux
This fixes the suffix issue with newer versions of TBB.
1 parent 3a5a292 commit 781819c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

R/build.R

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,15 @@ tbbLibPath <- function(suffix = "") {
9393
libDir <- "lib/"
9494
if (sysname == "Windows")
9595
libDir <- paste(libDir, .Platform$r_arch, "/", sep="")
96-
system.file(paste(libDir, tbbSupported[[sysname]], sep = ""),
97-
package = "RcppParallel")
96+
97+
tbb_path <- system.file(paste(libDir, tbbSupported[[sysname]], sep = ""),
98+
package = "RcppParallel")
99+
if (sysname == "Linux" && !file.exists(tbb_path)) {
100+
system.file(paste(libDir, "libtbb", suffix, ".so", sep =""),
101+
package = "RcppParallel")
102+
} else {
103+
tbb_path
104+
}
98105
} else {
99106
NULL
100107
}

0 commit comments

Comments
 (0)