File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,7 +185,18 @@ versionBundledTbbLibraries <- function(tbbDest) {
185185 # 'libtbb.so' -> 'libtbb.so.2', then re-create 'libtbb.so' as a
186186 # relative symlink pointing back at the versioned library
187187 file.rename(lib , versioned )
188- file.symlink(basename(versioned ), lib )
188+ linked <- tryCatch(
189+ file.symlink(basename(versioned ), lib ),
190+ warning = function (w ) FALSE
191+ )
192+
193+ # if the symlink couldn't be created (e.g. a filesystem without symlink
194+ # support), fall back to a plain copy so that 'libtbb.so' still exists --
195+ # RcppParallel's own shared object records a load-time dependency on it
196+ if (! isTRUE(linked )) {
197+ writeLines(" ** could not create symlink; copying instead" )
198+ file.copy(versioned , lib , overwrite = TRUE )
199+ }
189200
190201 }
191202
You can’t perform that action at this time.
0 commit comments