const-ae / const-ae/sparseMatrixStats

compilation problem on Mac 12.0.1 with M1 chip

Open
#23 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
55
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I am running Mac OS Monterey, v12.0.1, on an MacBook Pro with M1 chip (13-inch, M1, 2020).

I have Apple clang version 13.0.0 (clang-1300.0.29.3)
and R version 4.1.0 Patched (2021-07-20 r80657)

I'm getting various warnings and ultimately errors when I try to compile from source.
Any ideas you might have are most welcome.

```
installing the source package ‘sparseMatrixStats’

trying URL 'https://bioconductor.org/packages/3.13/bioc/src/contrib/sparseMatrixStats_1.4.2.tar.gz'
Content type 'application/x-gzip' length 703959 bytes (687 KB)
==================================================
downloaded 687 KB

* installing *source* package ‘sparseMatrixStats’ ...
** using staged installation
** libs
/usr/bin/g++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
/usr/bin/g++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c SparseMatrixView.cpp -o SparseMatrixView.o
In file included from SparseMatrixView.cpp:3:
./VectorSubsetView.h:32:31: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using iterator_category = std::forward_iterator_tag;
^
./VectorSubsetView.h:33:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using value_type = stored_type;
^
./VectorSubsetView.h:34:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using reference = stored_type;
^
./VectorSubsetView.h:35:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using pointer = stored_type const * ;
^
./VectorSubsetView.h:36:29: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using difference_type = ptrdiff_t;
^
5 warnings generated.
/usr/bin/g++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c methods.cpp -o methods.o
In file included from methods.cpp:3:
In file included from ./ColumnView.h:6:
./VectorSubsetView.h:32:31: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using iterator_category = std::forward_iterator_tag;
^
./VectorSubsetView.h:33:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using value_type = stored_type;
^
./VectorSubsetView.h:34:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using reference = stored_type;
^
./VectorSubsetView.h:35:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using pointer = stored_type const * ;
^
./VectorSubsetView.h:36:29: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using difference_type = ptrdiff_t;
^
In file included from methods.cpp:3:
./ColumnView.h:28:30: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using iterator_category= std::input_iterator_tag;
^
./ColumnView.h:29:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using value_type = col_container;
^
./ColumnView.h:30:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using reference = col_container&;
^
./ColumnView.h:31:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using pointer = col_container*;
^
./ColumnView.h:32:29: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using difference_type = void;
^
In file included from methods.cpp:5:
./SkipNAVectorSubsetView.h:31:31: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using iterator_category = std::forward_iterator_tag;
^
./SkipNAVectorSubsetView.h:32:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using value_type = stored_type;
^
./SkipNAVectorSubsetView.h:33:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using reference = stored_type;
^
./SkipNAVectorSubsetView.h:34:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using pointer = stored_type const * ;
^
./SkipNAVectorSubsetView.h:35:29: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using difference_type = ptrdiff_t;
^
In file included from methods.cpp:7:
./sample_rank.h:21:32: error: expected expression
sort(indx.begin(),indx.end(),[&vec](int i1, int i2){
^
./sample_rank.h:88:13: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(int zp: zero_pos){
^
In file included from methods.cpp:8:
./my_utils.h:11:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(double e : iter){
^
./my_utils.h:22:55: error: a space is required between consecutive right angle brackets (use '> >')
std::vector flatten(const std::vector>& v) {
^~
> >
./my_utils.h:24:16: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (const auto& sub : v){
^
./my_utils.h:24:26: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (const auto& sub : v){
^
./my_utils.h:29:16: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (const auto& sub : v)
^
./my_utils.h:29:26: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (const auto& sub : v)
^
./my_utils.h:37:50: error: expected expression
return std::any_of(iter.begin(), iter.end(), [](const double d) -> bool {
^
./my_utils.h:45:51: error: expected expression
return std::all_of(iter.begin(), iter.end(), [](const double d) -> bool {
^
methods.cpp:22:7: error: expected expression
[op](ColumnView::col_container col) -> double {
^
methods.cpp:29:7: error: expected expression
[op](ColumnView::col_container col) -> double {
^
methods.cpp:44:20: error: expected expression
[op](ColumnView::col_container col) -> int {
^
methods.cpp:51:20: error: expected expression
[op](ColumnView::col_container col) -> int {
^
methods.cpp:66:20: error: expected expression
[op](ColumnView::col_container col) -> int {
^
methods.cpp:73:20: error: expected expression
[op](ColumnView::col_container col) -> int {
^
methods.cpp:115:20: error: expected expression
[op](ColumnView::col_container col) -> std::vector {
^
methods.cpp:122:20: error: expected expression
[op](ColumnView::col_container col) -> std::vector {
^
methods.cpp:141:18: error: expected expression
[op](ColumnView::col_container col) -> std::vector {
^
methods.cpp:161:20: error: expected expression
[op](ColumnView::col_container col) -> std::vector {
^
methods.cpp:168:20: error: expected expression
[op](ColumnView::col_container col) -> std::vector {
^
methods.cpp:187:18: error: expected expression
[op](ColumnView::col_container col) -> std::vector {
^
methods.cpp:222:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(double d : values){
^
methods.cpp:301:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(double d : values){
^
methods.cpp:360:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto val_it = values.begin();
^
methods.cpp:361:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto val_end = values.end();
^
methods.cpp:362:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto ind_it = row_indices.begin();
^
methods.cpp:363:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto ind_end = row_indices.end();
^
methods.cpp:399:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto min_iter = std::min_element(values.begin(), values.end(), [](double a, double b) -> bool {
^
methods.cpp:399:68: error: expected expression
auto min_iter = std::min_element(values.begin(), values.end(), [](double a, double b) -> bool {
^
methods.cpp:426:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto max_iter = std::max_element(values.begin(), values.end(), [](double a, double b) -> bool {
^
methods.cpp:426:68: error: expected expression
auto max_iter = std::max_element(values.begin(), values.end(), [](double a, double b) -> bool {
^
methods.cpp:466:58: error: expected expression
std::sort(sorted_values.begin(), sorted_values.end(),[](double i1, double i2){
^
methods.cpp:519:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto max_iter = std::max_element(values.begin(), values.end(), [](double a, double b) -> bool {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
30 warnings and 20 errors generated.
make: *** [methods.o] Error 1
ERROR: compilation failed for package ‘sparseMatrixStats’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/sparseMatrixStats’

The downloaded source packages are in
‘/private/var/folders/1f/d96lz9ts15g81dqs_hcc_9cr0000gq/T/RtmpnEZa9U/downloaded_packages’
Warning messages:
1: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/bioc/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
2: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/data/annotation/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
3: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/data/experiment/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
4: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/workflows/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
5: In .inet_warning(msg) :
unable to access index for repository https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://bioconductor.org/packages/3.13/books/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
6: In .inet_warning(msg) :
installation of package ‘sparseMatrixStats’ had non-zero exit status
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.