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: package installation failed (MacOS Big Sur 11.5.2) #8

Open
JoBBurt opened this issue Aug 15, 2021 · 10 comments
Open

Error: package installation failed (MacOS Big Sur 11.5.2) #8

JoBBurt opened this issue Aug 15, 2021 · 10 comments

Comments

@JoBBurt
Copy link

JoBBurt commented Aug 15, 2021

Hello,

I would like to try out this package, but am having trouble installing it. I was wondering if you'd be able to help me with the install. I've pasted the output of the code below.

Thanks,
Jordan

Code Output:

devtools::install_github("ococrook/bandle")
Downloading GitHub repo ococrook/bandle@HEAD
✓ checking for file ‘/private/var/folders/dc/y4crtbv13x17s1kh7txyxdb80000gn/T/RtmpA2e9PK/remotes2780488c88cd/ococrook-bandle-03e0371/DESCRIPTION’ ...
─ preparing ‘bandle’:
✓ checking DESCRIPTION meta-information ...
─ cleaning src
─ installing the package to process help pages
-----------------------------------
─ installing source package ‘bandle’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c Bessel2ndKind.cpp -o Bessel2ndKind.o
Bessel2ndKind.cpp:621:55: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]
nk, tau, D = D, j + 1, nu).t();
~ ^ ~
Bessel2ndKind.cpp:774:49: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]
nk, tau, D = D, j + 1).t();
~ ^ ~
2 warnings generated.
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c dmvtCpp.cpp -o dmvtCpp.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c leapfrogGPcpp.cpp -o leapfrogGPcpp.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c pg_sample.cpp -o pg_sample.o
clang++ -mmacosx-version-min=10.13 -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/usr/local/lib -o bandle.so Bessel2ndKind.o RcppExports.o dmvtCpp.o leapfrogGPcpp.o pg_sample.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
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: *** [bandle.so] Error 1
ERROR: compilation failed for package ‘bandle’
─ removing ‘/private/var/folders/dc/y4crtbv13x17s1kh7txyxdb80000gn/T/RtmpydhTTz/Rinst286e233c5a05/bandle’
-----------------------------------
ERROR: package installation failed
Error: Failed to install 'bandle' from GitHub:
System command 'R' failed, exit status: 1, stdout + stderr (last 10 lines):
E> clang++ -mmacosx-version-min=10.13 -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/usr/local/lib -o bandle.so Bessel2ndKind.o RcppExports.o dmvtCpp.o leapfrogGPcpp.o pg_sample.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
E> ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
E> ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
E> ld: library not found for -lgfortran
E> clang: error: linker command fa

sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.5.2

@ococrook
Copy link
Owner

Hi Jordan,

Thanks for opening the issue! Looks like a MacOS error and it isnt able to find your gfortan library. The key warning part is:

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

This shouldn't have been a problem but some reason MacOS have been a bit odd recently. The first thing to check is that xcode is installed. Open your terminal and type:

xcode-select --install

I would then try again at this point, but I give it about 50% probability that is still won't work. I would then follow this guide here to further debug:

https://medium.com/biosyntax/following-up-library-dependency-when-compiling-r-packages-89f191b9f227

Let me know if that is still a problem after that, sorry for inconvenience!

We are also planning an ~major update in the next couple of days so you may want to hold off until later in the week? But you can always reinstall after that.

Thanks!

@JoBBurt
Copy link
Author

JoBBurt commented Aug 16, 2021

Hi,

Thank you for your advice, I had xcode installed, but I will wait until you push the update to follow the guide to debug.

Thanks!

@ococrook
Copy link
Owner

Hi Jordan,

The update has been pushed - sorry I forgot to update you!

@JoBBurt
Copy link
Author

JoBBurt commented Aug 27, 2021

Hi Oliver,

Thanks for the update. I tried again to install and did follow the instructions in the link you sent without success. I will have to try to install it on another computer.

Best,
Jordan

@ococrook
Copy link
Owner

ococrook commented Sep 1, 2021

Hi Jordan,

We've got it working on several MacOS locally. I'll see if I can track down any more issues and try to get back to you. Let me know if you have anymore issues

@ococrook
Copy link
Owner

ococrook commented Sep 2, 2021

Hi Jordan,

We had a similar issue locally which was fixed by installing the correct binary for your macos: https://cran.r-project.org/bin/macosx/. I hope that helps!

@oliviaconway
Copy link

oliviaconway commented Sep 2, 2021

Hi Olly

I'm also having the same issue on MacOS with the same error messages. I have xcode and the correct binary (Rv4.1.1, intel 64-bit). Could another potential work around be to:

  1. Install homebrew
  2. Install gcc via homebrew
  3. Update my /Library/Frameworks/R.framework/Resources/etc/Makeconf to similar paths as suggested here https://medium.com/biosyntax/following-up-library-dependency-when-compiling-r-packages-89f191b9f227
  4. Try to install bandle via devtools::install_github('ococrook/bandle') again

Let me know if this sounds plausible or if there's anything I'm missing.

Many thanks,
Olivia

@JoBBurt
Copy link
Author

JoBBurt commented Sep 2, 2021

Hi Jordan,

We had a similar issue locally which was fixed by installing the correct binary for your macos: https://cran.r-project.org/bin/macosx/. I hope that helps!

This broke everything :(

@ococrook
Copy link
Owner

ococrook commented Sep 2, 2021

Hi Jordan,
We had a similar issue locally which was fixed by installing the correct binary for your macos: https://cran.r-project.org/bin/macosx/. I hope that helps!

This broke everything :(

Erg, I'm really sorry. Not sure why Mac is being so difficult. There are no build warnings for the package to suggest there are any issues. I'll go pester some people smarter than me

@ococrook
Copy link
Owner

ococrook commented Sep 2, 2021

Hi Olly

I'm also having the same issue on MacOS with the same error messages. I have xcode and the correct binary (Rv4.1.1, intel 64-bit). Could another potential work around be to:

  1. Install homebrew
  2. Install gcc via homebrew
  3. Update my /Library/Frameworks/R.framework/Resources/etc/Makeconf to similar paths as suggested here https://medium.com/biosyntax/following-up-library-dependency-when-compiling-r-packages-89f191b9f227
  4. Try to install bandle via devtools::install_github('ococrook/bandle') again

Let me know if this sounds plausible or if there's anything I'm missing.

Many thanks,
Olivia

Hi Olivia,

This could certainly work, I don't have a Mac to try this on but if it works for you let me know!

Best,
Olly

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

3 participants