Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
QEMU virtiofs chroot: clock skew errors during emerge
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
METROIDHunter_
n00b
n00b


Joined: 14 Mar 2023
Posts: 13
Location: USA

PostPosted: Thu Nov 14, 2024 12:42 am    Post subject: QEMU virtiofs chroot: clock skew errors during emerge Reply with quote

Greetings everyone,

I have a very strange problem involving Gentoo, QEMU, and virtiofs.

I have set up a QEMU/KVM VM to chroot into a virtiofs mount and compile Gentoo binary packages to serve to my old 32-bit x86 laptops. Right now I'm trying to build binary packages for my clients, but a few important packages are receiving errors from make or gmake:
Code:
Clock skew detected. Your build may be incomplete

or
Code:
ERROR: Clock skew detected. File /var/tmp/portage/app-arch/zstd-1.5.6/work/zstd-1.5.6/build/meson-abi_x86_32.x86/meson-private/coredata.dat has a time stamp 0.1444s in the future.

The clock skew is never much. It's always between 0.1 to 0.6 seconds in the future, in my experience. But these errors prevent the packages from building.

I can see 3 specific packages with this problem - all of them complain that a file's timestamp is less than 1 second in the future, and they refuse to build:
    app-arch/lz4
    app-arch/zstd
    dev-build/cmake

CMake even throws an additional error, which I suspect to be related to the clock skew issue:
Code:
CMake Error at CMakeLists.txt:93 (message):
  The C++ compiler does not support C++11 (e.g.  std::unique_ptr).

Let me clarify my setup a bit further: I have a Gentoo host running a Linux QEMU VM (tested with Alpine and Gentoo, x86 32-bit). The VM is provided a shared filesystem via virtiofs, which serves as the chroot for my binpkg host.
Gentoo Host:

Gentoo Guest VM:

Gentoo binpkg chroot:


While writing this forum post, I had the idea to try building cmake from a chroot directly from my host, without using the VM... and it emerged successfully. Something about my virtualization layer is causing the problem.

Also, the Gentoo VM is able to build the aforementioned packages without issue on its own root filesystem; but when I use my Gentoo (or Alpine) VM to chroot into my virtiofs filesystem (where my Gentoo binpkg host lies), then I have problems.

Does anyone have any ideas? I feel certain that virtiofs is involved in this problem, but I'm hoping somebody can help point me in the right direction.

Thank you for your attention :)
_________________
The signature is a lost art.
Back to top
View user's profile Send private message
METROIDHunter_
n00b
n00b


Joined: 14 Mar 2023
Posts: 13
Location: USA

PostPosted: Sun Jan 26, 2025 9:31 pm    Post subject: Reply with quote

A few months later and I've found a solution. Apparently the options I passed to 'mount' were causing a problem. Originally I mounted my virtiofs shares with:
Code:
rw,noatime,nodiratime

I changed that to simply:
Code:
defaults

And all my problems are gone.
_________________
The signature is a lost art.
Back to top
View user's profile Send private message
METROIDHunter_
n00b
n00b


Joined: 14 Mar 2023
Posts: 13
Location: USA

PostPosted: Sat Feb 01, 2025 11:02 pm    Post subject: Reply with quote

Once again I'm faced with clock skew errors from Meson. Looks like my previous "solution" was short-lived.

But I just found a really simple & easy solution... within the chroot, I am now mounting the portage TMPDIR (/var/tmp/portage) as a tmpfs, so the software building is no longer happening on a virtiofs volume.

https://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs
_________________
The signature is a lost art.
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1879
Location: Germany

PostPosted: Sun Feb 02, 2025 8:49 am    Post subject: Reply with quote

Just an idea: Would adding https://wiki.gentoo.org/wiki/Ntp (client) at boot to your VM solve it?
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum