Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing #3

Open
mooreann opened this issue Aug 8, 2019 · 9 comments
Open

Error installing #3

mooreann opened this issue Aug 8, 2019 · 9 comments

Comments

@mooreann
Copy link

mooreann commented Aug 8, 2019

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
Copy link
Collaborator

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
Copy link
Author

mooreann commented Aug 9, 2019

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
Copy link

Hi, @mooreann
Do you still have this issue?

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

@mooreann
Copy link
Author

mooreann commented Sep 3, 2019

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
Copy link

haijingjin commented Sep 30, 2019

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
Copy link

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
Copy link

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
Copy link

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’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/linseed’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/gv/gn0c28t50533wt66k3ynldsh0000gn/T//RtmpbI9bSc/file849536af7ede/linseed_0.99.2.tar.gz’ had non-zero exit status`

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
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants