Hello I'm having problem installing edgeR. it says gfortran lib is missing, wonder if anyone has a solution? Thanks!
clang++ -arch arm64 -std=gnu++11 -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 edgeR.so R_add_prior_count.o R_ave_log_cpm.o R_calculate_cpm.o R_check_poisson_bound.o R_compute_apl.o R_compute_nbdev.o R_exact_test_by_deviance.o R_fit_levenberg.o R_fit_one_group.o R_get_one_way_fitted.o R_initialize_levenberg.o R_loess_by_col.o R_maximize_interpolant.o R_process_hairpin_reads.o R_simple_good_turing.o add_prior.o adj_coxreid.o fmm_spline.o glm_levenberg.o glm_one_group.o init.o interpolator.o nbdev.o objects.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.2.0/11.0.0 -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lm -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.2.0/11.0.0'
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: *** [edgeR.so] Error 1
ERROR: compilation failed for package ‘edgeR’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/edgeR’
The downloaded source packages are in
‘/private/var/folders/1v/7vl3drys41vcrn588hn9wnf40000gp/T/RtmpSCfb5b/downloaded_packages’
Warning messages:
1: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
2: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
3: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
4: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
5: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
6: In .inet_warning(msg) :
installation of package ‘edgeR’ had non-zero exit status
>
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.4
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] limma_3.48.1
loaded via a namespace (and not attached):
[1] BiocManager_1.30.16 compiler_4.1.0 tools_4.1.0
See https://mac.r-project.org/tools/
Your post shows an errror message but doesn't show the R code that produced this message. What R code did you use?
I'm not sure if this is relevant, but edgeR does not contain Fortran code.
At the linking stage, for packages with C or C++ or fortran code, the elements identified in
R CMD config FLIBS
must be present. On my M1 mac, usingthe value of FLIBS is
@ATpoint gives the clue on how to get the necessary resource.
Until binary package distribution for M1 mac is undertaken -- and we don't have a date for this yet -- M1 mac users will need to be able to install from source.
I guess I should qualify this -- probably if you use R in x86 mode on M1 mac you can just use the standard mac binaries for Bioconductor packages. I haven't tried that.
Mine looks exactly the same:
and I have gfortran installed:
Hi Gordon,
I was trying to install edgeR from source but it failed to compile:
the x86 version works well on my older macs.
Thanks Brian
OK, I understand now the issue is that you are running R compiled for the Mac M1 ARM-based processor but Bioconductor doesn't provide binaries for that processor, so you need to install from source using ARM compilers.
Hi--I recommend seeing the suggestions in response to this post. It solved ALL of my problems with this type of installation!
https://stackoverflow.com/questions/67680663/installing-specific-r-packages-from-source-with-apple-m1-chip-causing-repository
Good luck!