5.20 staging with new .wine runs once, crashes every subsequent time

Questions about Wine on Linux
Post Reply
invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Sat Jan 09, 2021 6:17 pm

Never ran into this one before so throwing up here in case it looks familiar to someone. LFS building from source

rm -rf ~/.wine-5.20
WINEPREFIX=~/.wine-5.20 winecfg

It works fine.

If I exit and wait for all processes to end and try to run again I get

002c:fixme:winediag:LdrInitializeThunk wine-staging 5.20 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
wine: Unhandled page fault on execute access to 0000000000000000 at address 0000000000000000 (thread 0050), starting debugger...
wine: Unhandled page fault on execute access to 0000000000000000 at address 0000000000000000 (thread 009c), starting debugger...

I didn't notice anything with
WINEDEBUG=+seh
or strace, attaching the logs
logs.zip
(100.47 KiB) Downloaded 19 times

fargodwe
Level 5
Level 5
Posts: 394
Joined: Mon Oct 02, 2017 7:08 am

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by fargodwe » Thu Jan 14, 2021 5:12 pm

Did you install or run wine as root?

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Thu Jan 14, 2021 7:19 pm

Hi! Thank you very much for your reply! I install as root, but run as a regular user.

as reg user:
./configure (x2: 64 bit, 32 bit)
make (x2: 64 bit, 32 bit)

as root:
make install (x2: 64 bit, 32 bit)

as reg user:
rm -rf ~/.wine
winecfg (get the updating .wine popup, winecfg gui comes up)
<exit winecfg, wait till all threads are gone>
winecfg (crashes)

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by Bob Wya » Fri Jan 15, 2021 3:14 pm

invisible kid wrote:
Thu Jan 14, 2021 7:19 pm
...
as reg user:

Code: Select all

./configure (x2: 64 bit, 32 bit)
make (x2: 64 bit, 32 bit)
as root:

Code: Select all

make install (x2: 64 bit, 32 bit)
as reg user:

Code: Select all

rm -rf ~/.wine
winecfg (get the updating .wine popup, winecfg gui comes up)
<exit winecfg, wait till all threads are gone>
winecfg (crashes
)
...
@invisible kid

Nothing is leaping out at me, in your attached logs.

Are you able to build vanilla Wine, from source, and run this?

We'd probably need to see the full logs for the actual build, plus the exact commands used.
If you can attach this - it would probably be easier!

Bob

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Fri Jan 15, 2021 4:43 pm

Thank you very much for the reply! I will do a vanilla build and test and report back with a capture of my process. I can say that this is the same method that I've used for 4.19 and previous, but that might not be useful info for the 5.x series. I will say that any issue that I have that isn't common is probably due to me using the LFS distro and conventions vice a debian-based distro for example.

I am going to try as soon as possible, but might be tied-up tonight and tomorrow. Thanks again, and apologies in advance if it is something I am doing.

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Fri Jan 15, 2021 5:45 pm

Interesting! In staging winecfg will come up the first time after removing .wine, but crash afterwords. Vanilla winecfg crashes first time after removing .wine. I've attached all logs. I think if you open 01-commands.txt it will show which logs map to which commands.
Attachments
wine-5.20-vanilla_capture.tar.xz
(220.02 KiB) Downloaded 17 times

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Fri Jan 15, 2021 7:29 pm

I should also mention I have no "real" /usr/local directory as LFS doesn't require it and leaves it up to you. So my /usr/local -> /usr. You'll see I do use --prefix=/usr. This has only caused me issues like twice out of ~500 packages, but nothing ever serious. For example something I think removed my link and made a real /usr/local directory, but I just manually moved everything and restored the link and the package worked fine. Like twice out of ~500 packages on current install, probably a lot more on previous installs.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by Bob Wya » Mon Jan 18, 2021 3:43 pm

Hi invisible kid,

I've got:

Code: Select all

CFLAGS="... -fpic ..."
in my Gentoo Portage master make.conf build file.

I noticed that your Wine build has:

Code: Select all

...  -fno-PIC ...
in your make logs.

My understanding is that building Wine libraries as non- position independent code can cause problems (as Wine needs to be able force some library mappings in Virtual Memory). Not 100% sure on this though, as I haven't dug into it any depth. :wink:

Bob

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Mon Jan 18, 2021 7:56 pm

Thanks for the reply Bob! That could be it IMO. I'm going to try it first thing in the morning, thx again.

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Mon Jan 18, 2021 10:25 pm

I ended up getting 6.0-rc6 vanilla and staging, and noticed they both run fine with a new .wine. Since my goal was to leave 4.x behind and start on a newer release base, I think I'll be okay with 6.x. So I guess I am going to move on. Thanks a lot for your help!

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by Bob Wya » Tue Jan 19, 2021 7:56 am

@invisible kid

Glad it's working now! You should be able to update to the final Wine stable release of 6.0 now... 8)

I didn't want to complicate matters but Wine is moving towards building most libraries as PE(+) binaries using the mingw64 cross compiler... This was a bit painful to setup on Gentoo - but I think I've got my head around it now!
I guess setting up cross-compilation toolchain, on LFS, might be rather painful though! :? :shock:

I'm not really sure if Alexandre's plan is to ultimately remove support for winegcc built ELF Wine libraries ...

Bob

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Tue Jan 19, 2021 8:36 am

Ahh, okay I will get 6.0 going. mingw64: Yes, this part scares me a little. I tried setting that up a bit ago and mingw64 replaced all my native gcc stuff with mingw64 versions. I had to do a lot of cleanup afterward and was lucky I was able to get myself back to normal, and only because I save all my build directories and was able to go into my original gcc builds and do make installs from there. There were various loose ends to fix when I would try to do something and realized it was broken. It was a nightmare and I'm very scared to go back to that place! I would have to wait for a braver/more competent soul to forge the way and leave instructions.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by Bob Wya » Tue Jan 19, 2021 11:25 am

ha, ha fair enough! :lol:

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Tue Jan 19, 2021 5:31 pm

Verified 6.0 staging runs fine. It's unable to run Diablo II or World of Warcraft correctly, so still using 4.19(can run d2), but I know I can build and install 6.x versions of wine if needed in the future. Thanks again for the help.

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Sun Jan 24, 2021 10:06 am

Okay, now I realize that nowadays you're not fully compiling wine if you don't have mingw-w64 installed. At least I know I can start from a good place with 6.0-staging. Generally speaking, it seems wine is looking for x86_64-w64-mingw32-gcc and i686-w64-mingw32-gcc. It is also looking for similar versions of clang, but I don't think that's required. mingw-w64 has pretty good instructions once you know what wine is looking for. So it looks like the basic outline will be:
First build binutils by the configuration options: '--prefix=<your-sysroot> --with-sysroot=<your-sysroot> --target=x86_64-w64-mingw32 --enable-targets=x86_64-w64-mingw32,i686-w64-mingw32'
Now we can build first stage of gcc. For configuration of gcc, use configure options: '--target=x86_64-w64-mingw32 --enable-multilib --enable-64bit --prefix=<sys-root> --with-sysroot=<sys-root>'
Now add to your PATH environment the folder <sys-root>/bin. To configure our runtime by the options: '--host=x86_64-w64-mingw32 --enable-lib64 --enable-lib32 --prefix=<sys-root> --with-sysroot=<sys-root>
It looks like I will need to perform the gcc portions twice, once for x86_64-w64-mingw32-gcc, and once for i686-w64-mingw32-gcc.
I did something similar when converting LFS to multilib, and will need to add the mingw-w64 options to the multilib options.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by Bob Wya » Sun Jan 24, 2021 11:12 am

@invisible kid

It might be worth taking a look at the Arch Linux mingw package PKGBUILD source files. These are very easy to follow.
E.g. PKGBUILD (mingw-w64-winpthreads 8.0.0-1).

Bob

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Sun Jan 24, 2021 11:32 am

Thanks! This will definitely help. I'll hopefully have a chance to attempt by next weekend.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by Bob Wya » Sun Jan 24, 2021 2:54 pm

np 8) ... Good luck!

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Sat Feb 13, 2021 2:45 pm

Okay, so when I started looking at this again I double-checked google, and found I don't have to compile mingw-w64, there are provided binaries. The initial webpage:

https://www.eknori.de/2015-10-23/build- ... -on-linux/

So, I got:
mingw-w32-bin_x86_64-linux_20131227.tar.bz2
mingw-w64-bin_x86_64-linux_20131228.tar.bz2

from:

https://sourceforge.net/projects/mingw-w64/files/

by going to:

Toolchains targetting Win32 -> Automated Builds
Toolchains targetting Win64 -> Automated Builds

I extracted them inside:
/opt/mingw-w32
/opt/mingw-w64

Then when building wine I add them to my PATH:
export PATH=${PATH}:/opt/mingw-w64/bin:/opt/mingw-w32/bin

And wine-staging 6.0 seemed to detect and build with it fine.
Diablo II is working
Wow is working, but without visible mouse pointer/cursor and low framerate
Battle.net comes up but with completely black window

So I'm in a good spot now I think. 4.19-staging will currently run everything but wow, and 6.0-staging can run wow, so I'll just switch between the two until I get everything working with one version. Thanks for all of the help!

Edited to add: Wow cursor started working : D

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Sat Feb 13, 2021 3:45 pm

Turning off browser hardware acceleration fixes battle.net black window

User avatar
Bob Wya
Level 12
Level 12
Posts: 2987
Joined: Sat Oct 16, 2010 7:40 pm
Location: Scotland
Contact:

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by Bob Wya » Sat Feb 13, 2021 4:45 pm

@invisible kid

Ah that's great!
The pre-built mingw-w64 binary tarballs look handy! 8)

Bob

invisible kid
Level 3
Level 3
Posts: 60
Joined: Tue Dec 24, 2019 3:23 pm

Re: 5.20 staging with new .wine runs once, crashes every subsequent time

Post by invisible kid » Sat Feb 13, 2021 5:33 pm

I was pleasantly surprised to say the least!

Post Reply