Can't reproduce working debian build

Questions about Wine on Linux
Post Reply
mbid
Newbie
Newbie
Posts: 4
Joined: Sun Apr 22, 2018 12:35 am

Can't reproduce working debian build

Post by mbid » Wed Apr 22, 2020 4:11 pm

I'm trying to build wine myself to run World of Warcraft Classic. The game is running fine on the wine-staging version of wine I got from winehq's debian repository, but when I try to run the game with my own build of wine it won't display anything at all, it just opens a transparent window. Is there anything special going on with the winehq builds?

I've followed the instructions https://wiki.winehq.org/Building_Wine for the Shared WoW64 build of wine: I built the 64bit version, then the 32bit version for the win32 tools and finally the win32 build pointing to the 64bit directory. The battle.net app runs fine on my wine build, so I don't think I screwed it up completely. I used commit 4cdb7ec8291c1, which is supposed to be Release 5.6, same as the wine-staging version.

I've been told that World of Warcraft is a 64bit executable, so maybe the 32bit build isn't even necessary. I didn't customize my wineprefix in any way, I just installed the battle.net app and then World of Warcraft.

If I compare the stderr output of wine-staging and my own build when I try to run World of Warcraft, what sticks out are these two lines from my own build that don't show up in the wine-staging version:

Code: Select all

000b:err:seh:setup_exception stack overflow 1616 bytes in thread 000b eip 000000007bc4ad65 esp 0000000000130fc0 stack 0x130000-0x131000-0x230000
...
0009:err:seh:setup_exception stack overflow 2784 bytes in thread 0009 eip 000000007bcbb325 esp 0000000000130b30 stack 0x130000-0x131000-0x230000
I can post the complete output if necessary, but the other lines appear the same save for some addresses.

I also tried to reproduce the debian build directly, with

Code: Select all

apt source wine-staging
following roughly https://wiki.debian.org/BuildingTutorial, but I get the same error.

User avatar
dimesio
Moderator
Moderator
Posts: 12819
Joined: Tue Mar 25, 2008 10:30 pm

Re: Can't reproduce working debian build

Post by dimesio » Wed Apr 22, 2020 4:41 pm

The WineHQ Debian and Ubuntu packages are built with DEB_CFLAGS_MAINT_STRIP = -fstack-protector-strong to work around https://bugs.winehq.org/show_bug.cgi?id=48161.

spoon0042
Level 5
Level 5
Posts: 304
Joined: Thu Dec 24, 2009 11:00 am

Re: Can't reproduce working debian build

Post by spoon0042 » Wed Apr 22, 2020 5:01 pm

Just checking but you are aware that staging is a separate set of patches that have to be applied to the wine source?

https://wiki.winehq.org/Wine-Staging

mbid
Newbie
Newbie
Posts: 4
Joined: Sun Apr 22, 2018 12:35 am

Re: Can't reproduce working debian build

Post by mbid » Wed Apr 22, 2020 6:59 pm

Thanks, I didn't know about either of those. Unfortunately it's still not working. I configure with

Code: Select all

configure --enable-win64 CFLAGS='-fstack-protector-strong -fcf-protection=full'
 
now and build with

Code: Select all

make -j6
does that look right?

I've tried running the game with wine-devel from the debian repo, which doesn't work. So there's no way I was going to succeed without applying the patches from wine staging. I've applied all patches from wine staging 76900de5bb, which is Release v5.6, to my wine source now. I suppose the debian package includes all patches, too? There's also a Release v5.6.1, not sure which one to use.

Maybe I'm missing some build dependency. I'm building in a clean docker container in which I've installed

Code: Select all

apt-get --yes build-dep wine-staging
apt-get --yes install libvulkan-dev libvkd3d-dev
Configure tells me

Code: Select all

configure: MinGW compiler not found, cross-compiling PE files won't be supported.
configure: libva 64-bit development files not found, GPU video acceleration won't be supported.
configure: libhal 64-bit development files not found, no legacy dynamic device support.
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
configure: libFAudio 64-bit development files not found, XAudio2 won't be supported.
configure: libgcrypt 64-bit development files not found, GCRYPT won't be supported.
are those relevant?

When running the game with the two versions, I noticed that the working version from winehq produces more output than mine:

Code: Select all

002d:fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x300306d, context 0x751c600, init_notify 0, handle 0x7fdfa00): stub
0028:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0043:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0043:fixme:dwmapi:DwmIsCompositionEnabled 0652DD14
0045:fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x2caf537, context 0x6a0be10, init_notify 0, handle 0x741fce8): stub
0043:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
wine: configuration in L"/home/gamer/wow-classic" has been updated.
0059:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFFFFFFFFFA, 0000000003D5FDA0
0009:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.

User avatar
dimesio
Moderator
Moderator
Posts: 12819
Joined: Tue Mar 25, 2008 10:30 pm

Re: Can't reproduce working debian build

Post by dimesio » Thu Apr 23, 2020 7:30 am

mbid wrote:
Wed Apr 22, 2020 6:59 pm
Thanks, I didn't know about either of those. Unfortunately it's still not working. I configure with

Code: Select all

configure --enable-win64 CFLAGS='-fstack-protector-strong -fcf-protection=full'
 
That's the opposite of what the CFLAGS should be; you need -fno-stack-protector and possibly -fcf-protection=none. The issue in bug 48161 is that fstack-protector-strong is baked into Debian's gcc and has to be actively stripped out--that's what DEB_CFLAGS_MAINT_STRIP does in packaging. Ubuntu 19.10 and later has a similar issue with -fcf-protection=full, but AFAIK that's not an issue with Debian.

User avatar
dimesio
Moderator
Moderator
Posts: 12819
Joined: Tue Mar 25, 2008 10:30 pm

Re: Can't reproduce working debian build

Post by dimesio » Thu Apr 23, 2020 7:39 am

Code: Select all

configure: MinGW compiler not found, cross-compiling PE files won't be supported.
configure: libva 64-bit development files not found, GPU video acceleration won't be supported.
configure: libhal 64-bit development files not found, no legacy dynamic device support.
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
configure: libFAudio 64-bit development files not found, XAudio2 won't be supported.
configure: libgcrypt 64-bit development files not found, GCRYPT won't be supported.
The WineHQ packages are built without OSS or libhal, but with the others.

Gcenx
Level 5
Level 5
Posts: 467
Joined: Mon Dec 25, 2017 12:11 pm

Re: Can't reproduce working debian build

Post by Gcenx » Thu Apr 23, 2020 9:24 am

wine-staging-5.6.1 was to fix a build issue on macOS so can be ignored.

mbid
Newbie
Newbie
Posts: 4
Joined: Sun Apr 22, 2018 12:35 am

Re: Can't reproduce working debian build

Post by mbid » Fri Apr 24, 2020 7:02 am

Thanks everybody, I got it to work now! In addition to the build dependencies for debian's wine-staging, I installed

Code: Select all

libvulkan-dev libvkd3d-dev mingw-w64 libva-dev libgcrypt20-dev
now. I don't know which package I need for libFAudio, but it works without it for me.

Curious: Shouldn't those additional dependencies be added to the Build-Depends of the debian packages? It also seems like I get the source for wine-devel if I run apt source wine-staging, is this expected?

Gcenx
Level 5
Level 5
Posts: 467
Joined: Mon Dec 25, 2017 12:11 pm

Re: Can't reproduce working debian build

Post by Gcenx » Fri Apr 24, 2020 9:42 am

You really want FAudio it’s really easy to compile from source, the basic requirement is SDL2 cmake 3.1.3 (C99), for wma audio decoding you also need ffmpeg

zeshable
Newbie
Newbie
Posts: 2
Joined: Thu Jun 18, 2020 7:26 pm

Re: Can't reproduce working debian build

Post by zeshable » Thu Jun 18, 2020 8:06 pm

mbid, could you tell me what you typed in terminal or other things you did to fix it? Thanks.

Post Reply