Open JingjingBai2021 opened 8 months ago
Hi Jingjing, honestly, I haven't tried to install the package on a Mac using the clang compiler, but I tomorrow I can check it with a Mac and see if I can reproduce the error there and then check, how to fix it. From the error message I cannot directly guess what the problem is, so I hope it will create here locally the same problem on a Mac. I will come back to you tomorrow.
Best wishes, Daniel
Now after a second look at your error message, it seems that there is something with your local Fortran installation:
ld: library not found for -lgfortran
Do you have Fortran installed on your machine? You could check that by running
gfortran --version
I use the GNU Fortran compiler, I suppose on Mac you can install it via brew install gcc
?!
Hi Daniel,
I am trying to go through the eqtl analysis by using GenomicTools.
But it seemed that the "install_github("fischuu/GenomicTools")" does not work.
ERRORS
installing source package ‘GenomicTools’ ... using staged installation libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using C++ compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX13.1.sdk’ clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RegisterRoutines.c -o RegisterRoutines.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c mdr.cpp -o mdr.o mdr.cpp:303:11: warning: variable 'runFour' set but not used [-Wunused-but-set-variable] int runFour=0; ^ mdr.cpp:14:12: warning: unused variable 'CVP' [-Wunused-variable] double CVP = Rcpp::as(cvp); // Ratio of training and testing data
^
2 warnings generated.
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c timeCluster.cpp -o timeCluster.o
clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o GenomicTools.so RegisterRoutines.o mdr.o timeCluster.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0 -L/opt/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/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0'
ld: warning: directory not found for option '-L/opt/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [GenomicTools.so] Error 1
ERROR: compilation failed for package ‘GenomicTools’
Best, JIngjing