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

Cannot install on R 4.0.3, macOS 10.15.5 #15

Open
keller-mark opened this issue Nov 15, 2020 · 4 comments
Open

Cannot install on R 4.0.3, macOS 10.15.5 #15

keller-mark opened this issue Nov 15, 2020 · 4 comments

Comments

@keller-mark
Copy link

keller-mark commented Nov 15, 2020

Hi, thanks for starting this effort to create an R wrapper around the z5 API.

I am having some issues installing. I have just tried to use devtools::install_github. Is this the intended method of installation? Are there any other dependencies I need to install first?

I also realize that this is a work in progress. if there is anything urgent that you could direct me to, I may be able to assist with development.

─  preparing ‘zarr’:
✓  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
─  building ‘zarr_0.0.0.00000.tar.gz’
   
* installing *source* package ‘zarr’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include" -DWITH_BLOSC -DWITH_ZLIB -lzlib -DWITH_BZIP2 -lbzip2 -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/xtensor/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/testthat/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include" -DWITH_BLOSC -DWITH_ZLIB -lzlib -DWITH_BZIP2 -lbzip2 -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/xtensor/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/testthat/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c attributes.cpp -o attributes.o
clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include" -DWITH_BLOSC -DWITH_ZLIB -lzlib -DWITH_BZIP2 -lbzip2 -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/xtensor/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/testthat/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c dataset-handle.cpp -o dataset-handle.o
clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include" -DWITH_BLOSC -DWITH_ZLIB -lzlib -DWITH_BZIP2 -lbzip2 -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/xtensor/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/testthat/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c dataset.cpp -o dataset.o
clang: warning: -lzlib: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lbzip2: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lzlib: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lbzip2: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lzlib: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lbzip2: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lzlib: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lbzip2: 'linker' input unused [-Wunused-command-line-argument]
In file included from dataset.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:3:
In file included from ../inst/include/z5/types/types.hxx:10:
In file included from ../inst/include/nlohmann/json.hpp:8132:
../inst/include/nlohmann/detail/macro_unscope.hpp:5:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma GCC diagnostic pop
                           ^
../inst/include/nlohmann/detail/macro_unscope.hpp:8:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma GCC diagnostic pop
                           ^
In file included from attributes.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:3:
In file included from ../inst/include/z5/types/types.hxx:10:
In file included from ../inst/include/nlohmann/json.hpp:8132:
../inst/include/nlohmann/detail/macro_unscope.hpp:5:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma GCC diagnostic pop
                           ^
../inst/include/nlohmann/detail/macro_unscope.hpp:8:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma GCC diagnostic pop
                           ^
In file included from dataset-handle.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:3:
In file included from ../inst/include/z5/types/types.hxx:10:
In file included from ../inst/include/nlohmann/json.hpp:8132:
../inst/include/nlohmann/detail/macro_unscope.hpp:5:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma GCC diagnostic pop
                           ^
../inst/include/nlohmann/detail/macro_unscope.hpp:8:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma GCC diagnostic pop
                           ^
In file included from RcppExports.cpp:4:
In file included from ./zarr_types.h:4:
In file included from ../inst/include/z5/filesystem/handle.hxx:5:
In file included from ../inst/include/z5/handle.hxx:3:
In file included from ../inst/include/z5/types/types.hxx:10:
In file included from ../inst/include/nlohmann/json.hpp:8132:
../inst/include/nlohmann/detail/macro_unscope.hpp:5:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma GCC diagnostic pop
                           ^
../inst/include/nlohmann/detail/macro_unscope.hpp:8:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma GCC diagnostic pop
                           ^
In file included from dataset.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:4:
In file included from ../inst/include/z5/util/file_mode.hxx:4:
../inst/include/z5/common.hxx:48:24: error: no namespace named 'filesystem' in namespace 'std'; did you mean 'std::__fs::filesystem'?
        namespace fs = std::filesystem;
                       ^~~~~~~~~~~~~~~
                       std::__fs::filesystem
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:259:1: note: namespace 'std::__fs::filesystem' defined here
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:876:58: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM'
  _LIBCPP_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
                                                         ^
In file included from dataset.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:4:
In file included from ../inst/include/z5/util/file_mode.hxx:4:
../inst/include/z5/common.hxx:51:48: error: 'path' is unavailable: introduced in macOS 10.15
        inline fs::path relativeImpl(const fs::path & from, const fs::path & to){
                                               ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:738:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from dataset.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:4:
In file included from ../inst/include/z5/util/file_mode.hxx:4:
../inst/include/z5/common.hxx:51:71: error: 'path' is unavailable: introduced in macOS 10.15
        inline fs::path relativeImpl(const fs::path & from, const fs::path & to){
                                                                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:738:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from dataset.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:4:
In file included from ../inst/include/z5/util/file_mode.hxx:4:
../inst/include/z5/common.hxx:51:20: error: 'path' is unavailable: introduced in macOS 10.15
        inline fs::path relativeImpl(const fs::path & from, const fs::path & to){
                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:738:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from dataset.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:4:
In file included from ../inst/include/z5/util/file_mode.hxx:4:
../inst/include/z5/common.hxx:52:24: error: 'relative' is unavailable: introduced in macOS 10.15
            return fs::relative(from, to);
                       ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:1857:1: note: 'relative' has been explicitly marked unavailable here
relative(const path& __p, const path& __base = current_path()) {
^
In file included from dataset.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:4:
In file included from ../inst/include/z5/util/file_mode.hxx:4:
../inst/include/z5/common.hxx:52:20: error: '~path' is unavailable: introduced in macOS 10.15
            return fs::relative(from, to);
                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:790:3: note: '~path' has been explicitly marked unavailable here
  ~path() = default;
  ^
In file included from dataset.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:4:
In file included from ../inst/include/z5/util/file_mode.hxx:4:
../inst/include/z5/common.hxx:52:20: error: 'path' is unavailable: introduced in macOS 10.15
            return fs::relative(from, to);
                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:764:29: note: 'path' has been explicitly marked unavailable here
  _LIBCPP_INLINE_VISIBILITY path(path&& __p) noexcept
                            ^
In file included from attributes.cpp:1:
In file included from ./helpers.h:9:
In file included from ../inst/include/z5/attributes.hxx:3:
In file included from ../inst/include/z5/handle.hxx:4:
In file included from ../inst/include/z5/util/file_mode.hxx:4:
../inst/include/z5/common.hxx:48:24: error: no namespace named 'filesystem' in namespace 'std'; did you mean 'std::__fs::filesystem'?
        namespace fs = std::filesystem;

...

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:1614:39: note: 'exists' has been explicitly marked unavailable here
inline _LIBCPP_INLINE_VISIBILITY bool exists(const path& __p) {
                                      ^
In file included from RcppExports.cpp:4:
In file included from ./zarr_types.h:4:
../inst/include/z5/filesystem/handle.hxx:30:24: error: 'create_directories' is unavailable: introduced in macOS 10.15
            return fs::create_directories(path_);
                       ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:1545:39: note: 'create_directories' has been explicitly marked unavailable here
inline _LIBCPP_INLINE_VISIBILITY bool create_directories(const path& __p) {
                                      ^
In file included from RcppExports.cpp:4:
In file included from ./zarr_types.h:4:
../inst/include/z5/filesystem/handle.hxx:37:39: error: 'path<char [8], void>' is unavailable: introduced in macOS 10.15
            return fs::exists(path_ / ".zarray");
                                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:772:3: note: 'path<char [8], void>' has been explicitly marked unavailable here
  path(const _Source& __src, format = format::auto_format) {
  ^
In file included from RcppExports.cpp:4:
In file included from ./zarr_types.h:4:
../inst/include/z5/filesystem/handle.hxx:37:39: error: '~path' is unavailable: introduced in macOS 10.15
            return fs::exists(path_ / ".zarray");
                                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:790:3: note: '~path' has been explicitly marked unavailable here
  ~path() = default;
  ^
In file included from RcppExports.cpp:4:
In file included from ./zarr_types.h:4:
../inst/include/z5/filesystem/handle.hxx:37:37: error: 'operator/' is unavailable: introduced in macOS 10.15
            return fs::exists(path_ / ".zarray");
                                    ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:1174:41: note: 'operator/' has been explicitly marked unavailable here
  friend _LIBCPP_INLINE_VISIBILITY path operator/(const path& __lhs,
                                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
2 warnings and 20 errors generated.
2 warnings and 20 errors generated.
make: *** [dataset.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [dataset-handle.o] Error 1
2 warnings and 20 errors generated.
make: *** [attributes.o] Error 1
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘zarr’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/zarr’
Error: Failed to install 'zarr' from GitHub:
  (converted from warning) installation of package ‘/var/folders/j7/z73pwc713473sxx39wdbgb5h0000gn/T//Rtmpslbrku/file51fd1c1c7445/zarr_0.0.0.00000.tar.gz’ had non-zero exit status
@gdkrmr
Copy link
Owner

gdkrmr commented Nov 16, 2020

Nice that someone finds it useful! I am really not sure if I will maintain this package again. Take a look at checkpackage.sh and installpackage.sh, I am not sure what devtools::github does.

@gdkrmr
Copy link
Owner

gdkrmr commented Nov 16, 2020

Looking at the error: The JSON headers use pragmas to do some (evil?) stuff that is not allowed by CRAN. This will make it impossible to get this package into CRAN without modifying the headers. Not sure if this has something to do with it.

@gdkrmr
Copy link
Owner

gdkrmr commented Nov 24, 2020

I have updated the z5 headers and fixed some stuff. The issue seems to be that std::filesystem does not exist on clang on MacOS. I guess that is why the author of z5 is using boostfs on MacOS. There is a Makevars.osx that should work although I cannot test it myself.

@gdkrmr
Copy link
Owner

gdkrmr commented Nov 25, 2020

Makevars.osx doesn't seem to work, but at least github ci produces a similar error.

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