YMa-lab / CARD

GNU General Public License v3.0
101 stars 21 forks source link

CARD installation error #83

Open tejasvene opened 3 weeks ago

tejasvene commented 3 weeks ago

Hi, I am tried installing the package, as per your instructions on macSequoia(v15) and R version(4.4.2).However, I run into this error. Kindly assist in resolving the issue. Thanks

See below:

using staged installation libs using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.4)’ using C++11 using SDK: ‘MacOSX15.1.sdk’ clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/RcppArmadillo/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c CARDfree.cpp -o CARDfree.o CARDfree.cpp:1:10: fatal error: 'iostream' file not found 1 | #include | ^~~~~~ 1 error generated. make: *** [CARDfree.o] Error 1 ERROR: compilation failed for package ‘CARD’ ─ removing ‘/private/var/folders/bg/5kjc376d21b227ls6mg4dqw00000gn/T/RtmpciEMMo/Rinst14ae55785ff7/CARD’

ERROR: package installation failed Error: Failed to install 'CARD' from GitHub: ! System command 'R' failed

qoiopipq commented 1 week ago

same error getting here

R version 4.3.3 (2024-02-29) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS 15.1

qoiopipq commented 1 week ago

Solved it.

Once you install then check your directory of the installed gfortran create dynamic linker like:

sudo ln -s /usr/local/gfortran/lib/libgfortran.dylib /usr/local/lib/libgfortran.dylib sudo ln -s /usr/local/gfortran/lib/libgfortran.5.dylib /usr/local/lib/libgfortran.5.dylib

then verify ld -l gfortran --verbose

then update R makervars ~/.R/Makevars FC = /usr/local/bin/gfortran F77 = /usr/local/bin/gfortran FLIBS = -L/usr/local/gfortran/lib -lgfortran LDFLAGS = -L/usr/local/gfortran/lib

then devtools::install_github('YMa-lab/CARD')

it worked for me