Building 32 bit wine with Vulkan support

Questions about Wine on Linux
Locked
invisible kid
Level 5
Level 5
Posts: 353
Joined: Tue Dec 24, 2019 3:23 pm

Building 32 bit wine with Vulkan support

Post by invisible kid »

Hello!

My distro is LFS without apt or related tools installed, but I can install *.deb files, but would rather build myself if possible.

I have successfully built 64 bit wine with vulkan support by installing the pre-built libraries from the SDK:

pkgconfig/vulkan.pc
libvulkan.so.1
libvulkan.so.1.1.130
libvulkan.so

World of Warcraft 64 bit client is working beautifully. When I try to build 32 bit wine for blizzard launcher and Hearthstone, I expectedly get "configure:23350: libvulkan and libMoltenVK 32-bit development files not found, Vulkan won't be supported."

It was a huge disappointment to find out https://vulkan.lunarg.com/sdk/home#linux did not supply 32 bit libraries like they do the 64 bit versions. So I will need to build the 32 bit versions.

So I started out attempting to build the 64 bit version of vulkan, since I know the pre-built libraries work, to start from a "safe spot" and once I am able to build 64 bit, I will then attempt to build 32 bit. (The pre-build 64 bit SDK tar ball includes the sources)

It is difficult to even determine what I do and don't need to install. It seems I definitely need Vulkan-Loader, as building that will provide

pkgconfig/vulkan.pc
libvulkan.so.1
libvulkan.so.1.1.130
libvulkan.so

which is I believe what wine is looking for when configuring/compiling. The error I'm getting building that is

In file included from /usr/src/vulkansdk-linux-x86_64-1.1.130.0/source/Vulkan-Loader/loader/loader.h:38,
from /usr/src/vulkansdk-linux-x86_64-1.1.130.0/source/Vulkan-Loader/loader/asm_offset.c:24:
/usr/src/vulkansdk-linux-x86_64-1.1.130.0/source/Vulkan-Loader/loader/generated/vk_layer_dispatch_table.h:224:5: error: unknown type name ?PFN_vkGetPhysicalDeviceToolPropertiesEXT?
PFN_vkGetPhysicalDeviceToolPropertiesEXT GetPhysicalDeviceToolPropertiesEXT;

So I though I might need to build Vulkan-ValidationLayers, but in the BUILD.md file it intentionally excludes linux 32 bit instructions, but includes them for windows 32 bit builds, so I am at a bit of a loss here, but will try to build the 64 bit versions just as a sanity check.

Also I noticed that my debian install does not have the above mentioned vulkan libraries, so I am guessing debian only uses the generated dll files and its wine versions do not need to dynamicly link to them?

Any help would be much appreciated!
invisible kid
Level 5
Level 5
Posts: 353
Joined: Tue Dec 24, 2019 3:23 pm

Re: Building 32 bit wine with Vulkan support

Post by invisible kid »

I had a copy of libvulkan1_1.0.39.0+dfsg1-1_i386.deb laying around in my debian cache, so I took the 32 bit lib from there, created a vulkan.pc and rebuilt 32 bit wine, and did the wow64 install

I am still unable to get past the blizzard launcher login. The login splash occurs, but disappears after a crash(I already have corefonts and other winetricks/configs). I guess this can still be a gnutls issue that I created another thread for:

viewtopic.php?f=8&t=33294
Cybermax
Level 4
Level 4
Posts: 218
Joined: Fri Dec 01, 2017 5:26 pm

Re: Building 32 bit wine with Vulkan support

Post by Cybermax »

You could perhaps grab some source packages from LunarG and build from those? https://packages.lunarg.com/vulkan/1.1.130/pool/main/ These are used to build Ubuntu Xenial/Bionic packages, but should be adaptable for building.

Not really familiar with LFS, but for the debian/ubuntu family, building crosslib kinda sux. I tend to use LXC to build -32 bit, and it works fairly well, but i know ppl have other build methods for that.

If you have problems figuring out what you need of those packages, i did a backport quite a while back to 1.1.106 (before LunarG provided packages pre-built) that can give you an idea what you would need to build Wine and/or Dxvk. https://launchpad.net/~cybermax-dexter/ ... -backports

You need to build headers first, as the vulkan-loader is dependent on that to build.

You did not mention why you wanted vulkan support for Wine, other than perhaps to use DXVK? If so, you could try remove the dll-override for d3d9 that DXVK puts in as i think this causes a problem with the blizzard launcher....
invisible kid
Level 5
Level 5
Posts: 353
Joined: Tue Dec 24, 2019 3:23 pm

Re: Building 32 bit wine with Vulkan support

Post by invisible kid »

Thanks a lot! Yes, I believe I just need 32 bit DXVK working. It seems it is already working in 64 bit mode with world of warcraft.

I will process this and get back with an update, thx again!
invisible kid
Level 5
Level 5
Posts: 353
Joined: Tue Dec 24, 2019 3:23 pm

Re: Building 32 bit wine with Vulkan support

Post by invisible kid »

So, after my previous posts, I was able to get 32 bit vulkan battle.net working 100%

When I needed a later version of wine and tried updating to wine-staging 6.15 I ended up updating vulkan to 1.2.182, but now if I poach debian's 32 bit libvulkan, when compiling wine in 32 bit mode, configure doesn't feel vulkan 32 bit is adequately installed.(used to need a single lib, now maybe I need multiple? pkgconfig edits?)

So I am back with hat in hand looking for any suggestions.

1. I have no desire to compile this myself, but vulkan does not provide 32 bit binaries
2. I am okay with taking libraries from debian if people know which ones and how to get them

With the link Cybermax provided, I might be able to figure out which executables/libraries I will need from debian:
https://packages.lunarg.com/vulkan/1.2.182/

3. I can easily build "normal" 32 bit applications, but vulkan_sdk is not a package that can be built that way.
4. I cannot easily set up a pure 32 bit chroot from a 64/32 multilib I believe. I can do it with CLFS but I'd rather not if possible. I've used virtual machines at work but not sure if that's something I can set up easily at home.

Any suggestions welcome, especially ones I didn't touch on here.

Why won't vulkan supply 32 bit libraries? It's madenning.

64 bit wine/vulkan is working fine and I am able to build 64 bit vulkan fine.
invisible kid
Level 5
Level 5
Posts: 353
Joined: Tue Dec 24, 2019 3:23 pm

Re: Building 32 bit wine with Vulkan support

Post by invisible kid »

I think I'll bite the bullet and try creating a 32 bit CLFS chroot environment on my host system and try building 32 bit libvulkan there. I'll update in case it can help someone else.
invisible kid
Level 5
Level 5
Posts: 353
Joined: Tue Dec 24, 2019 3:23 pm

Re: Building 32 bit wine with Vulkan support

Post by invisible kid »

Small update. Using CLFS would have meant a lot of updating packages to get the similar/same packages as my multilib system. So the new plan is to resize my partitions and add two small partitions for a pure 32 bit debian install and a pure 32 bit LFS install, then I can use the debian 32 bit environment to build/install a pure 32 bit LFS install using the same packages as my multilib system.

It will take a bit of work to get there, but seems like the easiest path.
invisible kid
Level 5
Level 5
Posts: 353
Joined: Tue Dec 24, 2019 3:23 pm

Re: Building 32 bit wine with Vulkan support

Post by invisible kid »

Small update. Got it mostly working. Tried using debian's 32 libvulkan 1.2.182 and 1.2.162, but they require glibc 2.29(I am using 2.28 and glibc is a bit tricky to update), so I went back to debian's 32 bit libvulkan 1.0.39:

Code: Select all

/usr/lib32:
libvulkan.so -> libvulkan.so.1
libvulkan.so.1 -> libvulkan.so.1.0.39
libvulkan.so.1.0.39
, made sure the vulkan.pc file was correct:

Code: Select all

# These paths must be manually configured

prefix=/usr
exec_prefix=${prefix}/bin32
libdir=${prefix}/lib32
includedir=${prefix}/include

Name: Vulkan-Loader
Description: Vulkan Loader
Version: 1.0.39
#Version: 1.2.162
#Version: 1.2.182
Libs: -L${libdir} -lvulkan
Libs.private:  -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
Cflags: -I${includedir}
and I was able to build wine-staging 6.16 okay. World of Warcraft(64 bit vulkan) works great using legacy d3d11, Hearthstone works great, Diablo III in 32 bit mode works great. Diablo II(32 bit) works great. Battle.net(32 bit) works but it will take minutes to update the screen.

I was also interested to see if I can run diablo ii remastered(inspired by the recent post here), but I missed the trial period and will have to wait until release since I do not want to preorder. Sorry, I know this is boring to non-LFS folks. :(
Locked