Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPP compilation fails inside job::job #10

Closed
jkeirstead opened this issue Apr 27, 2021 · 2 comments
Closed

CPP compilation fails inside job::job #10

jkeirstead opened this issue Apr 27, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@jkeirstead
Copy link

jkeirstead commented Apr 27, 2021

I'm seeing an issue similar to #7. The brms demo runs fine within a normal console session, but when I wrap it with job::job, I get:

Compiling Stan program...
> 
> 
Error in .Call("rs_canBuildCpp") : 
  C symbol name "rs_canBuildCpp" not in load table
Calls: sourceWithProgress ... .fun -> cxxfunctionplus -> <Anonymous> -> check -> .Call

If I add opts = NULL or opts = list(buildtools.check = NULL, buildtools.with = NULL) to the jobs::job call, then the job runs.

Some debugging info:

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] brms_2.15.0 Rcpp_1.0.6 

loaded via a namespace (and not attached):
 [1] nlme_3.1-150         matrixStats_0.57.0   xts_0.12.1           threejs_0.3.3        rstan_2.21.2        
 [6] job_0.1              backports_1.2.1      tools_4.0.3          R6_2.5.0             DT_0.16             
[11] mgcv_1.8-33          projpred_2.0.2       colorspace_2.0-0     withr_2.4.0          tidyselect_1.1.0    
[16] gridExtra_2.3        prettyunits_1.1.1    processx_3.4.5       Brobdingnag_1.2-6    curl_4.3            
[21] compiler_4.0.3       cli_2.4.0            shinyjs_2.0.0        colourpicker_1.1.0   scales_1.1.1        
[26] dygraphs_1.1.1.6     mvtnorm_1.1-1        ggridges_0.5.3       callr_3.5.1          stringr_1.4.0       
[31] digest_0.6.27        StanHeaders_2.21.0-7 minqa_1.2.4          base64enc_0.1-3      pkgconfig_2.0.3     
[36] htmltools_0.5.1.1    lme4_1.1-25          fastmap_1.0.1        htmlwidgets_1.5.2    rlang_0.4.10        
[41] rstudioapi_0.13      shiny_1.6.0          generics_0.1.0       zoo_1.8-8            jsonlite_1.7.2      
[46] crosstalk_1.1.0.1    gtools_3.8.2         dplyr_1.0.2          inline_0.3.17        magrittr_2.0.1      
[51] loo_2.4.1            bayesplot_1.8.0      Matrix_1.2-18        munsell_0.5.0        abind_1.4-5         
[56] lifecycle_0.2.0      stringi_1.5.3        MASS_7.3-53          pkgbuild_1.2.0       plyr_1.8.6          
[61] grid_4.0.3           parallel_4.0.3       promises_1.1.1       crayon_1.3.4         miniUI_0.1.1.1      
[66] lattice_0.20-41      splines_4.0.3        ps_1.5.0             pillar_1.4.7         igraph_1.2.6        
[71] boot_1.3-25          markdown_1.1         shinystan_2.5.0      codetools_0.2-18     reshape2_1.4.4      
[76] stats4_4.0.3         rstantools_2.1.1     glue_1.4.2           V8_3.4.0             RcppParallel_5.0.2  
[81] vctrs_0.3.6          nloptr_1.2.2.2       httpuv_1.5.4         gtable_0.3.0         purrr_0.3.4         
[86] ggplot2_3.3.3        mime_0.9             xtable_1.8-4         coda_0.19-4          later_1.1.0.1       
[91] rsconnect_0.8.17     tibble_3.0.5         shinythemes_1.2.0    gamm4_0.2-6          statmod_1.4.35      
[96] ellipsis_0.3.1       bridgesampling_1.1-2
> getOption("buildtools.check")
function (action) 
{
    if (identical(.Platform$pkgType, "mac.binary.mavericks")) {
        .Call("rs_canBuildCpp")
    }
    else {
        if (!.Call("rs_canBuildCpp")) {
            .rs.installBuildTools(action)
            FALSE
        }
        else {
            TRUE
        }
    }
}
<environment: 0x7fd8ed8f7520>
@lindeloev
Copy link
Owner

Thanks for a great report! I've just uploaded a new version that sets some RStudio/RMarkdown-specific options to NULL. Could you try and install that and see if that solves the problem?

@jkeirstead
Copy link
Author

Yup, that works! Thanks for the great package; I will be using this a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants