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

Got error when installing in M1 chip mac #1

Closed
jianhong opened this issue Mar 22, 2024 · 2 comments
Closed

Got error when installing in M1 chip mac #1

jianhong opened this issue Mar 22, 2024 · 2 comments

Comments

@jianhong
Copy link

When I install the package, I got call to undeclared function 'get_XStringSet_width'.

Here is the details:

BiocManager::install('Bioconductor/pwalign')
'getOption("repos")' replaces Bioconductor standard repositories, see
'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
    CRAN: https://cran.rstudio.com/
Bioconductor version 3.19 (BiocManager 1.30.22), R Under development (unstable)
  (2024-03-12 r86109)
Installing github package(s) 'Bioconductor/pwalign'
Downloading GitHub repo Bioconductor/pwalign@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/private/var/folders/tz/xmhml8w1791c398plv8ztw0c0000gn/T/RtmpckwaDv/remotes1103e1ff27274/Bioconductor-pwalign-d0830ed/DESCRIPTION’ ...
─  preparing ‘pwalign’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘pwalign_0.99.0.tar.gz’
   
* installing *source* package ‘pwalign’ ...
** using staged installation
** libs
using C compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
using SDK: ‘’
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/S4Vectors/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/IRanges/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/XVector/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Biostrings/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c Biostrings_stubs.c -o Biostrings_stubs.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/S4Vectors/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/IRanges/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/XVector/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Biostrings/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c IRanges_stubs.c -o IRanges_stubs.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/S4Vectors/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/IRanges/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/XVector/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Biostrings/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c R_init_pairwiseAlignment.c -o R_init_pairwiseAlignment.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/S4Vectors/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/IRanges/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/XVector/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Biostrings/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c S4Vectors_stubs.c -o S4Vectors_stubs.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/S4Vectors/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/IRanges/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/XVector/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Biostrings/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c XVector_stubs.c -o XVector_stubs.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/S4Vectors/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/IRanges/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/XVector/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Biostrings/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c align_pairwiseAlignment.c -o align_pairwiseAlignment.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/S4Vectors/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/IRanges/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/XVector/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Biostrings/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c align_utils.c -o align_utils.o
align_utils.c:180:30: error: call to undeclared function 'get_XStringSet_width'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        int numberOfChars = INTEGER(get_XStringSet_width(GET_SLOT(subject, install("unaligned"))))[0];
                                    ^
align_utils.c:180:30: note: did you mean 'get_XStringSet_length'?
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Biostrings/include/Biostrings_interface.h:140:5: note: 'get_XStringSet_length' declared here
int get_XStringSet_length(SEXP x);
    ^
align_utils.c:180:30: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'SEXP' (aka 'struct SEXPREC *') [-Wint-conversion]
        int numberOfChars = INTEGER(get_XStringSet_width(GET_SLOT(subject, install("unaligned"))))[0];
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:275:22: note: passing argument to parameter 'x' here
int  *(INTEGER)(SEXP x);
                     ^
1 warning and 1 error generated.
make: *** [align_utils.o] Error 1
ERROR: compilation failed for package ‘pwalign’

SessionInfo:

R Under development (unstable) (2024-03-12 r86109)
Platform: aarch64-apple-darwin20
Running under: macOS Ventura 13.3.1

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.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.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: America/New_York
tzcode source: internal

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

loaded via a namespace (and not attached):
 [1] processx_3.8.4      BiocManager_1.30.22 compiler_4.4.0      R6_2.5.1            cli_3.6.2          
 [6] tools_4.4.0         rstudioapi_0.15.0   curl_5.2.1          remotes_2.5.0       desc_1.4.3         
[11] callr_3.7.5         ps_1.7.6            pkgbuild_1.4.4     
@hpages
Copy link
Contributor

hpages commented Mar 22, 2024

Make sure you have the latest Biostrings i.e. version 2.71.5. Note that pwalign requires Biostrings >= 2.71.5. However, a serious design flaw in R CMD INSTALL is that it checks for version requirements after compilation, when it should actually do this before doing anything else.

@jianhong
Copy link
Author

Thanks! It works!

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

2 participants