See libfaketime on github for upstream project site general overview.
#!/usr/bin/env bash
set -Eeuo pipefail
LIBFAKETIME_SOURCE_PATH=$PWD/libfaketime
LIBFAKETIME_INSTALL32_PREFIX=$PWD/install-x86
LIBFAKETIME_INSTALL64_PREFIX=$PWD/install-x86_64
[[ -d $LIBFAKETIME_SOURCE_PATH ]] || git clone https://github.com/wolfcw/libfaketime.git
make -C $LIBFAKETIME_SOURCE_PATH PREFIX=$LIBFAKETIME_INSTALL64_PREFIX distclean install | tee build64.log
CFLAGS="-m32" LDFLAGS="-m32" make -C $LIBFAKETIME_SOURCE_PATH PREFIX=$LIBFAKETIME_INSTALL32_PREFIX distclean install | tee build32.log
# generate scripts for shell environment
echo "export LD_PRELOAD=$LIBFAKETIME_INSTALL32_PREFIX/lib/faketime/libfaketime.so.1" > libfaketime32.env
echo "export LD_PRELOAD=$LIBFAKETIME_INSTALL64_PREFIX/lib/faketime/libfaketime.so.1" > libfaketime64.env
64-bit application in 64-bit WINEPREFIX:
$ date
Sat Oct 19 19:11:58 CEST 2019
$ (source libfaketime64.env ; FAKETIME="-1y" wine64 "c:/windows/system32/cmd.exe" /c date /t)
Current Date is 10/19/2018
32-bit application in 64-bit WINEPREFIX:
$ date
Sat Oct 19 19:11:58 CEST 2019
$ (source libfaketime32.env ; FAKETIME="-1y" wine "c:/windows/syswow64/cmd.exe" /c date /t)
Current Date is 10/19/2018
NOTE: Since Wine 7.2, libfaketime doesn't work anymore for 32-bit processes due to missing 64-bit time_t support. See my comment
Links
Hi @random-cdda-modder
Sorry for the late reply. I was busy with lots of other (non software) projects.
Since I have every Wine version from 1.3.x onward still building and running on my Fedora 40 machine, I've traced the 32-bit breakage back to Wine 7.2.
Specifically to this change between Wine 7.1 and 7.2 from Feb 2, 2022:
https://gitlab.winehq.org/wine/wine/-/commit/2211ca9fa57640b4c19c0a6aa57fda94328c53c5 ("configure: Enable 64-bit time_t on Linux.")
There is actually a bug report about the missing 64-bit time_t support in the
libfaketime
project:wolfcw/libfaketime#418
One guy was claiming to work on it but no updates since one year. :-(
So you are left with two options:
Don't forget to regenerate
configure
scripts withautoreconf -f
when building wine (to have the change fromconfigure.ac
picked up).This way you can still do libfaketime hacks with 32-bit processes on most recent Wine 10.0.
Apart from that (the root cause), the other errors from your command line output:
Those are benign and can be ignored because wine always starts as 64-bit process nowadays, even if 32-bit has been requested.
Regards