Skip to content

[Build] OPENCL and CPU errors for Mac OS  #2944

Description

@turgut090

Description

This is related to #2938

Error Log OpenCL

/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:36:26: error: 
      constexpr function's return type 'std::string' (aka 'basic_string<char,
      char_traits<char>, allocator<char> >') is not a literal type
AF_CONSTEXPR std::string getOpString() {
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:4317:64: note: 
      'basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>
      >' is not literal because it is not an aggregate and has no constexpr
      constructors other than copy or move constructors
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_str...
                                                               ^
In file included from /Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:10:
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:62:28: error: 
      no matching function for call to 'getOpString'
        DefineKeyValue(OP, getOpString<op>()),
                           ^~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/common/TemplateArg.hpp:29:61: note: 
      expanded from macro 'DefineKeyValue'
#define DefineKeyValue(key, arg) " -D " #key "=" + toString(arg)
                                                            ^~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:76:27: note: 
      in instantiation of function template specialization
      'opencl::kernel::fetchKernel<float, af_add_t>' requested here
    auto sparseArithCSR = fetchKernel<T, op>("sparseArithCSR", src);
                          ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:68:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCSR<float, af_add_t>' requested here
            kernel::sparseArithOpCSR<T, op>(out, lhs.getValues(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:36:26: note: 
      candidate template ignored: substitution failure [with op = af_add_t]
AF_CONSTEXPR std::string getOpString() {
                         ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:93:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCOO = fetchKernel<T, op>("sparseArithCOO", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:73:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCOO<float, af_add_t>' requested here
            kernel::sparseArithOpCOO<T, op>(out, lhs.getValues(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_add_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:62:28: error: 
      no matching function for call to 'getOpString'
        DefineKeyValue(OP, getOpString<op>()),
                           ^~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/common/TemplateArg.hpp:29:61: note: 
      expanded from macro 'DefineKeyValue'
#define DefineKeyValue(key, arg) " -D " #key "=" + toString(arg)
                                                            ^~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:76:27: note: 
      in instantiation of function template specialization
      'opencl::kernel::fetchKernel<float, af_sub_t>' requested here
    auto sparseArithCSR = fetchKernel<T, op>("sparseArithCSR", src);
                          ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:68:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCSR<float, af_sub_t>' requested here
            kernel::sparseArithOpCSR<T, op>(out, lhs.getValues(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:36:26: note: 
      candidate template ignored: substitution failure [with op = af_sub_t]
AF_CONSTEXPR std::string getOpString() {
                         ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:93:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCOO = fetchKernel<T, op>("sparseArithCOO", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:73:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCOO<float, af_sub_t>' requested here
            kernel::sparseArithOpCOO<T, op>(out, lhs.getValues(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_sub_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:62:28: error: 
      no matching function for call to 'getOpString'
        DefineKeyValue(OP, getOpString<op>()),
                           ^~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/common/TemplateArg.hpp:29:61: note: 
      expanded from macro 'DefineKeyValue'
#define DefineKeyValue(key, arg) " -D " #key "=" + toString(arg)
                                                            ^~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:76:27: note: 
      in instantiation of function template specialization
      'opencl::kernel::fetchKernel<float, af_mul_t>' requested here
    auto sparseArithCSR = fetchKernel<T, op>("sparseArithCSR", src);
                          ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:68:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCSR<float, af_mul_t>' requested here
            kernel::sparseArithOpCSR<T, op>(out, lhs.getValues(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:36:26: note: 
      candidate template ignored: substitution failure [with op = af_mul_t]
AF_CONSTEXPR std::string getOpString() {
                         ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:93:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCOO = fetchKernel<T, op>("sparseArithCOO", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:73:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCOO<float, af_mul_t>' requested here
            kernel::sparseArithOpCOO<T, op>(out, lhs.getValues(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_mul_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:62:28: error: 
      no matching function for call to 'getOpString'
        DefineKeyValue(OP, getOpString<op>()),
                           ^~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/common/TemplateArg.hpp:29:61: note: 
      expanded from macro 'DefineKeyValue'
#define DefineKeyValue(key, arg) " -D " #key "=" + toString(arg)
                                                            ^~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:76:27: note: 
      in instantiation of function template specialization
      'opencl::kernel::fetchKernel<float, af_div_t>' requested here
    auto sparseArithCSR = fetchKernel<T, op>("sparseArithCSR", src);
                          ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:68:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCSR<float, af_div_t>' requested here
            kernel::sparseArithOpCSR<T, op>(out, lhs.getValues(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:36:26: note: 
      candidate template ignored: substitution failure [with op = af_div_t]
AF_CONSTEXPR std::string getOpString() {
                         ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:93:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCOO = fetchKernel<T, op>("sparseArithCOO", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:73:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCOO<float, af_div_t>' requested here
            kernel::sparseArithOpCOO<T, op>(out, lhs.getValues(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_div_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:110:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCSR = fetchKernel<T, op>("sparseArithCSR2", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:97:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCSR<float, af_add_t>' requested here
            kernel::sparseArithOpCSR<T, op>(out.getValues(), out.getRowIdx(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_add_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:127:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCOO = fetchKernel<T, op>("sparseArithCOO2", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:101:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCOO<float, af_add_t>' requested here
            kernel::sparseArithOpCOO<T, op>(out.getValues(), out.getRowIdx(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_add_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:110:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCSR = fetchKernel<T, op>("sparseArithCSR2", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:97:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCSR<float, af_sub_t>' requested here
            kernel::sparseArithOpCSR<T, op>(out.getValues(), out.getRowIdx(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_sub_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:127:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCOO = fetchKernel<T, op>("sparseArithCOO2", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:101:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCOO<float, af_sub_t>' requested here
            kernel::sparseArithOpCOO<T, op>(out.getValues(), out.getRowIdx(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_sub_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:110:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCSR = fetchKernel<T, op>("sparseArithCSR2", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:97:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCSR<float, af_mul_t>' requested here
            kernel::sparseArithOpCSR<T, op>(out.getValues(), out.getRowIdx(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_mul_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:127:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCOO = fetchKernel<T, op>("sparseArithCOO2", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:101:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCOO<float, af_mul_t>' requested here
            kernel::sparseArithOpCOO<T, op>(out.getValues(), out.getRowIdx(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_mul_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:110:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCSR = fetchKernel<T, op>("sparseArithCSR2", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:97:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCSR<float, af_div_t>' requested here
            kernel::sparseArithOpCSR<T, op>(out.getValues(), out.getRowIdx(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_div_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:127:27: error: 
      no matching function for call to 'fetchKernel'
    auto sparseArithCOO = fetchKernel<T, op>("sparseArithCOO2", src);
                          ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:101:21: note: 
      in instantiation of function template specialization
      'opencl::kernel::sparseArithOpCOO<float, af_div_t>' requested here
            kernel::sparseArithOpCOO<T, op>(out.getValues(), out.getRowIdx(),
                    ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_div_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:180:20: error: 
      no matching function for call to 'fetchKernel'
    auto arithOp = fetchKernel<T, op>(
                   ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:139:13: note: 
      in instantiation of function template specialization
      'opencl::kernel::ssArithCSR<float, af_add_t>' requested here
    kernel::ssArithCSR<T, op>(outValues, outColIdx, outRowIdx, M, N, nnzA,
            ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_add_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:180:20: error: 
      no matching function for call to 'fetchKernel'
    auto arithOp = fetchKernel<T, op>(
                   ^~~~~~~~~~~~~~~~~~
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/sparse_arith.cpp:139:13: note: 
      in instantiation of function template specialization
      'opencl::kernel::ssArithCSR<float, af_sub_t>' requested here
    kernel::ssArithCSR<T, op>(outValues, outColIdx, outRowIdx, M, N, nnzA,
            ^
/Users/turgutabdullayev/Documents/arrayfire/src/backend/opencl/kernel/sparse_arith.hpp:48:6: note: 
      candidate template ignored: substitution failure [with T = float, op =
      af_sub_t]
auto fetchKernel(const std::string key, const std::string &additionalSrc,
     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make[2]: *** [src/backend/opencl/CMakeFiles/afopencl.dir/sparse_arith.cpp.o] Error 1
make[1]: *** [src/backend/opencl/CMakeFiles/afopencl.dir/all] Error 2
make: *** [all] Error 2
turgutabdullayev@MacBook-Pro build %

Error Log CPU

In file included from /usr/local/include/boost/stacktrace.hpp:15:
In file included from /usr/local/include/boost/stacktrace/frame.hpp:20:
In file included from /usr/local/include/boost/stacktrace/safe_dump_to.hpp:217:
/usr/local/include/boost/stacktrace/detail/collect_unwind.ipp:33:2: error: 
      "Boost.Stacktrace requires `_Unwind_Backtrace` function. Define
      `_GNU_SOURCE` macro or `BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED` if
      _Unwind_Backtrace is available without `_GNU_SOURCE`."
#error "Boost.Stacktrace requires `_Unwind_Backtrace` function. Define `...
 ^
1 error generated.
make[2]: *** [src/api/unified/CMakeFiles/af.dir/algorithm.cpp.o] Error 1
make[1]: *** [src/api/unified/CMakeFiles/af.dir/all] Error 2
make: *** [all] Error 2
turgutabdullayev@MacBook-Pro build % 


Build Environment

tt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions