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

Make backtrace support depends on execinfo.h existence #206

Merged

Conversation

tSed
Copy link
Contributor

@tSed tSed commented May 16, 2016

In some C-libraries (like uclibc), backtrace support is optional, so the
execinfo.h may not exist.

This change adds the check for execinfo.h header and conditionaly enable
backtrace support.

This issue has been triggered by Buildroot farms:
http://autobuild.buildroot.org/results/391/391e71a988250ea66ec4dbee6f60fdce9eaf2766/build-end.log

Signed-off-by: Samuel Martin s.martin49@gmail.com

@@ -483,6 +483,12 @@ def configure(conf):
defines=['_GNU_SOURCE'],
mandatory=False)

# Check for backtrace support
conf.check_cc(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karllinden
Copy link
Contributor

See comment on the wscript file. Otherwise it looks good.

buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this pull request May 17, 2016
This change adds a patch checking for the presence of execinfo.h header
and enabling the backtrace support depending on the check result.

Fixes:
  http://autobuild.buildroot.org/results/415/415e2100dc59d35e58646c07f7cdccabecdda966/
  http://autobuild.buildroot.org/results/43c/43ca1b103434ae582fdf93cb5912b311960f303b/
  http://autobuild.buildroot.org/results/391/391e71a988250ea66ec4dbee6f60fdce9eaf2766/
  ...

Adapted from the PR:
  jackaudio/jack2#206

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
@tSed tSed force-pushed the fix-build-when-execinfo.b-is-not-available branch from a8ee928 to 198c631 Compare May 19, 2016 20:35
@@ -483,6 +483,13 @@ def configure(conf):
defines=['_GNU_SOURCE'],
mandatory=False)

# Check for backtrace support
conf.check(
compiler='c',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why compiler='c'? Waf should be able to guess that. See https://github.com/waf-project/waf/blob/master/waflib/Tools/c_config.py#L472

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I'm not familiar with waf...

@karllinden
Copy link
Contributor

I'm glad you changed from check_cc to check, but see my comment.

In some C-libraries (like uclibc), backtrace support is optional, so the
execinfo.h may not exist.

This change adds the check for execinfo.h header and conditionaly enable
backtrace support.

This issue has been triggered by Buildroot farms:
  http://autobuild.buildroot.org/results/391/391e71a988250ea66ec4dbee6f60fdce9eaf2766/build-end.log

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
@tSed tSed force-pushed the fix-build-when-execinfo.b-is-not-available branch from 198c631 to 8ac6bf1 Compare May 20, 2016 20:47
@tSed
Copy link
Contributor Author

tSed commented Jun 2, 2016

ping?

@adiknoth adiknoth merged commit a96111a into jackaudio:master Jan 10, 2017
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 this pull request may close these issues.

3 participants