Bug 256782 - emulators/i386-wine & i386-wine-devel: Broken with libglvnd
Summary: emulators/i386-wine & i386-wine-devel: Broken with libglvnd
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Alexander Vereeken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-22 20:48 UTC by Alexander Vereeken
Modified: 2021-06-26 21:40 UTC (History)
2 users (show)

See Also:


Attachments
i386-wine & i386-wine-devel fixed for AMD & NVIDIA with libglvnd enabled (10.78 KB, patch)
2021-06-26 08:46 UTC, Alexander Vereeken
Alexander88207: maintainer-approval+
Details | Diff
newdistinfo.diff (3.37 KB, patch)
2021-06-26 09:40 UTC, Alexander Vereeken
Alexander88207: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Vereeken 2021-06-22 20:48:48 UTC
Hello,

when new Wine versions are built with libglvnd, Wine can no longer initialize OpenGL (at least for me).

This seems to be a problem for the packaged i386 builds, because it runs fine for me on 64-bit. I spent an afternoon trying to figure out what the problem might be, but couldn't find a solution.

Currently the builds are still offered without libglvnd to at least ensure running on AMD and Intel cards.

I'm sorry for the affected NVIDIA¹ users (?) that i can't think of a solution to the problem, so i'm asking for help here.

Many thanks in advance!

1: 0024:err:winediag:X11DRV_WineGL_InitOpenglInfo Direct rendering is disabled, most likely your 32-bit OpenGL drivers haven't been installed correctly (using GL renderer "GeForce GTX 650......
Comment 1 Kevin Bowling freebsd_committer freebsd_triage 2021-06-23 21:49:30 UTC
I think the ask here would be to create a lib32 version of libglvnd.

Could you give me a step-by-step of how to see this in the form of something like a shell script?

Out of curiosity is there some reason to not run 64-bit wine and make this port i386 only?
Comment 2 Alexander Vereeken 2021-06-23 21:59:08 UTC
(In reply to Kevin Bowling from comment #1)

< Out of curiosity is there some reason to not run 64-bit wine and make this port i386 only?

Use the port emulators/wine for 32-bit Windows binaries in an i386 environment or
64-bit Windows binaries in an amd64 environment; use emulators/i386-wine
for 32-bit Windows binaries in an amd64 environment.

This is because FreeBSD cant cross compile.

> I think the ask here would be to create a lib32 version of libglvnd.

I may have already an idea which is in testing.
Comment 3 Alexander Vereeken 2021-06-24 04:02:50 UTC
(In reply to Alexander Vereeken from comment #2)

My idea didn't work, normally it shouldn't be necessary to create an extra lib32 glvnd package since the build script itself bundles the needed library, like for the mesa-dri or other small libraries like gnutls, faudio etc.

> Could you give me a step-by-step of how to see this in the form of something like a shell script.

What would you like to see in the form of a shell script?

If you mean to create such an i386-wine package you can take a look at https://wiki.freebsd.org/i386-Wine
Comment 4 Alexander Vereeken 2021-06-24 04:16:23 UTC
Nice.

The problem seems to be that the new renamed library's with _mesa are missing.

I will create a patch today :)
Comment 5 Kevin Bowling freebsd_committer freebsd_triage 2021-06-24 19:27:44 UTC
(In reply to Alexander Vereeken from comment #3)
I don't actually use wine so whatever is necessary to see the bug after 'pkg install', if it can be distilled to some commands that will reduce the time I need to spend doing generic research and spend it on fixing the issue :)

(In reply to Alexander Vereeken from comment #4)
Which files specifically are missing?  Is it an issue with mesa-libs or libglvnd?
Comment 6 Alexander Vereeken 2021-06-24 19:53:16 UTC
The port did not take libGLX_mesa with it and a few other x11 libraries that were naturally copied to the lib32 directory. But this is a problem by the port and not from mesa-libs or libglvnd.

I'm still waiting for feedback from one if nvidia is working again and then i can rebuild & submit the binaries with libglvnd enabled.

To reproduce this issue:

Just run an application that requires at least OpenGL to trigger that stuff and then you should have a error message like in my first message.
Comment 7 Kevin Bowling freebsd_committer freebsd_triage 2021-06-25 00:02:19 UTC
(In reply to Alexander Vereeken from comment #6)
Ok I'll await that feedback and jump in if it needs more help.  If it works, I'll commit it with your approval.
Comment 8 Alexander Vereeken 2021-06-26 08:46:44 UTC
Created attachment 226056 [details]
i386-wine & i386-wine-devel fixed for AMD & NVIDIA with libglvnd enabled

Attached is the patch for the two ports (i386-wine & i386-wine-devel), there are also other very little internal improvements.

If you think it should run separately then i can also send both separately.

I thank Daniel for reporting and testing with NVIDIA and you Kevin for your helpfulness :)

Reported by: 	Daniel Menelkir <menelkir@itroll.org>

Tested by: 	Daniel Menelkir <menelkir@itroll.org> [using NVIDIA], 
		Alexander Vereeken <Alexander88207@protonmail.com> (maintainer) [using AMD]
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-06-26 09:06:14 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0600023cb017513806f58d632b68fd1c966fd1bd

commit 0600023cb017513806f58d632b68fd1c966fd1bd
Author:     Alexander Vereeken <Alexander88207@protonmail.com>
AuthorDate: 2021-06-26 09:01:15 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-06-26 09:04:54 +0000

    emulators/i386-wine{-devel}: Fix libglvnd

    PR:             256782
    Reported by:    Daniel Menelkir <menelkir@itroll.org>
    Tested by:      Daniel Menelkir <menelkir@itroll.org>

 emulators/i386-wine-devel/Makefile       |  2 +-
 emulators/i386-wine-devel/Makefile.amd64 |  2 +-
 emulators/i386-wine-devel/Makefile.i386  | 21 +++++++++++++++++++++
 emulators/i386-wine-devel/distinfo       | 18 +++++++++---------
 emulators/i386-wine-devel/pkg-plist      |  3 +++
 emulators/i386-wine/Makefile             |  3 +++
 emulators/i386-wine/Makefile.amd64       |  4 ++--
 emulators/i386-wine/Makefile.i386        | 21 +++++++++++++++++++++
 emulators/i386-wine/distinfo             | 18 +++++++++---------
 emulators/i386-wine/pkg-plist            |  3 +++
 10 files changed, 73 insertions(+), 22 deletions(-)
Comment 10 Kevin Bowling freebsd_committer freebsd_triage 2021-06-26 09:06:40 UTC
LGTM, thanks for your contribution!
Comment 11 Alexander Vereeken 2021-06-26 09:40:12 UTC
Created attachment 226057 [details]
newdistinfo.diff

You have seen that i have made a mistake in the portrevision, here is the new distinfo.
Comment 12 Kevin Bowling freebsd_committer freebsd_triage 2021-06-26 18:48:43 UTC
(In reply to Alexander Vereeken from comment #11)
Thanks, not sure how I missed that.  I found one other issue, can you check the LICENSE_FILE for i386-wine (for at least the FreeBSD 14 dist file)
Comment 13 Kevin Bowling freebsd_committer freebsd_triage 2021-06-26 18:56:34 UTC
(In reply to Kevin Bowling from comment #12)
i386-wine-devel uses:
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${EXTRACT_ONLY} -C ${WRKDIR} --include '/usr/local/share/licenses/[^/]*/LICENSE' -s '|/usr/local/share/licenses/[^/]*/||g'

i386-wine uses:
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${EXTRACT_ONLY} -C ${WRKDIR} --include '/usr/local/share/licenses/${DISTNAME}/LICENSE' -s '|/usr/local/share/licenses/${DISTNAME}/||g'

The rest of the distfile looks ok to me, would it be ok if I adopt the i386-wine-devel license extract for i386-wine?
Comment 14 Alexander Vereeken 2021-06-26 19:44:41 UTC
I see because the version mismatch, sure good catch.
Comment 15 commit-hook freebsd_committer freebsd_triage 2021-06-26 21:38:14 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3da5204497006152dbc5cbb73fb0e10002e7de6c

commit 3da5204497006152dbc5cbb73fb0e10002e7de6c
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2021-06-26 21:33:10 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-06-26 21:36:35 +0000

    emulators/i386-wine{-devel}: fix distfile issues

    * Use the i386-wine-devel distfile extraction in i386-wine
    * Update distinfo

    PR:             256782
    Approved by:    maintainer (Alexander Vereeken <Alexander88207@protonmail.com>)
    Fixes:          0600023cb017 emulators/i386-wine{-devel}: Fix libglvnd

 emulators/i386-wine-devel/distinfo | 18 +++++++++---------
 emulators/i386-wine/Makefile.amd64 |  2 +-
 emulators/i386-wine/distinfo       | 18 +++++++++---------
 3 files changed, 19 insertions(+), 19 deletions(-)
Comment 16 Kevin Bowling freebsd_committer freebsd_triage 2021-06-26 21:40:04 UTC
Thanks a lot for your patience on this, I think we can close this out now.  I'll be happy to handle any remaining fallout.