簡體   English   中英

R上的Geneland安裝(Mac)

[英]Geneland installation on R (Mac)

我正在嘗試在Mac(Mojave 10.14.6)的R版本3.5.1上安裝Geneland(來自https://i-pri.org/special/Biostatistics/Software/Geneland/#Installation )。

我首先添加了gcc問題,但是遵循了這個問題( https://nistara.net/post/compile-issues-r/ ),該問題可以解決,安裝可能會進一步(通過Brew安裝gcc 9.2.0)。

但是我現在被困在這里:

> install.packages("~/Desktop/Geneland_4.0.8.tar.gz", repos = NULL, type = "source")
* installing *source* package ‘Geneland’ ...
** libs
gfortran   -fPIC  -g -O2  -c alarousset.f -o alarousset.o
gfortran   -fPIC  -g -O2  -c ggfstat.f -o ggfstat.o
gfortran   -fPIC  -g -O2  -c hz.f -o hz.o
gfortran   -fPIC  -g -O2  -c main.f -o main.o
gcc-9 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/include   -fPIC  -mtune=native -g -O2 -Wall -pedantic -Wconversion -c wrapper.c -o wrapper.o
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:61,
                 from /Library/Frameworks/R.framework/Resources/include/R.h:55,
                 from wrapper.c:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h:257:22: error: missing binary operator before token "("
  257 |     #if __has_builtin(__is_target_arch)
      |                      ^
make: *** [wrapper.o] Error 1
ERROR: compilation failed for package ‘Geneland’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Geneland’
Warning in install.packages :
  installation of package ‘/Users/simon/Desktop/Geneland_4.0.8.tar.gz’ had non-zero exit status

您知道如何解決這個問題嗎? 在此先多謝!

編輯 :我能夠通過在〜/ .R / Makevars文件中保留以下行來安裝Geneland:

FLIBS=-L/usr/local/Cellar/gcc/9.2.0/lib/gcc/9

希望這對其他人有幫助!

我能夠在Windows(R v3.5)上成功安裝。 但是,在Mac上安裝時遇到類似的問題:

install.packages("~/Desktop/Geneland_4.0.8.tar.gz", repos = NULL, type = "source")
* installing *source* package ‘Geneland’ ...
** using staged installation
** libs
gfortran  -fPIC  -Wall -g -O2  -c alarousset.f -o alarousset.o
gfortran-4.2: error trying to exec '/usr/local/bin/i686-apple-darwin8-gfortran-4.2': execvp: Bad CPU type in executable
make: *** [alarousset.o] Error 255
ERROR: compilation failed for package ‘Geneland’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Geneland’
Warning in install.packages :
  installation of package ‘/Users/jas/Desktop/Geneland_4.0.8.tar.gz’ had non-zero exit status

也許此軟件包的創建者從未在Mac上進行過測試,或者其設計並非旨在在Mac上運行(希望我錯了)。

另外關於gcc,我相信我擁有最新版本:

Jass-MacBook-Air:~ $ brew info gcc
gcc: stable 9.2.0 (bottled), HEAD
GNU compiler collection
https://gcc.gnu.org/
/usr/local/Cellar/gcc/9.2.0 (1,462 files, 291.4MB)
  Poured from bottle on 2019-09-17 at 11:08:00
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gcc.rb
==> Dependencies
Required: gmp ✔, isl ✔, libmpc ✔, mpfr ✔
==> Options
--HEAD
    Install HEAD version
==> Analytics
install: 83,384 (30 days), 202,842 (90 days), 915,671 (365 days)
install_on_request: 37,664 (30 days), 91,399 (90 days), 435,332 (365 days)
build_error: 0 (30 days)     

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM