It can be a pain to install all the needed development packages to build BOTH the 32-bit and 64-bit versions of Wine for the old-style Windows-on-Windows mode. So here's what is hopefully the simplest way to do so on distributions based on Debian and openSUSE [1].
wget https://gitlab.winehq.org/fgouget/wt-daily/-/raw/master/wt-install-dev sudo sh ./wt-install-dev
Then build Wine normally, no containers or VMs needed. So assuming you have the source in wine, just run:
mkdir wow32 wow64 cd wow64 && ../wine/configure --enable-win64 && make cd ../wow32 && ../wine/configure --with-wine64=../wow64 && make
Of course you're also all set for builds using the new WoW approach:
cd wine && ./configure --enable-archs=i386,x86_64 && make
[1] More specifically this has been tested on: Debian 11 (bullseye), 12 (bookworm) Elementary OS 7 Horus (stable and unstable) openSUSE Leap 15.4, Tumbleweed Pop!_OS 22.04 Ubuntu 22.04.2 LTS, 23.04
Patches to extend support to other distributions are welcome.