site  contact  subhomenews

hwclock fail in easyVoid 6.0.3

February 11, 2024 — BarryK

easyVoid 6.0.2 was released a little while ago, and the guys have been testing it. Some fixes have gone into 6.0.3, and it is built with the latest packages from the Void repo. There is a new problem:

# hwclock --hctosys --localtime
hwclock: settimeofday() failed: Invalid argument
#
# busybox hwclock --hctosys --localtime
hwclock: settimeofday: Invalid argument
#
# hwclock --hctosys
hwclock: settimeofday() failed: Invalid argument

This worked in 6.0.2! The function settimeofday() caused trouble back in 2020. I think it was glibc 2.31 that changed how that function worked, and there were reports of hwclock in the util-linux package and the busybox applet, both failing. They were fixed, and all was well -- until today.

6.0.2 has glibc 2.38_3 and 6.0.3 has glibc 2.38_5. That last digit is the revision-number. So it seems the Void developers have made a configuration change (or a patch) with the "_5" compile, that has introduced this problem.

So, what to do? I have a solution, though hated to have to do this. I booted up EasyOS Pyro-series version 1.3, which was released in December 2020. The Pyro-series started much earlier than that, and the packages were compiled in OpenEmbedded, with glibc 2.25 and util-linux 2.29.1, and function settimeofday() works "properly" -- that is, as it was originally designed, before glibc reduced its functionality.

I still have the OE Pyro build environment on one of my drives, and I created a recipe named 'hwclock-static_2.29.2.bb', that compiles just the hwclock utility in util-linux, linked with musl instead of glibc. And I get 'hwclock' utility statically-linked and weighing in at 118KB.

Which is very interesting, as the normal dynamically-linked (with glibc) 'hwclock' utility in EasyOS Kirkstone, that I am running right now, is 79KB. The statically-linked utility is not much bigger.

What I will do is replace the 'hwclock' utility in util-linux, with the statically-linked one, in the next release of easyVoid. I know this is a cop-out; ideally should find out why this problem has occurred. But really, it is an annoyance that I just want to fix quickly.

EDIT:
The cause of hwclock fail was not due to glibc!!! I discovered that the USB Flash drive is failing, causing various weird effects.
   

Tags: easy