Building Wine (8.0.2) with WOW64 for RHEL8

Questions about Wine on Linux
Locked
Rinlnx
Level 1
Level 1
Posts: 6
Joined: Fri Jul 07, 2023 7:54 am

Building Wine (8.0.2) with WOW64 for RHEL8

Post by Rinlnx »

Hi Wine community

I need Wine in a RHEL8 environment.
Getting 6.0.2 to work via package manager worked out fine.

Since 6.0.2 is a bit outdated though, I'd prefer to build and use 8.0.2. This would allow me to build future new releases as well. (Note: I need WOW64 to work)
So far I've gotten to the point where I can build (configure + make) both 64 and 32 bit Wine, the 32 bit configure is full of complaints though:

The commands I used:

Code: Select all

cd <path to 64 bit build folder>
<path to Wine source>/configure --enable-win64
make

cd <path to 32 bit build folder>
PKG_CONFIG_PATH=/usr/lib <path to Wine source>/configure --with-wine64=<path to 64 bit build folder>
When I try to use something 32-bit based after these commands (running wine directly from the build folder), I get following error:
wine: could not load kernel32.dll, status c0000135
For my specific situation, It's possible I don't need to solve any GUI related complaints, since I don't think any 32-bit thing in my use case will have a GUI.
32-bit configure complaints:
configure: MinGW compiler not found, cross-compiling PE files won't be supported.
configure: libxcursor 32-bit development files not found, the Xcursor extension won't be supported.
configure: libxi 32-bit development files not found, the Xinput extension won't be supported.
configure: XShm 32-bit development files not found, X Shared Memory won't be supported.
configure: XShape 32-bit development files not found, XShape won't be supported.
configure: libXxf86vm 32-bit development files not found, XFree86 Vidmode won't be supported.
configure: libxrandr 32-bit development files not found, XRandr won't be supported.
configure: libxfixes 32-bit development files not found, Xfixes won't be supported.
configure: libxinerama 32-bit development files not found, multi-monitor setups won't be supported.
configure: libxcomposite 32-bit development files not found, Xcomposite won't be supported.
configure: libOSMesa 32-bit development files not found (or too old), OpenGL rendering in bitmaps won't be supported.
configure: OpenCL 32-bit development files not found, OpenCL won't be supported.
configure: pcap 32-bit development files not found, wpcap won't be supported.
configure: libsane 32-bit development files not found, scanners won't be supported.
configure: libusb-1.0 32-bit development files not found (or too old), USB devices won't be supported.
configure: libv4l2 32-bit development files not found.
configure: libgphoto2 32-bit development files not found, digital cameras won't be supported.
configure: libgphoto2_port 32-bit development files not found, digital cameras won't be auto-detected.
configure: libpulse 32-bit development files not found or too old, Pulse won't be supported.
configure: gstreamer-1.0 base plugins 32-bit development files not found, GStreamer won't be supported.
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
configure: libudev 32-bit development files not found, plug and play won't be supported.
configure: libSDL2 32-bit development files not found, SDL2 won't be supported.
configure: libcapi20 32-bit development files not found, ISDN won't be supported.
configure: libcups 32-bit development files not found, CUPS won't be supported.
configure: libkrb5 32-bit development files not found (or too old), Kerberos won't be supported.
configure: libnetapi not found, Samba NetAPI won't be supported.
configure: libvulkan and libMoltenVK 32-bit development files not found, Vulkan won't be supported.

configure: WARNING: libxrender 32-bit development files not found, XRender won't be supported.

configure: WARNING: No OpenGL library found on this system.
OpenGL and Direct3D won't be supported.

configure: WARNING: No sound system was found. Windows applications will be silent.
invisible kid
Level 5
Level 5
Posts: 368
Joined: Tue Dec 24, 2019 3:23 pm

Re: Building Wine (8.0.2) with WOW64 for RHEL8

Post by invisible kid »

Just a fellow user here. Someone will probably fix you up, but until then I noticed this:

Code: Select all

configure: MinGW compiler not found, cross-compiling PE files won't be supported.
For this you need mingw compiler executables. Hopefully there is a redhat package for them as they look a bit tricky to build 64 bit and 32 bit versions.

You might need a bunch of other 32 bit libraries. I don't know how redhat is with packages for them or if you have to build them yourself. I have to build them, but wouldn't if I didn't have to. Either way, good luck!
Rinlnx
Level 1
Level 1
Posts: 6
Joined: Fri Jul 07, 2023 7:54 am

Re: Building Wine (8.0.2) with WOW64 for RHEL8

Post by Rinlnx »

invisible kid wrote: Wed Jul 26, 2023 4:12 pm For this you need mingw compiler executables. Hopefully there is a redhat package for them as they look a bit tricky to build 64 bit and 32 bit versions.
You are correct that I did not install anything for mingw compiler, thank you for pointing that out.
I fixed it the following way:

Code: Select all

sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
sudo dnf install mingw64-gcc
sudo dnf install mingw32-gcc
However, I think most packages were installed, but configure didn't manage to find them.
e.g. libXxf86vm is installed, but configure complains "not found":
[uname@localhost wine64]$ sudo dnf install libXxf86vm.x86_64
[sudo] password for uname:
Updating Subscription Management repositories.
Last metadata expiration check: 0:04:09 ago on Thu 27 Jul 2023 12:42:58 PM CEST.
Package libXxf86vm-1.1.4-9.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[uname@localhost wine64]$ sudo dnf install libXxf86vm.x86_64
Updating Subscription Management repositories.
Last metadata expiration check: 0:04:27 ago on Thu 27 Jul 2023 12:42:58 PM CEST.
Package libXxf86vm-1.1.4-9.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[uname@localhost wine64]$
User avatar
dimesio
Moderator
Moderator
Posts: 13371
Joined: Tue Mar 25, 2008 10:30 pm

Re: Building Wine (8.0.2) with WOW64 for RHEL8

Post by dimesio »

Rinlnx wrote: Thu Jul 27, 2023 5:53 am
Package libXxf86vm-1.1.4-9.el8.x86_64 is already installed.
That's the 64 bit package. You also need the 32 bit one.
invisible kid
Level 5
Level 5
Posts: 368
Joined: Tue Dec 24, 2019 3:23 pm

Re: Building Wine (8.0.2) with WOW64 for RHEL8

Post by invisible kid »

Hopefully someone will be able to get you going. Just a couple of comments that might not apply to your situation. When I installed them I put them in "/opt", so since that is not in my normal path, I needed to do one of these(echo just to be safe and verify it is correct):

Code: Select all

echo $PATH
export PATH=${PATH}:/opt/mingw-w64/bin:/opt/mingw-w32/bin
echo $PATH
Another thing I have to do is make sure *.pc files are created and installed correctly since I build myself. When building 32 bit I have to do a:

Code: Select all

PKG_CONFIG_PATH=/usr/lib32/pkgconfig ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-wine64=../wine64-build
So when building/installing 32 bit stuff, I have to make sure there is a correct *.pc file in /usr/lib32/pkgconfig for each installed library and that when building wine32 it knows where it is.

Not sure if any of this will help your specific situation, good luck.
Rinlnx
Level 1
Level 1
Posts: 6
Joined: Fri Jul 07, 2023 7:54 am

Re: Building Wine (8.0.2) with WOW64 for RHEL8

Post by Rinlnx »

Update:

I've searched package per package and think my 64-bit installation will be fine now.
Only 64 bit Wine configure complaints remaining:
* configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
* configure: libcapi20 64-bit development files not found, ISDN won't be supported.

For my use case whatever goes wrong with sound is probably fine and the second one has to do with ISDN cards, and that is also out of my scope.

I'll report back later how it goes with the 32-bit build.
Rinlnx
Level 1
Level 1
Posts: 6
Joined: Fri Jul 07, 2023 7:54 am

Re: Building Wine (8.0.2) with WOW64 for RHEL8

Post by Rinlnx »

update:
I've gotten most of the things straight for 32-bit as well:
* configure: libgphoto2 32-bit development files not found, digital cameras won't be supported.
* configure: gstreamer-1.0 base plugins 32-bit development files not found, GStreamer won't be supported.
* configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
* configure: libudev 32-bit development files not found, plug and play won't be supported.
* configure: libcapi20 32-bit development files not found, ISDN won't be supported.
* configure: libcups 32-bit development files not found, CUPS won't be supported.
* configure: libkrb5 32-bit development files not found (or too old), Kerberos won't be supported.

Chances are not big these will be problematic for my usecase (although I slightly worry about Kerberos and maybe GStreamer)
I did a successful make install (first 32bit, then 64) and a quick test looks promising :)

Thanks a ton for the help and feedback @invisible kid and @dimesio

The next challenge will be to manually move the 2 built folders to an offline machine.
Maybe I'll be back with a new forum question soon.

Thanks again & kind regards,
Rin
Rinlnx
Level 1
Level 1
Posts: 6
Joined: Fri Jul 07, 2023 7:54 am

Re: Building Wine (8.0.2) with WOW64 for RHEL8

Post by Rinlnx »

For future people trying to build Wine on RHEL, I booked the most progress /w these tings:

enabling following the "codeready-builder-for-rhel-8-x86_64-rpms" repo:

Code: Select all

sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
And manually looking for packages on the RHEL package-browser https://access.redhat.com/downloads/con ... ge-browser that would correspond to the needed Fedora packages on the "building Wine" page https://wiki.winehq.org/Building_Wine
invisible kid
Level 5
Level 5
Posts: 368
Joined: Tue Dec 24, 2019 3:23 pm

Re: Building Wine (8.0.2) with WOW64 for RHEL8

Post by invisible kid »

Awesome! Yep that 32 bit configure output looks about the same as mine. Yeah, I have kerberos 64 bit, but not 32 bit and when I run 32 bit programs the logs will say something similar to, "no kerberos, expect problems," but so far it hasn't shown itself to be a problem. Same thing with gstreamer(yes 64, no 32), but never experienced a problem because of it. Good deal.
Locked