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: unable to build with musl, 'execinfo.h' file not found #22084

Closed
RinCat opened this issue Aug 5, 2022 · 7 comments · Fixed by #22085 or #22152
Closed

BUG: unable to build with musl, 'execinfo.h' file not found #22084

RinCat opened this issue Aug 5, 2022 · 7 comments · Fixed by #22085 or #22152

Comments

@RinCat
Copy link
Contributor

RinCat commented Aug 5, 2022

Describe the issue:

Unable to build with musl since 'execinfo.h' not exists.

Reproduce the code example:

N/A

Error message:

INFO: clang: numpy/core/src/multiarray/temp_elide.c
numpy/core/src/multiarray/temp_elide.c:85:10: fatal error: 'execinfo.h' file not found
#include <execinfo.h>
                    ^~~~~~~~~~~~
1 error generated.


### NumPy/Python version information:

1.23
@RinCat RinCat added the 00 - Bug label Aug 5, 2022
RinCat added a commit to RinCat/numpy that referenced this issue Aug 5, 2022
Backtracing provided by other libraries (e.g. libunwind) on
non-glibc systems does not have execinfo.h.

Fix: numpy#22084
RinCat added a commit to RinCat/numpy that referenced this issue Aug 5, 2022
Backtracing provided by other libraries (e.g. libunwind) on
non-glibc systems does not have execinfo.h.

Fix: numpy#22084
RinCat added a commit to RinCat/numpy that referenced this issue Aug 5, 2022
Backtracing provided by other libraries (e.g. libunwind) on
non-glibc systems does not have execinfo.h.

Fix: numpy#22084
@mattip
Copy link
Member

mattip commented Aug 5, 2022

How are we successfully building wheels for musl if this cannot succeed?

RinCat added a commit to RinCat/numpy that referenced this issue Aug 5, 2022
Backtracing provided by other libraries (e.g. libunwind) on
non-glibc systems does not have execinfo.h.

Fix: numpy#22084
@RinCat
Copy link
Contributor Author

RinCat commented Aug 5, 2022

Maybe your system doesn't have a library like libunwind so backtracing is turned off.
I do use clang + musl. This error actually common https://www.google.com/search?q=%27execinfo.h%27+file+not+found+musl

@seberg
Copy link
Member

seberg commented Aug 5, 2022

If execinfo is required for backtracing in this case, how come we can just skip the include? Shouldn't some symbol from it be in use at runtime?

@charris
Copy link
Member

charris commented Aug 5, 2022

Shouldn't some symbol from it be in use at runtime?

execinfo also appears in numpy/linalg/umath_linalg.cpp in debug mode, but the import is disabled. @RinCat What distro are you using?

@RinCat
Copy link
Contributor Author

RinCat commented Aug 5, 2022

If execinfo is required for backtracing in this case, how come we can just skip the include? Shouldn't some symbol from it be in use at runtime?

execinfo is not required for other backtracing libraries.

It should have # include <libunwind.h> if LDFLAGS="-unwindlib=libunwind" did not set.
I will try to add a header test.

@RinCat
Copy link
Contributor Author

RinCat commented Aug 5, 2022

Shouldn't some symbol from it be in use at runtime?

execinfo also appears in numpy/linalg/umath_linalg.cpp in debug mode, but the import is disabled. @RinCat What distro are you using?

I am using Gentoo, however it is experimental musl + clang system which not have official images.
If someone wanna try, I can provide a LXD image.

@RinCat
Copy link
Contributor Author

RinCat commented Aug 5, 2022

@RinCat RinCat reopened this Aug 18, 2022
RinCat added a commit to RinCat/numpy that referenced this issue Aug 18, 2022
Some system (e.g. musl) do not have "execinfo.h", and the backtracking
is provided by libunwind.

Fix: numpy#22084
RinCat added a commit to RinCat/numpy that referenced this issue Aug 18, 2022
Some system (e.g. musl) do not have "execinfo.h", and the backtracking
is provided by libunwind.

Fix: numpy#22084
@rgommers rgommers added this to the 1.23.3 release milestone Aug 31, 2022
charris pushed a commit to charris/numpy that referenced this issue Sep 6, 2022
Some system (e.g. musl) do not have "execinfo.h", and the backtracking
is provided by libunwind.

Fix: numpy#22084
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants