From: Florian Weimer <fweimer@redhat.com>
To: Bruno Haible <bruno@clisp.org>
Cc: Paul Eggert <eggert@cs.ucla.edu>, bug-gnulib@gnu.org
Subject: Re: [PATCH] year2038: support glibc 2.34 _TIME_BITS=64
Date: Wed, 07 Jul 2021 10:45:16 +0200 [thread overview]
Message-ID: <87eecabjhf.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <1882389.maKspNx483@omega> (Bruno Haible's message of "Tue, 06 Jul 2021 04:11:50 +0200")
* Bruno Haible:
> Florian Weimer wrote:
>
>> 64-bit file offsets enabled real use cases.
>
> Year 2038 is also a real use-case. It is not so rare that machines are
> being used for 15 years. (I still occasionally use a 14-years old
> computer, and had a washing machine that lasted 25 years.)
> Year 2038 is less than 17 years away. So, it is time to do something for
> year 2038 now, not in five years.
Y2038 support requires recompilation. If you are able to do that, why
not recompile for a 64-bit architecture?
>> I assume GNU clisp (at least in a full build) need to link to some
>> system libraries which are not dual ABI (and probably never will be).
>> If gnulib forces the use of time64 mode, then it creates a push towards
>> time64 mode in those libraries, too. At that point, these libraries
>> will no longer be usable for running older binaries (in at least some
>> cases; in others, the time_t symbols are not actually used).
>> ...
>> gnulib is pushing things in one particular direction, a
>> direction ...
>
> Let me try to summarize your arguments, the way I understand them.
>
> 1) The ability to run older binaries is essential for nearly all
> distros.
>
> 2) On i386, 32-bit time_t and 64-bit time_t are not binary compatible,
> when used in the public API of a shared library. Assume an existing
> old binary relies on /usr/lib/libfoo.so.5 and uses its API with
> 32-bit time_t assumption. Then this library must stay in place with
> the same API.
>
> 3) The distribution can provide a libfoo.so compiled with 64-bit
> time_t, but it MUST reside in a different file.
I think there is also the possibility of a dual ABI, see below.
> Pieces that are missing, AFAICS, are:
>
> A) Possibly some glibc "magic" with shared library versioning would
> make this situation simpler? Or is the combination of ldconfig and
> LD_LIBRARY_PATH etc. sufficient?
This probably needs per-package/component work to enable dual ABI,
similar to what glibc did for its time_t interfaces. There is no linker
magic involved, it's either symbol redirects (using a GCC extension) or
a preprocessor macro. A dual ABI avoids the need for new soname and the
introduction of symbol versioning (so that the object can be loaded
twice into the same process with different ABIs).
I don't expect many upstreams to support this effort.
> B) A writeup for distributors, what is the recommended way to handle
> the situation.
> There are several _possible_ ways to handle it. But Linux distros
> aim at being compatible at the binary level, and that requires
> a _common_ approch among distros. IMO, the Linux Standard Base (LSB)
> is the forum where such things should be standardized.
> Have the LSB people already been involved in the discussion?
LSB is quite dead, and it never covered the interesting packages anyway.
I can see distributions building 32-bit Arm and a *new*, separate
variant of i386 for 64-bit time_t, and the original i386 port remains at
32-bit. The new i386 port would have a glibc that defaults to 64-bit
time_t. Two separate i386 ports seem to require the least human
resources to maintain. If that's the chosen approach, gnulib should
just use whatever the default time_t size is, and not attempt to
override it.
Thanks,
Florian
next prev parent reply other threads:[~2021-07-07 8:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 2:33 [PATCH] year2038: support glibc 2.34 _TIME_BITS=64 Paul Eggert
2021-07-02 15:32 ` Florian Weimer
2021-07-02 22:29 ` Bruno Haible
2021-07-03 2:40 ` Paul Eggert
2021-07-05 14:32 ` Florian Weimer
2021-07-05 20:14 ` Paul Eggert
2021-07-06 1:34 ` Bruno Haible
2021-07-06 22:29 ` Paul Eggert
2021-07-06 2:11 ` Bruno Haible
2021-07-07 8:45 ` Florian Weimer [this message]
2021-07-07 21:58 ` Paul Eggert
2021-07-08 5:36 ` Florian Weimer
2021-07-17 3:39 ` Paul Eggert
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
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eecabjhf.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=eggert@cs.ucla.edu \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).