ctlab / LinSeed

Linseed: LINear Subspace identification for gene Expresion Deconvolution
MIT License
28 stars 8 forks source link

Error installing #3

Open mooreann opened 5 years ago

mooreann commented 5 years ago

I've been trying to install linseed via devtools in R but I cannot get it to work. At first the error was that my version of R was too old so I updated to R version 3.6.1 and restarted RStudio, but now the install just continues to fail. Here are some pieces of the error message:

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0' ld: warning: directory not found for option '-L/usr/local/gfortran/lib' ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [linseed.so] Error 1 ERROR: compilation failed for package ‘linseed’ Error: Failed to install 'linseed' from GitHub: (converted from warning) installation of package ‘/var/folders/d1/rv814tl96ln88gj4jgqs0qzdm73d04/T//RtmpQ9R4Et/file357b31ab5866/linseed_0.99.2.tar.gz’ had non-zero exit status

I'm not sure if there's something obvious I'm doing/not doing but please let me know!

konsolerr commented 5 years ago

Hi @mooreann,

It looks like you are trying to install the package using Mac OS X, which I am personally not familiar with. However, from error messages it looks like you are missing gfortran libraries that are required to compile some of R packages.

You can find required packages and tools at https://cran.r-project.org/bin/macosx/tools/.

If the error still persists after you install gfortran, let me know.

Cheers, Konstantin

mooreann commented 5 years ago

Yea it seems I already had fortran installed but reinstalled it anyway and still got the same errors. Still getting this one particularly, not sure if there's an easy way to fix if its just a pathing issue?

warning: directory not found for option '-L/usr/local/gfortran/lib'

aladyeva-research commented 5 years ago

Hi, @mooreann Do you still have this issue?

I can help you with questions about installing this package on MacOS

mooreann commented 5 years ago

Yes! Still having issues with gfortran which seems to be necessary for linseed installation. Noticed that its saying gfortran isn't available for the most recent version of R (version 3.6.1) so I installed the earlier version 3.3.1 and still saying gfortran isn't available for that version. Any tips?

haijingjin commented 5 years ago

I had similar problems with installation. My R version is also 3.6.1 and I am using the Mac OS X Mojave system.

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [linseed.so] Error 1
ERROR: compilation failed for package ‘linseed’
removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/linseed’
Error: Failed to install 'linseed' from GitHub:
  (converted from warning) installation of package ‘/var/folders/r0/b123vzhn4672cc0khxxbtn2w0000gn/T//RtmpsKW92E/filebf1e56620d70/linseed_0.99.2.tar.gz’ had non-zero exit status

Looks there is some issues with gfortran

But I successfully install the package in the linux system (ubuntu 18), so this issue might be specific for Mac OS X system.

aladyeva-research commented 5 years ago

Hi, @mooreann @haijingjin Sorry for late reply. As I understood, last R version have issues with gfortran libraries dependencies if it's installed explicitly.

  1. Can you try to install it with Homebrew bottle gcc(version 9.2 should work).
  2. If you will have same issue in RStudio, can you also try to install Linseed from command line.

Thank you!

haijingjin commented 4 years ago

Hi, @mooreann @haijingjin Sorry for late reply. As I understood, last R version have issues with gfortran libraries dependencies if it's installed explicitly.

  1. Can you try to install it with Homebrew bottle gcc(version 9.2 should work).
  2. If you will have same issue in RStudio, can you also try to install Linseed from command line.

Thank you!

You're right! It is the gcc issue. I used the solution indicated in this webpage and it works. https://www.nistara.net/post/compile-issues-r/

rmelias2 commented 2 years ago

Hi @aladyeva-wustl - I am also having this issue. Unfortunately, the solution in the webpage above does not appear to work on my machine. The error code I get is as follows:

`ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0' ld: warning: directory not found for option '-L/usr/local/gfortran/lib' ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [linseed.so] Error 1 ERROR: compilation failed for package ‘linseed’

I downloaded gcc using brew brew install gcc and created the .R/Makevars file as suggested in https://www.nistara.net/post/compile-issues-r/ with no luck. I am currently running R 4.2.1 on MacOS 12.5.1 Appreciate any help

aladyeva-research commented 2 years ago

For gfortran issues (especially after updating to new MacOS version) You should also add to ~/.R/Makevars these lines: FC = /usr/local/opt/gcc/bin/gfortran F77 = /usr/local/opt/gcc/bin/gfortran FLIBS = -L/usr/local/opt/gcc/lib

More details are here (gfortran is included in brew gcc package) https://www.cynkra.com/blog/2021-03-16-gfortran-macos/