Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cannot build package skeleton - cannot find ltbb or ltbbmalloc #172

Copy link
Copy link
Closed
@DillonHammill

Description

@DillonHammill
Issue body actions

I am trying to get started with RcppParallel. I have created a RcppParallel skeleton package using RcppParallel::RcppParallel.package.skeleton() (https://github.com/DillonHammill/RcppTemplate) but I cannot seem to build/document it locally on my windows machine. I have the development version of RcppParallel installed (v5.1.4-9000) and Sys.which("make") points to "C:\\rtools40\\usr\\bin\\make.exe".

This is the output of devtools::load_all():

Loading RcppTemplate
Exports from E:/Documents/R Projects/RcppTemplate/src/vector-sum.cpp:
   double parallelVectorSum(NumericVector x)

E:/Documents/R Projects/RcppTemplate/src/RcppExports.cpp updated.
E:/Documents/R Projects/RcppTemplate/R/RcppExports.R updated.
Re-compiling RcppTemplate
-  installing *source* package 'RcppTemplate' ...
   ** using staged installation
   ** libs
   "C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.3/include" -DNDEBUG  -I'C:/Program Files/R/R-4.0.3/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.3/library/RcppParallel/include'     -DRCPP_PARALLEL_USE_TBB=1   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
   "C:/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-40~1.3/include" -DNDEBUG  -I'C:/Program Files/R/R-4.0.3/library/Rcpp/include' -I'C:/Program Files/R/R-4.0.3/library/RcppParallel/include'     -DRCPP_PARALLEL_USE_TBB=1   -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c vector-sum.cpp -o vector-sum.o
   In file included from C:/PROGRA~1/R/R-40~1.3/include/R.h:91
                    from C:/Program Files/R/R-4.0.3/library/Rcpp/include/Rcpp/r/headers.h:70
                    from C:/Program Files/R/R-4.0.3/library/Rcpp/include/RcppCommon.h:30
                    from C:/Program Files/R/R-4.0.3/library/Rcpp/include/Rcpp.h:27
                    from vector-sum.cpp:3
   C:/PROGRA~1/R/R-40~1.3/include/R_ext/RS.h:55:warning: RROR" redefined
    #define ERROR   ),error(R_problem_buf);}
    
   In file included from C:/rtools40/mingw64/x86_64-w64-mingw32/include/windows.h:71
                    from C:/Program Files/R/R-4.0.3/library/RcppParallel/include/tthread/tinythread.h:74
                    from C:/Program Files/R/R-4.0.3/library/RcppParallel/include/RcppParallel/TinyThread.h:9
                    from C:/Program Files/R/R-4.0.3/library/RcppParallel/include/RcppParallel.h:6
                    from vector-sum.cpp:2
   C:/rtools40/mingw64/x86_64-w64-mingw32/include/wingdi.h:75:note: this is the location of the previous definition
    #define ERROR 0
    
   In file included from C:/Program Files/R/R-4.0.3/library/RcppParallel/include/RcppParallel/TinyThread.h:7
                    from C:/Program Files/R/R-4.0.3/library/RcppParallel/include/RcppParallel.h:6
                    from vector-sum.cpp:2
   C:/Program Files/R/R-4.0.3/library/RcppParallel/include/RcppParallel/Common.h: In instantiation of 'int RcppParallel::resolveValue(const char*, T, U) [with T = long long unsigned int; U = int]
   C:/Program Files/R/R-4.0.3/library/RcppParallel/include/RcppParallel.h:57:28: required from 'void RcppParallel::parallelReduce(std::size_t, std::size_t, Reducer&, std::size_t, int) [with Reducer = Sum; std::size_t = long long unsigned int]
   vector-sum.cpp:37:37: required from here
   C:/Program Files/R/R-4.0.3/library/RcppParallel/include/RcppParallel/Common.h:16:23:warning: mparison of integer expressions of different signedness: 'long long unsigned intand 'int-Wsign-compare
       if (requestedValue != defaultValueequestedValue > 0)
           ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   C:/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o RcppTemplate.dll tmp.def RcppExports.o vector-sum.o -LC:PROGRA~1RR-40~1.3libraryRCPPPA~1libx64 -ltbb -ltbbmalloc -LC:/PROGRA~1/R/R-40~1.3/bin/x64 -lR
   C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ltbb
   C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ltbbmalloc
   collect2.exe: error: ld returned 1 exit status
   no DLL was created
   ERROR: compilation failed for package 'RcppTemplate'
-  removing 'C:/Users/Dillon/AppData/Local/Temp/RtmpOkW1Nu/devtools_install_379c5c243643/RcppTemplate'
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  : 
  System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
E> C:/Program Files/R/R-4.0.3/library/RcppParallel/include/RcppParallel/Common.h:16:23:warning: mparison of integer expressions of different signedness: 'long long unsigned intand 'int-Wsign-compare
E>     if (requestedValue != defaultValueequestedValue > 0)
E>         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
E> C:/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o RcppTemplate.dll tmp.def RcppExports.o vector-sum.o -LC:PROGRA~1RR-40~1.3libraryRCPPPA~1libx64 -ltbb -ltbbmalloc -LC:/PROGRA~1/R/R-40~1.3/bin/x64 -lR
E> C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ltbb
E> C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86
[...]
Type .Last.error.trace to see where the error occurred

Here is the output of sessionInfo():

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252   
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RcppParallel_5.1.4-9000 Rcpp_1.0.7             

loaded via a namespace (and not attached):
 [1] compiler_4.0.3     pillar_1.6.2       prettyunits_1.1.1  remotes_2.4.0     
 [5] tools_4.0.3        testthat_3.0.4     pkgbuild_1.2.0     pkgload_1.2.1.9000
 [9] memoise_2.0.0      lifecycle_1.0.0    tibble_3.1.3       pkgconfig_2.0.3   
[13] rlang_0.4.11       cli_3.0.0          rstudioapi_0.13    curl_4.3.2        
[17] xfun_0.24          fastmap_1.1.0      xml2_1.3.2         withr_2.4.2       
[21] stringr_1.4.0      roxygen2_7.1.1     knitr_1.33         desc_1.3.0        
[25] fs_1.5.0           vctrs_0.3.8        devtools_2.4.2     rprojroot_2.0.2   
[29] glue_1.4.2         R6_2.5.0           processx_3.5.2     fansi_0.5.0       
[33] sessioninfo_1.1.1  callr_3.7.0        purrr_0.3.4        magrittr_2.0.1    
[37] ps_1.6.0           ellipsis_0.3.2     usethis_2.0.1      utf8_1.2.2        
[41] stringi_1.7.3      cachem_1.0.5       crayon_1.4.1 

Seems like ltbb and ltbbmalloc cannot be found, though I am unsure how to rectify this issue.

Any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.