tylermorganwall / rayvertex

3D Software Rasterizer for R
https://www.rayvertex.com
65 stars 2 forks source link

Installation failing (R4.1.0, macOS Big Sur 11.4) #2

Closed coolbutuseless closed 3 years ago

coolbutuseless commented 3 years ago

Installation via devtools failing on my macOS11.4

Installation output attached below.

R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.4
> devtools::install_github("tylermorganwall/rayvertex")
Downloading GitHub repo tylermorganwall/rayvertex@HEAD
✓  checking for file ‘/private/var/folders/5p/78cv9fvn4xn_rbgxpx51q5n80000gn/T/RtmpxF6cQM/remotes38e74e11f542/tylermorganwall-rayvertex-6bcb46a/DESCRIPTION’ ...
─  preparing ‘rayvertex’: (341ms)
✓  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 ‘rayvertex_0.1.tar.gz’

* installing *source* package ‘rayvertex’ ...
** using staged installation
** libs
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/spacefillr/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include' -I/usr/local/include  -I../src/glm -I../src/glm/gtc -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:57:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/DataFrame.h:136:18: warning: unused variable 'data' [-Wunused-variable]
            SEXP data = Parent::get__();
                 ^
1 warning generated.
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/spacefillr/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include' -I/usr/local/include  -I../src/glm -I../src/glm/gtc -fPIC  -Wall -g -O2  -c filltri.cpp -o filltri.o
In file included from filltri.cpp:1:
In file included from ./filltri.h:5:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:57:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/DataFrame.h:136:18: warning: unused variable 'data' [-Wunused-variable]
            SEXP data = Parent::get__();
                 ^
In file included from filltri.cpp:1:
In file included from ./filltri.h:7:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread.h:9:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/RMonitor.hpp:44:33: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    RMonitor(RMonitor const&) = delete;
                                ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/RMonitor.hpp:46:22: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    RMonitor(RMonitor&&) = delete;
                     ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/RMonitor.hpp:46:28: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    RMonitor(RMonitor&&) = delete;
                           ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/RMonitor.hpp:48:44: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    RMonitor& operator=(RMonitor const&) = delete;
                                           ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/RMonitor.hpp:50:34: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    RMonitor& operator=(RMonitor &&) = delete;
                                 ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/RMonitor.hpp:50:40: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    RMonitor& operator=(RMonitor &&) = delete;
                                       ^
In file included from filltri.cpp:1:
In file included from ./filltri.h:7:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread.h:11:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:29:16: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    Thread() = default;
               ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:30:23: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    Thread(Thread&) = delete;
                      ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:31:29: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    Thread(const Thread&) = delete;
                            ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:32:18: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    Thread(Thread&& other)
                 ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:37:35: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template<class Function, class... Args> explicit
                                  ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:38:20: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    Thread(Function&& f, Args&&... args)
                   ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:38:30: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    Thread(Function&& f, Args&&... args)
                             ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:49:14: error: expected ';' at end of declaration list
    ~Thread() noexcept
             ^
             ;
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:58:29: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    Thread& operator=(Thread&& other)
                            ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:66:29: error: expected ';' at end of declaration list
    void swap(Thread& other) noexcept
                            ^
                            ;
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:40:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
        auto f0 = [=] () {
        ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:40:19: error: expected expression
        auto f0 = [=] () {
                  ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:44:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
        auto task = std::packaged_task<void()>(f0);
        ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:46:9: error: use of undeclared identifier 'thread_'
        thread_ = std::thread(std::move(task));
        ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Thread.hpp:60:13: error: use of undeclared identifier 'thread_'
        if (thread_.joinable())
            ^
In file included from filltri.cpp:1:
In file included from ./filltri.h:7:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread.h:12:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Batch.hpp:33:22: error: expected '(' for function-style cast or type construction
        return {Batch{0, 0}};
                ~~~~~^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/Batch.hpp:45:27: error: expected '(' for function-style cast or type construction
        batches[k] = Batch{bBegin, bBegin + bSize};
                     ~~~~~^
In file included from filltri.cpp:1:
In file included from ./filltri.h:7:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread.h:13:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:29:26: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    ThreadPool(ThreadPool&&) = delete;
                         ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:29:32: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    ThreadPool(ThreadPool&&) = delete;
                               ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:30:37: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    ThreadPool(const ThreadPool&) = delete;
                                    ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:34:18: error: expected ';' at end of declaration list
    ~ThreadPool() noexcept;
                 ^
                 ;
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:36:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    ThreadPool& operator=(const ThreadPool&) = delete;
                                               ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:37:37: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    ThreadPool& operator=(ThreadPool&& other) = delete;
                                    ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:37:49: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    ThreadPool& operator=(ThreadPool&& other) = delete;
                                                ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:39:28: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template<class F, class... Args>
                           ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:40:16: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    void push(F&& f, Args&&... args);
               ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:40:26: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    void push(F&& f, Args&&... args);
                         ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:42:28: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template<class F, class... Args>
                           ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:43:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
    auto pushReturn(F&& f, Args&&... args)
    ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:43:22: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    auto pushReturn(F&& f, Args&&... args)
                     ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:43:32: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    auto pushReturn(F&& f, Args&&... args)
                               ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:43:5: error: 'auto' not allowed in function return type
    auto pushReturn(F&& f, Args&&... args)
    ^~~~
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:43:43: error: expected ';' at end of declaration list
    auto pushReturn(F&& f, Args&&... args)
                                          ^
                                          ;
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:47:15: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    void map(F&& f, I &&items);
              ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:47:23: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    void map(F&& f, I &&items);
                      ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:52:30: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
                            F&& f,
                             ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:56:44: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    inline void parallelForEach(I& items, F&& f, size_t nBatches = 0);
                                           ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:64:37: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    void doJob(std::function<void()>&& job);
                                    ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:64:21: warning: 'function<void ()>' is deprecated: Using std::function in C++03 is not supported anymore. Please upgrade to C++11 or later, or use a different type [-Wdeprecated-declarations]
    void doJob(std::function<void()>&& job);
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:1444:27: note: 'function<void ()>' has been explicitly marked deprecated here
template<class _Fp> class _LIBCPP_DEPRECATED_CXX03_FUNCTION _LIBCPP_TEMPLATE_VIS function; // undefined
                          ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:1439:24: note: expanded from macro '_LIBCPP_DEPRECATED_CXX03_FUNCTION'
        __attribute__((deprecated("Using std::function in C++03 is not supported anymore. Please upgrade to C++11 or later, or use a different type")))
                       ^
In file included from filltri.cpp:1:
In file included from ./filltri.h:7:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread.h:13:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:76:36: warning: use of right-shift operator ('>>') in template argument will require parentheses in C++11 [-Wc++11-compat]
    std::queue<std::function<void()>> jobs_;  // the task que
                                   ^
                             (             )
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:76:39: error: use of undeclared identifier 'jobs_'
    std::queue<std::function<void()>> jobs_;  // the task que
                                      ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:76:44: error: expected '>'
    std::queue<std::function<void()>> jobs_;  // the task que
                                           ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:76:29: note: to match this '<'
    std::queue<std::function<void()>> jobs_;  // the task que
                            ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:76:44: error: expected a type
    std::queue<std::function<void()>> jobs_;  // the task que
                                           ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:76:44: error: expected '>'
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:76:15: note: to match this '<'
    std::queue<std::function<void()>> jobs_;  // the task que
              ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:82:12: error: function definition does not declare parameters
    size_t numBusy_{0};
           ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:83:10: error: function definition does not declare parameters
    bool stopped_{false};
         ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:89:5: error: delegating constructors are permitted only in C++11
    ThreadPool(std::thread::hardware_concurrency())
    ^~~~~~~~~~
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/ThreadPool.hpp:103:34: error: expected function body after function declarator
inline ThreadPool::~ThreadPool() noexcept
                                 ^
In file included from filltri.cpp:1:
In file included from ./filltri.h:7:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread.h:14:
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/parallelFor.hpp:43:59: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
inline void parallelFor(ptrdiff_t begin, ptrdiff_t size, F&& f,
                                                          ^
/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppThread/include/RcppThread/parallelFor.hpp:81:40: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
inline void parallelForEach(I& items, F&& f,
                                       ^
filltri.cpp:36:7: warning: unused variable 'nx' [-Wunused-variable]
  int nx = image.width();
      ^
40 warnings and 18 errors generated.
make: *** [filltri.o] Error 1
ERROR: compilation failed for package ‘rayvertex’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/rayvertex’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/5p/78cv9fvn4xn_rbgxpx51q5n80000gn/T//RtmpxF6cQM/file38e77cfce818/rayvertex_0.1.tar.gz’ had non-zero exit status
tylermorganwall commented 3 years ago

Can you install the RcppThread library separately?

tylermorganwall commented 3 years ago

This looks to be an RcppThread (https://github.com/tnagler/RcppThread) issue, but I'd like to confirm before opening an issue.

coolbutuseless commented 3 years ago

RcppThread cleanly installs from both CRAN and github.

> packageVersion('Rcpp')
[1] ‘1.0.6’
> packageVersion('RcppThread')
[1] ‘1.0.0’

I'm still getting the same error when I try and install rayvertex.

Let me know if there's anything I can run on my machine to help debug.

tylermorganwall commented 3 years ago

So the errors appear when you install RcppThread by itself? (i.e. it's not only when you install rayvertex)

tylermorganwall commented 3 years ago

It looks like you aren't compiling with C++11 support. What version of clang++ are you using?

 clang++ -v

If you add CXX11STD = -std=gnu++11 to your Makeconf file (mine is located here in macOS: /Library/Frameworks/R.framework/Versions/4.1/Resources/etc/), does it compile then?

coolbutuseless commented 3 years ago

CXX11STD = -std=gnu++11 is set within my global Makeconf

However, a Makevars at the user level was interfering with that definition. I've deleted the user-level Makevars and now it compiles.

Thanks for helping out on what is obviously not an issue with {rayvertex} but is a PEBKAC.