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

BUG: backtrace function detected but not present (aarch64) #25696

Closed
stefanv opened this issue Jan 26, 2024 · 1 comment · Fixed by #25709
Closed

BUG: backtrace function detected but not present (aarch64) #25696

stefanv opened this issue Jan 26, 2024 · 1 comment · Fixed by #25709
Labels

Comments

@stefanv
Copy link
Contributor

stefanv commented Jan 26, 2024

Describe the issue:

The backtrace function is detected, but compilation fails with:

-c ../numpy/_core/src/multiarray/temp_elide.c
../numpy/_core/src/multiarray/temp_elide.c:150:13: error: call to undeclared function 'backtrace'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  150 |     nptrs = backtrace(buffer, NPY_MAX_STACKSIZE);
      |             ^
In the meson build file we have:
optional_misc_funcs = [
  'backtrace',
  'madvise',
]
foreach func: optional_misc_funcs
  if cc.has_function(func,
      include_directories: inc_curdir,
      prefix: '#include "feature_detection_misc.h"'
    )
    cdata.set10('HAVE_' + func.to_upper(), true)
  endif
endforeach

So, first I thought that the problem lies with feature_detection_misc.h being included, but that's not it. The test passes without it too.

Compiler is clang 17.

Reproduce the code example:

N/A

Error message:

N/A

Python and NumPy Versions:

Python 3.11, meson 1.3.1, meson-python 0.15.0

Runtime Environment:

No response

Context for the issue:

No response

@stefanv stefanv changed the title BUG: backtrace function detected but not present on aarch64 BUG: backtrace function detected but not present (aarch64) Jan 26, 2024
@stefanv
Copy link
Contributor Author

stefanv commented Jan 27, 2024

Looks like clang 16 and upward requires the header definition. Added in #25709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant