kaneplusplus / bigmemory

126 stars 24 forks source link

Installation fails on R-devel 4.0 for macOS #99

Closed hyacz closed 4 years ago

hyacz commented 4 years ago

Hi,

I failed to install bigmemory in macOS R 4.0. Can anyone help to find out why?

Version: bigmemory_4.5.36 R-devel 4.0.0 Under development (unstable) (2020/03/25, r78063) macOS 10.15.3 (MacOSX10.15.sdk)

installation logs

> wget https://mac.r-project.org/el-capitan/R-devel/R-devel-el-capitan-sa-x86_64.tar.gz
> tar -zxf R-devel-el-capitan-sa-x86_64.tar.gz
> cp ~/Downloads/Library/Frameworks/R.framework/Versions/4.0 /Library/Frameworks/R.framework/Versions/
> cd /Library/Frameworks/R.framework/Versions/
> sudo chmod -R g+w 4.0
> rm Current && ln -s 4.0 Current
> R

R Under development (unstable) (2020-03-25 r78063) -- "Unsuffered Consequences"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages("bigmemory", type="source")
trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/bigmemory_4.5.36.tar.gz'
Content type 'application/x-gzip' length 70120 bytes (68 KB)
==================================================
downloaded 68 KB

* installing *source* package ‘bigmemory’ ...
** package ‘bigmemory’ successfully unpacked and MD5 sums checked
** using staged installation
-n   checking for Sun Studio compiler...
no
-n   checking for OS...
Darwin
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include   -fPIC  -Wall -g -O2  -c BigMatrix.cpp -o BigMatrix.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include   -fPIC  -Wall -g -O2  -c SharedCounter.cpp -o SharedCounter.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include   -fPIC  -Wall -g -O2  -c bigmemory.cpp -o bigmemory.o
In file included from bigmemory.cpp:6:
In file included from ../inst/include/bigmemory/BigMatrix.h:9:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/interprocess/mapped_region.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:655:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h:39:17: error: C++ requires a type specifier for
      all declarations
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
                ^
In file included from bigmemory.cpp:6:
In file included from ../inst/include/bigmemory/BigMatrix.h:9:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/interprocess/mapped_region.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:662:27: error: unknown type name 'uuid_t'; did you
      mean 'uid_t'?
int      getsgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from bigmemory.cpp:6:
In file included from ../inst/include/bigmemory/BigMatrix.h:9:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/interprocess/mapped_region.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:664:27: error: unknown type name 'uuid_t'; did you
      mean 'uid_t'?
int      getwgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from bigmemory.cpp:6:
In file included from ../inst/include/bigmemory/BigMatrix.h:9:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/interprocess/mapped_region.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:727:31: error: unknown type name 'uuid_t'; did you
      mean 'uid_t'?
int      setsgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from bigmemory.cpp:6:
In file included from ../inst/include/bigmemory/BigMatrix.h:9:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/interprocess/mapped_region.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:729:31: error: unknown type name 'uuid_t'; did you
      mean 'uid_t'?
int      setwgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
5 errors generated.
make: *** [bigmemory.o] Error 1
ERROR: compilation failed for package ‘bigmemory’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/bigmemory’

The downloaded source packages are in
    ‘/private/var/folders/1k/70kn5vj14tq9dgd0s97gq21h0000gn/T/RtmpRua9Kw/downloaded_packages’

When I point Current to 3.6, it's perfectly normal.

installation logs

> cd /Library/Frameworks/R.framework/Versions/
> rm Current && ln -s 3.6 Current
> R

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages("bigmemory", type="source")
trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/bigmemory_4.5.36.tar.gz'
Content type 'application/x-gzip' length 70120 bytes (68 KB)
==================================================
downloaded 68 KB

* installing *source* package ‘bigmemory’ ...
** package ‘bigmemory’ successfully unpacked and MD5 sums checked
** using staged installation
-n   checking for Sun Studio compiler...
no
-n   checking for OS...
Darwin
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c BigMatrix.cpp -o BigMatrix.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c SharedCounter.cpp -o SharedCounter.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c bigmemory.cpp -o bigmemory.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c deepcopy.cpp -o deepcopy.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DDARWIN -DLENGTH_HACK -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c util.cpp -o util.o
clang++ -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 bigmemory.so BigMatrix.o RcppExports.o SharedCounter.o bigmemory.o deepcopy.o util.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-bigmemory/00new/bigmemory/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Creating a generic function for ‘ncol’ from package ‘base’ in package ‘bigmemory’
Creating a generic function for ‘nrow’ from package ‘base’ in package ‘bigmemory’
Creating a generic function for ‘typeof’ from package ‘base’ in package ‘bigmemory’
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (bigmemory)
kaneplusplus commented 4 years ago

Hmm. I haven't seen this. I'll try to get to it this weekend.

kaneplusplus commented 4 years ago

I'm not sure and I'm not running 4.0. The error indicates that the code uuid_t is an unknown type but uid_t isn't. I would suggest redefining uid_t as uuid_t and then test to see if it works.

hyacz commented 4 years ago

I found the reason https://github.com/RcppCore/Rcpp/issues/1046 , It is fixed in the devel version of Rcpp.

kaneplusplus commented 4 years ago

Excellent! Thanks very much for following up.