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

installation of package ‘glmGamPoi’ had non-zero exit status #60

Open
NicoHadas opened this issue Feb 28, 2024 · 6 comments
Open

installation of package ‘glmGamPoi’ had non-zero exit status #60

NicoHadas opened this issue Feb 28, 2024 · 6 comments

Comments

@NicoHadas
Copy link

NicoHadas commented Feb 28, 2024

Hello,

I am unable to install glmGamPoi on my intel mac locally on R.

`if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")

BiocManager::install("glmGamPoi")`

I get the error message after installing from source:

ld: warning: search path '/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0' not found
ld: warning: search path '/opt/gfortran/lib' not found
ld: library 'gfortran' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [glmGamPoi.so] Error 1
ERROR: compilation failed for package ‘glmGamPoi’

In install.packages(...) :
installation of package ‘glmGamPoi’ had non-zero exit status

Any advice would be appreciated.

R version 4.3.3 RC (2024-02-22 r85993)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.6.3

@adakteen
Copy link

adakteen commented Mar 1, 2024

Hi there. Different problem but same outcome. I'm running R v. 4.3 on a Monterey MacOS v12.7.3. Running BiocManager::install("glmGamPoi") progresses until it gets to the point of looking for the math.h file. Now I've checked the file path and confirmed that math.h is in the correct directory. I've also re-installed Xcode (twice) and gfortran. I've even explicitly defined the file path when trying to install with bash in the mac terminal.

I've noticed this problem was previously reported here, but the solutions outlined in that thread don't seem to work anymore. Does anybody know what is happening and how I can fix it?

> BiocManager::install("glmGamPoi")
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
    CRAN: https://cran.rstudio.com/
Bioconductor version 3.18 (BiocManager 1.30.22), R 4.3.2 (2023-10-31)
Installing package(s) 'glmGamPoi'
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘glmGamPoi’
Do you want to attempt to install these from sources? (Yes/no/cancel) y
installing the source package ‘glmGamPoi’

trying URL 'https://bioconductor.org/packages/3.18/bioc/src/contrib/glmGamPoi_1.14.3.tar.gz'
Content type 'application/x-gzip' length 2104554 bytes (2.0 MB)
==================================================
downloaded 2.0 MB

* installing *source* package ‘glmGamPoi’ ...
** using staged installation
** libs
using C++ compiler: ‘clang version 5.0.1 (tags/RELEASE_501/final)’
using C++11
using SDK: ‘MacOSX13.1.sdk’
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/beachmat/include' -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang-5.0: warning: optimization flag '-falign-functions=64' is not supported [-Wignored-optimization-argument]
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
In file included from /usr/local/include/c++/v1/cmath:305:
/usr/local/include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found
#include_next <math.h>
              ^~~~~~~~
1 error generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘glmGamPoi’
* removing ‘/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/glmGamPoi’

The downloaded source packages are in
	‘/private/var/folders/dy/95pjl7vs75l8b8wdvx4mqsg00000gn/T/RtmpRkzfHM/downloaded_packages’
Old packages: 'HDF5Array'
Update all/some/none? [a/s/n]: 
n
Warning message:
In install.packages(...) :
  installation of package ‘glmGamPoi’ had non-zero exit status

Here is my R session

> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.7.3

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: ********/********
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] macrtools_0.0.3.01  BiocManager_1.30.22

loaded via a namespace (and not attached):
[1] compiler_4.3.2 tools_4.3.2    sys_3.4.2      askpass_1.2.0 

@const-ae
Copy link
Owner

const-ae commented Mar 4, 2024

Hi Nico,

sorry for the trouble with the glmGamPoi installation. Please install fortran following the instructions on https://mac.r-project.org/tools/. These are the official instructions from the R maintainers and will fix your issue!

Best,
Constantin

@const-ae
Copy link
Owner

const-ae commented Mar 4, 2024

Hi Andrew,

also for the sorry for the troubles that you are encountering trying to install glmGamPoi. And thank you for the detailed description of your setup and which steps you took so far. I will need to further investigate what's going wrong for you. I will get back to you as soon as possible.

Best,
Constantin

@const-ae
Copy link
Owner

const-ae commented Mar 4, 2024

@adakteen, I still cannot tell what exactly is going wrong for you. I notice that your clang version appears somewhat old (version 5.0.1), whereas I have version 13.0.0 on my computer, but I don't know if that can cause the issue. It might also be some other changes that lead to conflicting path specifications. I think you have two options for now:

  1. Try to reset the changes you made so far and then carefully follow the instructions from https://mac.r-project.org/tools/ and hope that installing the tools for a third time will fix things.
  2. Wait for a few days. I will need to fix some issue on mac so that Bioconductor can provide binaries for glmGamPoi. When those are available, you no longer need to build the package from source (and thus also not need gfortran, clang, etc.)

Best,
Constantin

@adakteen
Copy link

adakteen commented Mar 4, 2024

Hi const-ae,
Thank you so much for looking into this. I'll take option #2 for now because I've re-installed Xcode and gfortran multiple times now. It's not critical I have this package, so I can afford to wait.

Kind regards,
adakteen

@const-ae
Copy link
Owner

@adakteen, the build errors on Bioconductor are fixed now (https://bioconductor.org/checkResults/release/bioc-LATEST/glmGamPoi/).

This means if you call BiocManager::install("glmGamPoi") now, it will install the binary package on Mac and Windows and you shouldn't be troubled by any further build errors.


Please confirm that the installation worked, so that I can close the issue.

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