✘64-bit time_t on glibc 2.34 and up
Gary E. Miller
gem at rellim.com
Sun Jan 15 21:21:24 UTC 2023
Yo Greg!
On Sun, 15 Jan 2023 09:42:06 -0500
Greg Troxel <gdt at lexort.com> wrote:
> > You can always build bad .o. But good practice is to build all .o
> > in a program or binary with the same setting. Otherwise a huge
> > number of ways to fail. That is why all gpsd c files start with:
> >
> > #include "../include/gpsd_config.h" // must be before all includes
> >
>
> I was asking about an installed library built one way, and a program
> built another. It seems like they will have DT_NEEDED on two
> different libc versions, which will end up somewhere between erroring
> at start and UB.
Um, lost me. The new _TIME_SIZE_BITS means only one libc is needed.
You keep thinking it needs two.
> How are you going to manage building gpsd to match the time_t size
> choice made in dbus and libusb?
Don't need to. dbus can use whatever time_t it wants, different from the
one gpsd uses, as long as time_t is not passed as a binary between the
two.
gpsd does not pass binary time_t to either one. Unless you can point
out somewhere I miised a bianry call?
gpsd passes dbus time as a double:
DBUS_TYPE_DOUBLE, &dtime,
gpsd only uses libusb for the Garmin 18usb which only speaks native usd.
But the protocol is Garmin Binary. No time_t anywhere.
> How is anyone else going to manage
> this in the world of individual compilation unit choice?
Linux has been doing this a long time. Not my first choice, but
rare that glibc or Linus takes what I say seriously. If you are sure
they are wrong, I'd love to watch you convince them the error of their
ways. I'll get popcorn.
> The only
> paths I can see are
>
> a distribution choosing a setting for all programs
Like all the BSDs. Except, they don't always.
> setting up two hierarchies of lib/bin for building each way
And yet, the folks at glibc disagree, at least as far as time_t.
For other things, yes, my Gentoo has many separate /usr/lib depending on
all sorts of things. All installed at the same time, and it just works.
Close to a dozen on one of my hosts. Could be much more.
So it can be done, is very frequently done, but is irrelevant to the
gpsd issue at hand.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem at rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20230115/ef789668/attachment.bin>
More information about the devel
mailing list