Skip to content

Build error of lua plugin #10318

@masaori335

Description

@masaori335
lua/ts_lua_log.cc:21:24: error: redefinition of 'log' as different kind of symbol
static TSTextLogObject log;
                       ^
/opt/brew/opt/llvm@16/bin/../include/c++/v1/math.h:827:1: note: previous definition is here
log(_A1 __x) _NOEXCEPT {return __builtin_log((double)__x);}
^
lua/ts_lua_log.cc:67:11: error: no matching function for call to 'TSTextLogObjectCreate'
  error = TSTextLogObjectCreate(log_name, log_mode, &log);
          ^~~~~~~~~~~~~~~~~~~~~
../include/ts/ts.h:2287:16: note: candidate function not viable: no overload of 'log' matching 'TSTextLogObject *' (aka 'tsapi::c::tsapi_textlogobject **') fo
r 3rd argument
  TSReturnCode TSTextLogObjectCreate(const char *filename, int mode, TSTextLogObject *new_log_obj);
               ^
lua/ts_lua_log.cc:69:8: error: reference to overloaded function could not be resolved; did you mean to call it?
  if (!log || error == TS_ERROR) {
       ^~~
/opt/brew/opt/llvm@16/bin/../include/c++/v1/math.h:827:1: note: possible target for call
log(_A1 __x) _NOEXCEPT {return __builtin_log((double)__x);}
^
/opt/brew/opt/llvm@16/bin/../include/c++/v1/math.h:821:42: note: possible target for call
inline _LIBCPP_HIDE_FROM_ABI long double log(long double __x) _NOEXCEPT {return __builtin_logl(__x);}
                                         ^
/opt/brew/opt/llvm@16/bin/../include/c++/v1/math.h:817:30: note: possible target for call
_LIBCPP_HIDE_FROM_ABI double log(double __x) _NOEXCEPT {
                             ^
/opt/brew/opt/llvm@16/bin/../include/c++/v1/math.h:814:42: note: possible target for call
inline _LIBCPP_HIDE_FROM_ABI float       log(float __x) _NOEXCEPT       {return __builtin_logf(__x);}
                                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:373:15: note: possible target for call
extern double log(double);
              ^
lua/ts_lua_log.cc:90:7: error: reference to overloaded function could not be resolved; did you mean to call it?
  if (log) {
      ^~~
/opt/brew/opt/llvm@16/bin/../include/c++/v1/math.h:827:1: note: possible target for call
log(_A1 __x) _NOEXCEPT {return __builtin_log((double)__x);}
^
/opt/brew/opt/llvm@16/bin/../include/c++/v1/math.h:821:42: note: possible target for call
inline _LIBCPP_HIDE_FROM_ABI long double log(long double __x) _NOEXCEPT {return __builtin_logl(__x);}
                                         ^
/opt/brew/opt/llvm@16/bin/../include/c++/v1/math.h:817:30: note: possible target for call
_LIBCPP_HIDE_FROM_ABI double log(double __x) _NOEXCEPT {
                             ^
/opt/brew/opt/llvm@16/bin/../include/c++/v1/math.h:814:42: note: possible target for call
inline _LIBCPP_HIDE_FROM_ABI float       log(float __x) _NOEXCEPT       {return __builtin_logf(__x);}
                                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/math.h:373:15: note: possible target for call
extern double log(double);
              ^
lua/ts_lua_log.cc:91:5: error: no matching function for call to 'TSTextLogObjectWrite'
    TSTextLogObjectWrite(log, (char *)text, nullptr);
    ^~~~~~~~~~~~~~~~~~~~
../include/ts/ts.h:2308:16: note: candidate function not viable: no overload of 'log' matching 'TSTextLogObject' (aka 'tsapi::c::tsapi_textlogobject *') for 1
st argument
  TSReturnCode TSTextLogObjectWrite(TSTextLogObject the_object, const char *format, ...) TS_PRINTFLIKE(2, 3);
               ^
lua/ts_lua_log.cc:109:7: error: no matching function for call to 'TSTextLogObjectDestroy'
  if (TSTextLogObjectDestroy(log) != TS_SUCCESS) {
      ^~~~~~~~~~~~~~~~~~~~~~
../include/ts/ts.h:2330:16: note: candidate function not viable: no overload of 'log' matching 'TSTextLogObject' (aka 'tsapi::c::tsapi_textlogobject *') for 1
st argument
  TSReturnCode TSTextLogObjectDestroy(TSTextLogObject the_object);
               ^
6 errors generated.
  • llvm: 16.0.6

Metadata

Metadata

Assignees

Labels

Buildwork related to build configuration or environment

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