From: Dmitry Samersoff <dms@samersoff.net>
To: musl@lists.openwall.com, Rich Felker <dalias@libc.org>,
Alexander Scherbatiy <alexander.scherbatiy@bell-sw.com>
Subject: Re: [musl] musl libc version
Date: Wed, 27 May 2020 21:28:49 +0300 [thread overview]
Message-ID: <f0251f5a-39e8-2a90-8332-876fbbffd17c@samersoff.net> (raw)
In-Reply-To: <20200527155735.GU1079@brightrain.aerifal.cx>
Hello Rich,
> With that said, ability to test for some things is presently
> inadequate, and there's a proposal I've made (based on previous
> discussions with others) on libc-coord to improve this in a cross-libc
> manner:
I like your proposal, but I'm in doubt that it's possible to coordinate
it across all involved parties.
Absence of musl/libc-version.h (similar to gnu/*) and corresponding api
creates a burden for support folks (as Alexander already mentioned) and
people maintaining cross platform software like JVM.
> If you have input into what kinds of things you need to be able to
> test for it would be very helpful.
*For example*, on another topic we discussed a difference in behavior of
dlopen() between glibc and musl. if sometimes musl will change its
behavior, workaround code in java launcher could be deprecated and
placed under if musl_version() < ...
*Another example is less technical but more effort driven*, absence of
dlvsym() in musl leads to significant changes in libnuma handling code
in JVM.
Numa support have big performance impact and all related changes have
to be carefully tested in a different environment.
So I would prefer to put these changes under if musl() (or ever
#ifdef MUSL) rather than test for dlvsym() presence at runtime. It
allows me to be sure that we are always on the known and tested scenario.
-Dmitry
On 27.05.2020 18:57, Rich Felker wrote:
> On Wed, May 27, 2020 at 06:44:38PM +0300, Alexander Scherbatiy wrote:
>> Hello,
>>
>> Using glibc it is possible to get GNU C library version using
>> confstr() function and _CS_GNU_LIBC_VERSION constant.
>>
>> In musl the confstr() returns EINVAL for _CS_GNU_LIBC_VERSION.
>> Is there a way to get libc version in musl?
>
> Can you describe what you're trying to achieve with a version number?
> musl specifically doesn't publish version numbers via macros or
> runtime interfaces because they're a poor proxy for checking for the
> particular feature/property/whatever you care about. For instance,
> distros may backport the thing you want to an older version, and even
> if not, you end up hard-coding knowledge about particular libcs that
> quickly bitrots rather than making something robust and future-proof.
>
> With that said, ability to test for some things is presently
> inadequate, and there's a proposal I've made (based on previous
> discussions with others) on libc-coord to improve this in a cross-libc
> manner:
>
> https://www.openwall.com/lists/libc-coord/2020/04/22/1
>
> If you have input into what kinds of things you need to be able to
> test for it would be very helpful.
>
> Rich
>
prev parent reply other threads:[~2020-05-27 18:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 15:44 Alexander Scherbatiy
2020-05-27 15:57 ` Rich Felker
2020-05-27 16:31 ` Alexander Scherbatiy
2020-05-27 18:28 ` Dmitry Samersoff [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f0251f5a-39e8-2a90-8332-876fbbffd17c@samersoff.net \
--to=dms@samersoff.net \
--cc=alexander.scherbatiy@bell-sw.com \
--cc=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).