Unable to install Blavaan in Rocky OS

20 views
Skip to first unread message

Tianchen Mu

unread,
Jan 26, 2024, 2:34:04 PMJan 26
to blavaan
Hello,

I was trying to install blavaan with R 4.2.2 but no success so far. Here is the error message and other information:

> sessionInfo()

R version 4.2.2 (2022-10-31)

Platform: x86_64-pc-linux-gnu (64-bit)

Running under: Rocky Linux 8.5 (Green Obsidian)


Matrix products: default

BLAS/LAPACK: /packages/apps/spack/18/opt/spack/gcc-11.2.0/openblas-0.3.20-mvb/lib/libopenblas_zen-r0.3.20.so


locale:

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              

 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    

 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   

 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 

 [9] LC_ADDRESS=C               LC_TELEPHONE=C            

[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       


attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base     


other attached packages:

[1] modeest_2.4.0      rstan_2.32.5       StanHeaders_2.32.5 runjags_2.2.2-1.1 

[5] lavaan_0.6-17      rjags_4-15         coda_0.19-4       


loaded via a namespace (and not attached):

 [1] tidyselect_1.2.0    QuickJSR_1.1.0      remotes_2.4.2.1    

 [4] lattice_0.22-5      V8_4.3.3            colorspace_2.1-0   

 [7] vctrs_0.6.5         generics_0.1.3      stats4_4.2.2       

[10] loo_2.6.0           rmutil_1.1.10       utf8_1.2.4         

[13] rlang_1.1.2         pkgbuild_1.4.2      stable_1.1.6       

[16] pillar_1.9.0        glue_1.6.2          matrixStats_1.0.0  

[19] lifecycle_1.0.4     timeDate_4032.109   munsell_0.5.0      

[22] fBasics_4032.96     gtable_0.3.4        timeSeries_4032.109

[25] statip_0.2.3        codetools_0.2-19    inline_0.3.19      

[28] callr_3.7.3         ps_1.7.5            parallel_4.2.2     

[31] curl_5.1.0          fansi_1.0.6         Rcpp_1.0.11        

[34] scales_1.3.0        desc_1.4.2          RcppParallel_5.1.7 

[37] jsonlite_1.8.7      gridExtra_2.3       mnormt_2.1.1       

[40] ggplot2_3.4.4       processx_3.8.2      dplyr_1.1.4        

[43] clue_0.3-65         grid_4.2.2          rprojroot_2.0.3    

[46] stabledist_0.7-1    quadprog_1.5-8      cli_3.6.2          

[49] tools_4.2.2         magrittr_2.0.3      tibble_3.2.1       

[52] cluster_2.1.4       crayon_1.5.2        spatial_7.3-17     

[55] pbivnorm_0.6.0      pkgconfig_2.0.3     prettyunits_1.2.0  

[58] rpart_4.1.21        R6_2.5.1            compiler_4.2.2     



Install blavaan 0.4-8 from CRAN archive:

packageurl <- "http://cran.r-project.org/src/contrib/Archive/blavaan/blavaan_0.5-2.tar.gz"

install.packages(packageurl, repos=NULL, type="source")

The last part of the output:

stanExports_stanmarg.cc:23:88:   required from here

/packages/apps/spack/18/opt/spack/gcc-11.2.0/r-4.2.2-kpl/rlib/R/library/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument 'Eigen::internal::packet_traits<double>::type' {aka '__m128d'} [-Wignored-attributes]

g++: fatal error: Killed signal terminated program cc1plus

compilation terminated.

make: *** [/packages/apps/spack/18/opt/spack/gcc-11.2.0/r-4.2.2-kpl/rlib/R/etc/Makeconf:176: stanExports_stanmarg.o] Error 1

ERROR: compilation failed for package ‘blavaan’

* removing ‘/home/tianche5/R/x86_64-pc-linux-gnu-library/4.2/blavaan’

Warning message:

In install.packages(packageurl, repos = NULL, type = "source") :

  installation of package ‘/tmp/RtmpgXIJQR/downloaded_packages/blavaan_0.4-8.tar.gz’ had non-zero exit status



Install the newest blavaan:

install.packages("blavaan")

Output: Got the same error as above.



Testing rstan as seen in this post https://groups.google.com/g/blavaan/c/5RUKZQuKc4c

And the output:

Error in compileCode(f, code, language = language, verbose = verbose) : 

  /home/tianche5/R/x86_64-pc-linux-gnu-library/4.2/rstan/include/rstan/stan_fit.hpp:1215:18:   required from 'SEXPREC* rstan::stan_fit<Model, RNG_t>::call_sampler(SEXP) [with Model = model21774e4cd56e92__namespace::model21774e4cd56e92_; RNG_t = boost::random::additive_combine_engine<boost::random::linear_congruential_engine<unsigned int, 40014, 0, 2147483563>, boost::random::linear_congruential_engine<unsigned int, 40692, 0, 2147483399> >; SEXP = SEXPREC*]'file21774e239538b1.cpp:353:68:   required from here/packages/apps/spack/18/opt/spack/gcc-11.2.0/r-4.2.2-kpl/rlib/R/library/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument 'Eigen::internal::packet_traits<double>::type' {aka '__m128d'} [-Wignored-attributes]g++: fatal error: Killed signal terminated program cc1pluscompilation terminated.make: *** [/packages/apps/spack/18/opt/spack/gcc-11.2.0/r-4.2.2-kpl/rlib/R/etc/Makeconf:178: file21774e239538b1.o] Error 1

Error in sink(type = "output") : invalid connection

> print(fit1)

Error in print(fit1) : object 'fit1' not found



Thanks in advance!


Regards,

Tianchen

Ed Merkle

unread,
Jan 26, 2024, 2:45:37 PMJan 26
to blavaan
I would recommend focusing on rstan for now. Once that is working, I am guessing that blavaan will also work. A couple thoughts:

If you are able to do so, it would be good to upgrade R to 4.3.2 and work with the package versions on CRAN. This is partly because rstan (and blavaan) depend on other packages, and I imagine it will be difficult to find the right versions of old packages if you are not up to date.

If you haven't, look at the "rstan getting started" page below, especially the "configure c++ toolchain" part. That is largely focused on Ubuntu, but maybe it gives you ideas about what to do:

Reply all
Reply to author
Forward
0 new messages