Skip to content

Make libbacktrace a dependency for all platforms (instead of only darwin)#2042

Merged
climbfuji merged 2 commits into
JCSDA:developfrom
srherbener:feature/add-libbacktrace
Jun 15, 2026
Merged

Make libbacktrace a dependency for all platforms (instead of only darwin)#2042
climbfuji merged 2 commits into
JCSDA:developfrom
srherbener:feature/add-libbacktrace

Conversation

@srherbener

@srherbener srherbener commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

This PR removes the "if darwin" qualifier on defining libbacktrace as a dependency, effectively making it a dependency for all platforms.

Dependencies

None

Issues addressed

Resolves #1965

Applications affected

This goes into the base_env package so it impacts any application using that package (which I guess is most). The driver was fixing this issue: jcsda-internal/ioda/issues/1699, and I realized that having libbacktrace might be helpful across more than JEDI applications. If not, and the consensus is to limit this to JEDI applications, I'm okay with that.

Systems affected

See above

Testing

  • CI: Note whether the automatic tests (GitHub actions tests that run automatically for every commit) pass or not
    • GitHub actions CI tests pass
    • GitHub actions CI tests do not pass (provide explanation)
    • GitHub actions CI tests skipped (provide explanation if necessary)
  • New tests added: List and describe any new tests added to GitHub actions
    • ...
  • Additional testing: Add information on any additional tests conducted
    • ...

Checklist

  • This PR addresses one issue/problem/enhancement or has a very good reason for not doing so.
  • These changes have been tested on the affected systems and applications.
  • All dependency PRs/issues have been resolved and this PR can be merged.
  • All necessary updates to the documentation (spack-stack wiki) will be made when this PR is merged

@climbfuji climbfuji left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That's fine with me. The library has minimal dependencies, and all of them are already in spack-stack environments as far as I can tell. As long as the CI tests pass, good from my end.

@AlexanderRichert-NOAA

Copy link
Copy Markdown
Collaborator

What does the package do? And why base_env specifically?

@climbfuji

climbfuji commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

@AlexanderRichert-NOAA it's always been in base-env, was one of the first packages ever added. @srherbener can probably provide you with the details from the IODA issue linked in the PR description if you can't access the page - it describes why the package is useful also on Linux platforms, not just macOS. I am ok moving it to jedi-base-env if that sounds better to you.

@AlexanderRichert-NOAA

Copy link
Copy Markdown
Collaborator

I'd prefer to move it elsewhere-- Ideally I'd like to get it to where, say, spack install ufs-weather-model-env just installs UFSWM dependencies without other extra packages.

@srherbener

Copy link
Copy Markdown
Contributor Author

@AlexanderRichert-NOAA no problem moving it to jedi-base-env.

libbacktrace provides an in-memory translation of symbol addresses to their corresponding line in source code for a system stack trace dump when an exception occurs. An alternate method for this is to use addr2line, but this is a separate binary (like a system command) of which you have to fork off a child process and ingest the output. libbacktrace's in-memory nature makes it run orders of magnitude faster We want libbacktrace to be always available for our CI testing which includes checks for error conditions that throw exceptions (which include the stack traces that were running very slowly due to addr2line).

@AlexanderRichert-NOAA

Copy link
Copy Markdown
Collaborator

Thanks for the info @srherbener!

@srherbener

Copy link
Copy Markdown
Contributor Author

@climbfuji, @AlexanderRichert-NOAA I have moved the libbacktrace dependency from base-env to jedi-base-env.

@AlexanderRichert-NOAA AlexanderRichert-NOAA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @srherbener

@climbfuji climbfuji merged commit b4adacf into JCSDA:develop Jun 15, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in spack-stack-2.2.x (2026 Q?) Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[INSTALL]: libbacktrace

3 participants