Skip to content

Question: How to get glibc version at runtime? #4863

Closed as not planned
Closed as not planned

Description

@oech3

At #4697 (comment) , the C function gnu_get_libc_version was considerd as a not nice solution as depending on cc.

So cannot this crate have such function in principle?

Activity

  1. oech3 commented on Dec 3, 2025

    @oech3
    Author

    @tgross35 Not sure is separated issue from #4700 specialized to achieve version at runtime useful.

  2. tgross35 commented on Dec 3, 2025

    @tgross35
    Member

    Do you mean for users to be able to call gnu_get_libc_version, rather than configuring which link names we emit? I think I would need to see the usecase for this.

  3. oech3 commented on Dec 3, 2025

    @oech3
    Author

    Do you mean for users to be able to call gnu_get_libc_version, rather than configuring which link names we emit?

    Yes. (Ofcause we might abuse it for backword compatibility.)

  4. tgross35 commented on Dec 4, 2025

    @tgross35
    Member

    Do you just want a binding forgnu_get_libc_version? Or could you say more about what kind of backcompat hacks you're looking to do?

  5. oech3 commented on Dec 4, 2025

    @oech3
    Author

    To distribute binary linked with Arch glibc to Ubuntu (or inverse).

  6. tgross35 commented on Dec 4, 2025

    @tgross35
    Member

    I still have no idea how you plan to use this. If you want to dlsym then that makes sense, but I think you may as well just define it yourself in that case since you need to define the function signatures anyway. All of that is outside of this crate's scope.

  7. oech3 commented on Dec 4, 2025

    @oech3
    Author

    All of that is outside of this crate's scope.

    OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions