Skip to content

new custom dependency lookup for libexecinfo #14753

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neheb
Copy link
Contributor

@neheb neheb commented Jun 30, 2025

Basically copy/paste from the iconv dependency.

@neheb neheb requested a review from jpakkane as a code owner June 30, 2025 04:28
@neheb
Copy link
Contributor Author

neheb commented Jun 30, 2025

just noticed no BSD CIs. Unfortunate.

@dcbaker dcbaker self-assigned this Jun 30, 2025
Copy link
Member

@dcbaker dcbaker left a comment

Choose a reason for hiding this comment

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

I've thought about this a few times too, so I'm happy to have it.

We should probably note somewhere that CMake's equivalent is called backtrace

@neheb
Copy link
Contributor Author

neheb commented Jun 30, 2025

If CMake's equivalent is called backtrace , we should match it here.

@neheb neheb force-pushed the execin branch 2 times, most recently from 8035995 to 03fcacb Compare June 30, 2025 17:37
@dcbaker
Copy link
Member

dcbaker commented Jun 30, 2025

The only concern I have with that is that there is a libbacktrace. They don't currently provide a pkg-config file (and it doesn't look like any of the distros patch one it, but it seems like a potential for a conflict. I think CMake made the wrong decision 15 years ago, and I don't think we should replicate it. If someone creates a libexecinfo that isn't a re-implementation of this API, that seems like a them problem not an us problem.

@neheb
Copy link
Contributor Author

neheb commented Jun 30, 2025

OK.

@eli-schwartz
Copy link
Member

Given everyone packaging this calls it libexecinfo it's plain we shouldn't call it "backtrace" -- a function name rather than a header + BSD library name.

And for some extra fun: https://github.com/fam007e/libexecinfo

Nobody uses it, author self-uploaded to the AUR. :P Does provide a pkg-config file called... libexecinfo.pc

We will never use method: 'cmake' here so the cmake name is irrelevant.

@dcbaker
Copy link
Member

dcbaker commented Jun 30, 2025

We will never use method: 'cmake' here so the cmake name is irrelevant.

I think it's worth mentioning in the documentation that CMake provides the same functionality as backtrace, I think that's useful information for someone porting. But just in the documentation

And for some extra fun: https://github.com/fam007e/libexecinfo

Nobody uses it, author self-uploaded to the AUR. :P Does provide a pkg-config file called... libexecinfo.pc

So I guess we should provide pkg-config support as well? I'd be in favor of making that the last checked method.

@neheb
Copy link
Contributor Author

neheb commented Jun 30, 2025

OK done.

@eli-schwartz
Copy link
Member

eli-schwartz commented Jun 30, 2025

So I guess we should provide pkg-config support as well? I'd be in favor of making that the last checked method.

... maybe? I have mixed feelings about it if it's going to have zero known users. The one place it can be found is a glibc-only distro. Initial commit is last month.

@eli-schwartz eli-schwartz requested a review from thesamesam June 30, 2025 22:25
@neheb
Copy link
Contributor Author

neheb commented Jul 1, 2025

The issue I have with the pkgconfig solution is that it's redundant. The system one will find it. Its pkgconfig file has the base include directory specified.

@dcbaker
Copy link
Member

dcbaker commented Jul 1, 2025

The issue I have with the pkgconfig solution is that it's redundant. The system one will find it. Its pkgconfig file has the base include directory specified.

That's only true if you configure the package with PREFIX=/ and not some other path, right?

@dcbaker
Copy link
Member

dcbaker commented Jul 1, 2025

In particular, nixos has a derivation for libexecinfo, and I wouldn't find it with the .pc file

@neheb
Copy link
Contributor Author

neheb commented Jul 1, 2025

ah right.

@eli-schwartz
Copy link
Member

@dcbaker are you packaging this brand new greenfield project from a month ago, for nixos?

@neheb
Copy link
Contributor Author

neheb commented Jul 1, 2025

I was curious

https://repology.org/project/libexecinfo/packages

the only usage of that libexecinfo is the AUR.

@dcbaker
Copy link
Member

dcbaker commented Jul 2, 2025

@eli-schwartz: nope, apparently nixos packages the freebsd implementation under that name

@eli-schwartz
Copy link
Member

That's why I asked you if you were going to do it. ;)

As I said above -- currently nobody packages it at all, other than

author self-uploaded to the AUR. :P

Copy link
Member

@thesamesam thesamesam left a comment

Choose a reason for hiding this comment

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

I guess it's fine. These polyfill libraries have a bunch of issues but this one is less problematic than the others in that the naming is consistent, I think.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
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.

4 participants