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

gklib build failed with Clang 17.0.2 #35

Open
Cheney-W opened this issue Mar 13, 2024 · 0 comments
Open

gklib build failed with Clang 17.0.2 #35

Cheney-W opened this issue Mar 13, 2024 · 0 comments

Comments

@Cheney-W
Copy link

Here is the error encountered by a user when installing gklib:arm64-android using vcpkg with clang 17.0.2:

error.c:205:10: error: call to undeclared function 'backtrace'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  size = backtrace(array, 10);
         ^
error.c:206:13: error: call to undeclared function 'backtrace_symbols'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  strings = backtrace_symbols(array, size);
            ^
error.c:206:11: error: incompatible integer to pointer conversion assigning to 'char **' from 'int' [-Wint-conversion]
  strings = backtrace_symbols(array, size);
          ^ 

I think to solve this problem, it may be necessary to directly add #include <execinfo.h> in error.c file, or declare function using the extern keyword before its invocation:

extern int backtrace(void **buffer, int size);
extern char **backtrace_symbols(void *const *buffer, int size);
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

1 participant