[R-SIG-Mac] Problem installing RUcausal library on MAC

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Mon Apr 24 08:17:05 CEST 2023


Varin,

you're missing the Fortran compiler which the package requires. To make the life a bit easier on you, upgrade to R 4.3.0 and then install GNU Fortran from https://mac.r-project.org/tools/

If you don't want to upgrade R then you'll need the Fortran from here: https://github.com/R-macos/gcc-darwin-arm64/releases/tag/R-4.2.0-release

Cheers,
Simon



> On Apr 24, 2023, at 9:05 AM, varin sacha via R-SIG-Mac <r-sig-mac using r-project.org> wrote:
> 
> R-experts,
> 
> What is going wrong?
> 
> At the end of this page there is the installation command :
> https://gitlab.science.ru.nl/gbucur/RUcausal/-/blob/master/README.Rmd 
> 
> Working with a MAC, I have tried to install the RUcausal library (copy and paste the installation command).
> 
> It is written that the package has been built on Linux using the GNU Compiler Collection. To install the package, open an R instance and run:
> install.packages('devtools') # required package
> devtools::install_git('https://gitlab.science.ru.nl/gbucur/RUcausal')
> 
> I get this error message :
> 
>  ERROR: package installation failed
> Error: Failed to install 'RUcausal' from Git:
>  ! System command 'R' failed
> 0d0bz2p4xg640000gn/T/RtmpMs1teQ/Rinst6453ee77bb8/RUcausal’
> 
> 
> 
> install.packages('devtools') # required package
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'https://stat.ethz.ch/CRAN/bin/macosx/big-sur-arm64/contrib/4.2/devtools_2.4.5.tgz'
> Content type 'application/x-gzip' length 421790 bytes (411 KB)
> ==================================================
> downloaded 411 KB
> 
> 
> The downloaded binary packages are in
>    /var/folders/t_/myv0vvms11g40d0bz2p4xg640000gn/T//Rtmp7SUtUd/downloaded_packages
>> devtools::install_git('https://gitlab.science.ru.nl/gbucur/RUcausal')
> Downloading git repo https://gitlab.science.ru.nl/gbucur/RUcausal
> '/usr/bin/git' clone --depth 1 --no-hardlinks https://gitlab.science.ru.nl/gbucur/RUcausal /var/folders/t_/myv0vvms11g40d0bz2p4xg640000gn/T//Rtmp7SUtUd/file61a2a8e336a
> ── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> ─ installing the package to process help pages
>  -----------------------------------ges
> ─ installing *source* package ‘RUcausal’ ...
>  ** using staged installation
>  ** libs
>  clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -Wall -pedantic -c RcppExports.cpp -o RcppExports.o
>  clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -Wall -pedantic -c compute_DAG_probabilities_BGe_fast.cpp -o compute_DAG_probabilities_BGe_fast.o
>  clang++ -arch arm64 -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o RUcausal.so RcppExports.o compute_DAG_probabilities_BGe_fast.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1 -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
>  ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'
>  ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib'
>  ld: library not found for -lgfortran
>  clang: error: linker command failed with exit code 1 (use -v to see invocation)
>  make: *** [RUcausal.so] Error 1
>  ERROR: compilation failed for package ‘RUcausal’
> ─ removing ‘/private/var/folders/t_/myv0vvms11g40d0bz2p4xg640000gn/T/RtmpMs1teQ/Rinst6453ee77bb8/RUcausal’
>  -----------------------------------
>  ERROR: package installation failed
> Error: Failed to install 'RUcausal' from Git:
>  ! System command 'R' failed
> 0d0bz2p4xg640000gn/T/RtmpMs1teQ/Rinst6453ee77bb8/RUcausal’
> 
> 
> Envoyé de mon iPhone
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 



More information about the R-SIG-Mac mailing list