Bug 28814 - Wine 32bit install on 64bit system doesn't pull mesa 32bit drivers
Summary: Wine 32bit install on 64bit system doesn't pull mesa 32bit drivers
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard: MGA8TOO
Keywords: FOR_ERRATA9, IN_ERRATA8
Depends on:
Blocks:
 
Reported: 2021-04-20 15:09 CEST by Aurelian R
Modified: 2023-03-20 14:48 CET (History)
4 users (show)

See Also:
Source RPM: wine-6.6-1.mga9.src.rpm
CVE:
Status comment:


Attachments
wine related spec files (14.24 KB, application/gzip)
2021-04-20 15:09 CEST, Aurelian R
Details
spec file that fixes pulling of 32bit libs on 64bit systems (36.56 KB, text/x-matlab)
2021-04-26 17:12 CEST, Aurelian R
Details
The list of rpms rpms installed alongside wine64, wine32 on a clean system (7.90 KB, text/plain)
2021-04-26 17:54 CEST, Aurelian R
Details
workaround for xrandr 32bit crashing wine64 (38.71 KB, text/x-matlab)
2021-04-27 11:09 CEST, Aurelian R
Details
again workaround for xrandr 32bit crashing wine64 (36.55 KB, text/x-matlab)
2021-04-27 11:22 CEST, Aurelian R
Details
spec and vulkan patch (12.17 KB, application/gzip)
2021-05-13 21:30 CEST, Aurelian R
Details
spec files for wine-6.10 for mga8/9 (7.95 KB, application/gzip)
2021-06-05 21:19 CEST, Aurelian R
Details
wine-6.11 spec file (24.12 KB, text/x-matlab)
2021-06-20 16:19 CEST, Aurelian R
Details
Spec for wine-6.12 with enabled support for wine-staging-6.12.1 (26.22 KB, text/x-matlab)
2021-07-08 22:01 CEST, Aurelian R
Details
wine-mono-6.3.0 spec file that should work for both Mageia8 and Cauldron (4.55 KB, text/plain)
2021-08-15 21:39 CEST, Aurelian R
Details
wine spec for current Mageia 8 (35.43 KB, text/x-matlab)
2022-01-28 21:17 CET, Aurelian R
Details
wine spec file for Mageia 8/Cauldron (23.49 KB, text/x-matlab)
2022-07-23 15:23 CEST, Aurelian R
Details
wine-6.0 spec file for mga8 (34.59 KB, text/x-matlab)
2022-07-24 22:15 CEST, Aurelian R
Details
wine-7.12 spec file for cauldron (20.89 KB, text/x-matlab)
2022-07-24 22:17 CEST, Aurelian R
Details
wine patch for mingw flags (908 bytes, patch)
2022-11-17 00:51 CET, Aurelian R
Details | Diff
wine-7.21 spec file for Cauldron (20.96 KB, text/x-matlab)
2022-11-17 19:30 CET, Aurelian R
Details
revized spec file for aarch64 (19.40 KB, text/x-matlab)
2022-11-20 21:35 CET, Aurelian R
Details
Fixed spec file (19.06 KB, text/x-matlab)
2022-12-04 22:20 CET, Aurelian R
Details
spec file with fixed staging and armv7hl enabled (19.08 KB, text/x-matlab)
2022-12-06 21:10 CET, Aurelian R
Details
fix wine loading 32bit rpms (20.78 KB, text/x-matlab)
2022-12-12 17:39 CET, Aurelian R
Details
wine spec file for arm/aarch64/x86 (21.05 KB, text/x-matlab)
2022-12-12 17:40 CET, Aurelian R
Details

Description Aurelian R 2021-04-20 15:09:15 CEST
Created attachment 12655 [details]
wine related spec files

Description of problem:

   Installing Wine on 64bit systems with old graphics that require mesa drivers has some issues running 32bit apps. Specifically, the 32bit mesa drivers are not installed together with wine32 from the 32bit repos and these drivers have to be manually installed, which by itself is annoying and for a new user even discouraging. I attached a modified spec file for the current wine from Cauldron that avoids these issues. This is also beneficial to other packages like q4wine and playonlinux that rely on wine(https://bugs.mageia.org/show_bug.cgi?id=28717).
Furthermore, wine-geko and wine-mono packages may be rebuild like Suse does to save disk space and to reduce build time and winetricks should be also introduced imo to Mageia packages as it is once in awhile requested by users. In the attached archive are also the spec files for those. 
I posted this bug( enhancement more likely) hopping that it will help packagers and users alike. It's a lot of fussing around ;), but hopefully will make Wine issues more manageable for Mageia's users.

How reproducible:
Always

Steps to Reproduce:
1. install wine64 on a system using nvidia390 driver and have 32bit repos enabled 
2. while wine32 is installed, mesagl and mesaglu 32bit libraries are not installed and windows apps using them fail to start.
Comment 1 Lewis Smith 2021-04-20 21:12:32 CEST
Thank you for the report and all the additional details.
> while wine32 is installed, mesagl and mesaglu 32bit libraries
> are not installed and windows apps using them fail to start
This is the essential point, and users would not be expected to know about that.
The other suggestions are certainly enhancements, which tv (our Wine maintainer) can judge.

Assignee: bugsquad => thierry.vignaud

Morgan Leijström 2021-04-21 12:09:01 CEST

CC: (none) => fri

Comment 2 Morgan Leijström 2021-04-23 01:07:19 CEST
Added notes to
https://wiki.mageia.org/en/Ways_to_install_programs#Wine
https://wiki.mageia.org/en/Ways_to_install_programs#PlayOnLinux

Is mesa 64 bit always installed when needed?

I see steam require libmesagl1 and libmesaglu1.

I wonder if not also Lutris should?
Comment 3 Aurelian R 2021-04-23 10:32:52 CEST
comment #2
> Is mesa 64 bit always installed when needed?
It is on my system that doesn't support vulkan. My video card is quite old and uses nvidia390 driver.

> I wonder if not also Lutris should?
Looking at the spec file, it seems that Lutris pulls only libmesagl1 and libmesaglu1 not. 

Recommends:     %{_lib}mesagl1
Recommends:     %{_lib}mesavulkan-drivers
Recommends:     %{_lib}vulkan-loader1
%ifarch x86_64
Recommends:     libmesagl1
Recommends:     libmesavulkan-drivers
Recommends:     libvulkan-loader1
%endif

I don't know how wine makes use of libmesaglu or if wine accesses this library at all. Across many distros wine is wildly differently implemented. Side note, better to have it available than not... 

> I see steam require libmesagl1 and libmesaglu1.
That is a good point, however, steam has it's own way to deal with these libraries even thou at base is still related to wine(called proton if I'm not mistaking).
Morgan Leijström 2021-04-26 13:10:19 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=28840

Comment 4 Morgan Leijström 2021-04-26 13:22:47 CEST
One more dep:
Bug 28840 - wine32 should require libjpeg.so.8

https://wiki.mageia.org/en/Mageia_8_Errata#Various_software
Morgan Leijström 2021-04-26 13:23:04 CEST

Keywords: (none) => IN_ERRATA8

Morgan Leijström 2021-04-26 13:25:01 CEST

Whiteboard: (none) => MGA8TOO

Comment 5 Aurelian R 2021-04-26 17:12:17 CEST
Created attachment 12675 [details]
spec file that fixes pulling of 32bit libs on 64bit systems

  Managed to figure out why there are missing 32bit libs when wine32 is installed on 64bit systems. Turns out that on 32bit systems these libraries where required only by wine package( which is mainly a container ) not by wine32 package that is pulled on 64bit systems. This error has to do with how Wine is build on 32bit vs 64bit. I tested this spec file and it does pull all kinds of 32bit libraries alongside the wine32, including the libjpeg.so from bug https://bugs.mageia.org/show_bug.cgi?id=28840

Regards.
Comment 6 Aurelian R 2021-04-26 17:54:09 CEST
Created attachment 12676 [details]
The list of rpms  rpms installed alongside wine64, wine32 on a clean system

Attached is the list of all rpms installed alongside wine64 on a clean 64bit system(Cauldron) with Core 32bit repository enabled using the updated wine.spec file.
Comment 7 Aurelian R 2021-04-27 11:09:17 CEST
Created attachment 12677 [details]
workaround for xrandr 32bit crashing wine64

Turns out there is an issue with installing libxrandr2-1.5.2-2.mga8.i586.rpm on a 64bit system, this is valid for Mageia 8 and Cauldron. The newly attached wine.spec avoids loading xrandr 32bit on a 64bit system for the moment.
Sorry for not checking right away the previous spec file.
Comment 8 Aurelian R 2021-04-27 11:22:30 CEST
Created attachment 12678 [details]
again workaround for xrandr 32bit crashing wine64

Wrong file loaded previously

Attachment 12677 is obsolete: 0 => 1

Aurelien Oudelet 2021-04-30 10:31:13 CEST

CC: (none) => ouaurelien
Assignee: thierry.vignaud => rverschelde
Source RPM: (none) => wine-6.6-1.mga9.src.rpm

Comment 9 Aurelian R 2021-05-13 21:30:55 CEST
Created attachment 12711 [details]
spec and vulkan patch

 Attached are a wine.spec and a vulkan child window patch for Wine-6.8 that works fine  on my 64bit Mga 8 and Cauldron systems. I'm not sure thou about the vulkan patch, it does compile fine and doesn't hinders my 32bit Windows apps under Wine but I'm not able to properly test it. I haven't found yet a solution for the xrandr issue mentioned previously. Hope these files will be helpful.
cheers.
Comment 10 Aurelian R 2021-06-05 21:19:03 CEST
Created attachment 12752 [details]
spec files for wine-6.10 for mga8/9

Spec files attached for wine 6.10/wine-mono 6.2.0, in the spirit of previous discussion.

For some reasons mga8 requires a python patch for wine-mono while mga9 not( different python versions?). 
Wine spec file for Cauldron has now all supported build required libraries configured with pkgconfig but couple of them( libpng, libffmpeg), plus some cosmetics in play :).
These settings work fine for my system.
Cheers.
Comment 11 Aurelian R 2021-06-20 16:19:51 CEST
Created attachment 12802 [details]
wine-6.11 spec file

Attached is a spec file for wine 6.11 in which I try to keep Mageia's settings for Wine and clearly separate for convenience some extra options which are already available on Mageia.
Regards.
Comment 12 Aurelian R 2021-07-08 22:01:50 CEST
Created attachment 12851 [details]
Spec for wine-6.12 with enabled support for wine-staging-6.12.1

Attached is a spec file for wine 6.12 that can be used for both mga8 and cauldron with fixed wine-staging support. To generate wine-staging rpms, besides getting the sources for it, the switch "with_staging" has to be set. The generated rpms will keep the same naming scheme as normal wine but adds "-staging"(i.e. wine64-staging-6.12-1.mga8.X86_64.rpm) and they will conflict with normal wine such that one cannot mix packages like 32bit wine with 64bit wine-staging.

Note: While rpmbuild can use the attached wine.spec file as is to generate wine-staging rpms with no issue, iurt will not build it up if the name of spec file is not set to "wine-staging.spec", i.e. "Name" tag in the spec file.

Note: Patch wine-mgaconf.patch has to be rediff in principle for wine-staging or eliminate one patch from staging("-W ntdll-ext4-case-folder") but I choose to do an ugly fix directly into the spec file as it was less cumbersome than to keep track of another patch file.

Hope some users will enjoy it or not.
Regards
Rémi Verschelde 2021-07-23 22:38:40 CEST

CC: (none) => thierry.vignaud
Assignee: rverschelde => pkg-bugs

Comment 13 Aurelian R 2021-08-15 21:39:03 CEST
Created attachment 12902 [details]
wine-mono-6.3.0 spec file that should work for both Mageia8 and Cauldron

(In reply to Aurelian R from comment #7)

 I found that the issue with xrandr2 may be either specific to nvidia390 driver as now I got hold of an ATI card which is not affected by having the 32bit xrandr2 loaded on my 64bit system or it is a solved issue in wine 6.15 version. I'm not sure which one it is.

Note: Attached is a spec file for wine-mono 6.3.0 which is required for wine version >= 6.14 with an in-line fix that makes it viable for both Cauldron and Mageia 8, The other spec files uploaded previously should still be good to go for Mageia8/Cauldron once proper wine versions are set within.

PS: For latest wine-mono I had to use iurt(a.k.a. basesystem-minimal setup) in order to get a proper rpm package for Cauldron. Building wine-mono with rpmbuild on my bloated Cauldron system generated a rpm package that, for unknown reasons to me, had some weird mono dependencies that prevented the package to be installed.

Regards.
Comment 14 Morgan Leijström 2022-01-28 15:55:44 CET
ping?
Comment 15 Aurelian R 2022-01-28 21:17:41 CET
Created attachment 13109 [details]
wine spec for current Mageia 8

 The main issues of the bug are still in play.
- First one, the most important, is that installing wine64 and wine32 rpm packages in a 64bit system doesn't pull the core 32bit libraries necessary to run 32bit apps, i.e. a lot of windows 32bit will fail to start.
- Secondly, the wine packaging should have a soft dependency on those libraries, meaning that uninstalling one of these libraries will not uninstall the whole wine stack.

Attached is a spec file that fixes the first issue. For the second issue, replacing "Requires:" with "Recommends:" doesn't seem to fix it. However, it is better in a sense that if any of these libraries are in conflict/missing for any reason it will not be installed but wine package with the rest of libraries will be(maybe less functionality versus none).

Regards.
Comment 16 Aurelian R 2022-07-23 15:23:17 CEST
Created attachment 13345 [details]
wine spec file for Mageia 8/Cauldron

I've seen some bugzilla activity about wine issues and decided to post my current wine spec file in which I added an option to compile wine-6.0 that is currently available in Mageia 8 repos( at line 81 use %bocond_without wine_6/%bocond_with wine_6 to turn it ON/OFF). 
The spec file solves bug 28840, bug 30462, and partially(see comment #15) this bug report as these are all related and point to the same problem in fact, i.e. the structure of the spec file. The file should work fine also for the latest stable(7.0)/devel(7.13) release of wine on both Mageia 8/Cauldron. 
As I mentioned in my previous comments I'm able to test only on x86 systems, no arm.  

Regards.

Attachment 12675 is obsolete: 0 => 1
Attachment 12678 is obsolete: 0 => 1
Attachment 12802 is obsolete: 0 => 1
Attachment 12851 is obsolete: 0 => 1
Attachment 13109 is obsolete: 0 => 1

Comment 17 Aurelian R 2022-07-24 22:15:11 CEST
Created attachment 13347 [details]
wine-6.0  spec file for mga8

I have realized that the uploaded spec files have too many changes and maybe they are too bloated to be helpful. I will upload the spec files for wine-6.0(Mga8) and wine-7.12(cauldron) that are hopefully simpler to work with in order to help close this bug.

Regards
Comment 18 Aurelian R 2022-07-24 22:17:02 CEST
Created attachment 13348 [details]
wine-7.12 spec file for cauldron
Comment 19 Morgan Leijström 2022-07-24 23:32:40 CEST
Thank you for working on this :)

For Cauldron, I see development release 7.13 is released.

I notice that current stable since January is 7.0.
https://www.winehq.org/news/2022011801
I find it odd there is not yet a 7.x maintenance release, just development releases...

Would there be pitfalls upgrading mga8 to 7.0?

Or at least update mga8 to maintenance release 6.0.4.
Comment 20 Aurelian R 2022-07-25 01:04:48 CEST
 Packaging wise, there is not much of a difference between 7.12 and 7.13 versions besides source files.
For MAgeia 8, I don't recall any problems going from 6.x to 7.0, at least not for my limited wine needs, ;). However, this being wine, there are not warranties that something will not gonna break.
Comment 21 sturmvogel 2022-07-25 06:08:24 CEST
Normally there is no problem to make a major version jump for wine. In most cases the support for different windows applications gets even better. But as Aurelian said, there is no guarantee.

But that doesn't really matter, because even the wine developers can't guarantee that a special windows application won't break with an update of wine. But this are "3rd party" applications and wine is an application layer...so who cares...
Users of wine are in most cases not total noobs because you need often special knowledge to get your wanted windows application application to work.

So we should go for wine 7.x in Mageia 8...
Comment 22 Morgan Leijström 2022-10-07 13:54:15 CEST
I see Wine 7.16 is in Cauldron, great :)
(Apart from that I have not tested anything.)
Comment 23 Aurelian R 2022-11-17 00:51:42 CET
Created attachment 13511 [details]
wine patch for mingw flags

For wine-7.21, attached is a patch to fix compiler flags for mingw that works for me. First part of it allows finding the mingw libs, while the second part removes LDFLAGS which hinder mingw compiler to identify extra flags.
Also, there is a bug in wine-7.21 for aarch64 (https://bugs.winehq.org/show_bug.cgi?id=53923) that is fixed by commit:
https://github.com/wine-mirror/wine/commit/266c97107b698ef70946e27b14b9529e9b4bc7e2.patch
Haven't tested the aarch64, but x86 works fine.

Regards.
Comment 24 Dave Hodgins 2022-11-17 04:09:41 CET
The aarch64 repos do not have 32bit repos, so wine32 and other 32 bit only
software is not available.
http://mirrors.kernel.org/mageia/distrib/8/aarch64/media/

The package wine is not included, just ...
wine64
wine64-devel
wine64-gecko
wine-gecko
wine-mono

I just installed wine64 and it's deps on my rpi 4b. "wine64 winefile" 
is working on it.

CC: (none) => davidwhodgins

Comment 25 Aurelian R 2022-11-17 19:30:35 CET
Created attachment 13521 [details]
wine-7.21 spec file for Cauldron

Attached is wine-7.21 spec file for cauldron.
Besides the previously mentioned patches( comment 23 ) and files fixes, there seems to be no more need to remove "--disable-stdcall-fixup" flag in order to compile wine on i586 arch.
Comment 26 Aurelian R 2022-11-20 21:35:53 CET
Created attachment 13524 [details]
revized spec file for aarch64

Hopefully, the attached spec file fixes the aarch64 build too. It worked to build wine for aarch64 with mock, though there is no way for me to test it.
Comment 27 Aurelian R 2022-12-04 22:20:34 CET
Created attachment 13542 [details]
Fixed spec file

It looks like in the latest uploaded spec files I broke the loading of 32bit rpms on 64bit system, basically the whole point of this bug. So, I attached a spec file that has been tested in a clean VM setup, also it builds fine aarch64 rpms with mock. The patch loaded previously is still valid for wine-7.22. 
Regards.

Attachment 13521 is obsolete: 0 => 1
Attachment 13524 is obsolete: 0 => 1

Comment 28 Aurelian R 2022-12-06 21:10:46 CET
Created attachment 13547 [details]
spec file with fixed staging and armv7hl enabled

Clean up and fix staging build and it turns out that wine builds just fine for armv7hl(using gcc) with mock.
So, there should be possible to have
wine        for armv7hl
wine+wine32 for ix86 
wine64      for aarch64(no 32bit support) and x86_64(32bit support with wine32 pkg)

Attachment 13542 is obsolete: 0 => 1

Comment 29 Aurelian R 2022-12-12 17:39:02 CET
Created attachment 13564 [details]
fix wine loading 32bit rpms

The current wine still doesn't fix this bug.
The fix is a straight forward arrangement of the spec file such that the wine32 rpm will pull the required 32bit libs necessary for 32bit support on x86_64 systems. I attached this minimal change to the current wine.spec file in order to close this bug and a couple more related bugs.

P.S.: At this moment wine doesn't build for aarch64 and it fails to use Mageia provided mingw libraries, like mingw32-faudio. However, using the patch https://bugs.mageia.org/attachment.cgi?id=13511, wine packages build successfully for all Mageia arches, although I've tested wine pkgs only on x86 syatems. I will upload my proposed wine spec file too.
Comment 30 Aurelian R 2022-12-12 17:40:44 CET
Created attachment 13565 [details]
wine spec file for arm/aarch64/x86
Comment 31 Morgan Leijström 2023-03-16 17:12:54 CET
So what is the status here
For mga8?
For mga9?

I see a user tested mga9 OK for wine32, but no details.
https://forums.mageia.org/en/viewtopic.php?t=14889
Morgan Leijström 2023-03-16 17:23:54 CET

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=30462

Comment 32 Aurelian R 2023-03-20 14:42:14 CET
Sorry for this late response, situation normal ...

While most of the mesa libs, for which this bug was created, are loaded, only 2 remain, namely osmesa8 and mesaglu1. However, there are a bunch of other 32lib that are not pulled by wine32 package besides the mingw libs( bug 30462 ) that mainly have the same reason for not being loaded. Comment 29 still relevant.

Regards.
Comment 33 Morgan Leijström 2023-03-20 14:48:26 CET
OK thank you for the status view.
Assuming relevant in mga9 too then.

Keywords: (none) => FOR_ERRATA9


Note You need to log in before you can comment on or make changes to this bug.