Skip to content

Conversation

@eddelbuettel
Copy link
Member

@eddelbuettel eddelbuettel commented Jan 13, 2026

PR #1401 updated the detection for execinfo.h by relying on a header-finding macro directly which is powerful. It also removed a set of #if defined(...) tests precluding several architectures from trying. This now bit us in issue #1442 as on FreeBSD, the header is found ... but also requires a library.

Now, we could try to use autoconf to find header and library, and attempt to compile a test program (as we now do for OpenMP in RcppArmadillo and RcppEigen). But given that the affected architectures here are on the less-widely used side with difficult access for us to test and refine, a simpler strategy would be to punt and again rely on a set of #if define() so this PR restores this. That is plain KISS Principle: Keep it Simple (and) Stupid.

Checklist

  • Code compiles correctly
  • R CMD check still passes all tests
  • Preferably, new tests were added which fail without the change
  • Document the changes by file in ChangeLog

@eddelbuettel eddelbuettel self-assigned this Jan 13, 2026
Copy link
Contributor

@kevinushey kevinushey left a comment

Choose a reason for hiding this comment

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

LGTM!

@eddelbuettel eddelbuettel merged commit b96082e into master Jan 13, 2026
26 checks passed
@eddelbuettel eddelbuettel deleted the feature/refine_demangler_setting branch January 13, 2026 17:31
@bastistician
Copy link

FWIW and sorry to be a nuisance, I had suggested a KISS solution in #1400 (the "whitelist" approach, where I did mention that "BSDs have long provided execinfo, too, but a web search suggests they require separate linking with -lexecinfo"). That would be much simpler than the now-restored bunch of conditionals (including the non-standard __MUSL__), but I understand that this is now settled and should work everywhere, which is the main outcome of this revision. Thanks for maintaining portability!

@eddelbuettel
Copy link
Member Author

Thanks. Might it be worthwhile to add the hint about linking needed to the short paragraph in R-exts.texi?

Header @file{execinfo.h} is only available on a few OSes: formerly nor
in MacOS nor Solaris, and currently not on Linux systems (such as Alpine
Linux) using @code{musl}.

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.

5 participants