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

Cmake option to turn off backtrace? #491

Closed
travankor opened this issue Oct 18, 2018 · 1 comment · Fixed by #510
Closed

Cmake option to turn off backtrace? #491

travankor opened this issue Oct 18, 2018 · 1 comment · Fixed by #510

Comments

@travankor
Copy link
Contributor

I tried to compile IVAN on musl libc (Linux) and it didn't work since execinfo is glibc-specific (not POSIX). For people that don't need to do debugging, it would be nice if the backtrace could be turned off as a cmake option.

Alternatively, maybe something like libunwind can supplement/replace execinfo. https://www.nongnu.org/libunwind/

@AquariusPower
Copy link
Contributor

The same way we use the -DWIZARD seen at INSTALL info, we could have -DBACKTRACE (I think -DDEBUG may conflict with something more generic but I may be wrong).

Then, instead of ex. #ifndef WIN32 wherever backtrace() is called, we could instead #ifdef BACKTRACE.

Do you think you could propose (code/test) such a patch (PR)?
Basically condition everywhere that is coded #include <execinfo.h> to such define too, then catch everywhere it is required :)

It would also be good to be sure about other possible specific requirements by musl libc, I mean, not only about backtrace() would such PR be.

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

Successfully merging a pull request may close this issue.

2 participants