Bug 278525 - emulators/wine: /usr/local/share/wine/pkg32.sh error updating repositories
Summary: emulators/wine: /usr/local/share/wine/pkg32.sh error updating repositories
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-22 09:35 UTC by Eduardo C.
Modified: 2024-05-09 06:51 UTC (History)
8 users (show)

See Also:
gerald: maintainer-feedback-


Attachments
0001-emulators-wine-Fix-pkg32.sh.patch (1.10 KB, patch)
2024-04-23 17:37 UTC, Alexander Vereeken
no flags Details | Diff
0001-emulators-wine-Fix-pkg32.sh.patch (5.17 KB, patch)
2024-05-04 16:04 UTC, Alexander Vereeken
no flags Details | Diff
0001-emulators-wine-Fix-pkg32.sh.patch (5.21 KB, patch)
2024-05-04 17:00 UTC, Alexander Vereeken
Alexander88207: maintainer-approval? (gerald)
Alexander88207: maintainer-approval? (iwtcex)
Details | Diff
patch-dlls_ntdll_unix_loader.c fixed (821 bytes, patch)
2024-05-06 04:36 UTC, Alex S
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo C. 2024-04-22 09:35:01 UTC
After upgrading my packages using the pkg program I went to /usr/local/share/wine to update my 32bit wine packages and after running ./pkg32.sh upgrade I've got this error:

$ ./pkg32.sh upgrade                    
pkg -o ABI=FreeBSD:14:i386 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir /home/idude/.i386-wine-pkg upgrade
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100%    178 B   0.2kB/s    00:01    
Fetching data.pkg: 100%    7 MiB   1.2MB/s    00:06    
Processing entries:   0%
pkg: Newer FreeBSD version for package zziplib:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1400097
- running kernel: 0

pkg: repository FreeBSD contains packages for wrong OS version: FreeBSD:14:i386
Processing entries:   0%
Unable to update repository FreeBSD
Error updating repositories!
Comment 1 Gerald Pfeifer freebsd_committer freebsd_triage 2024-04-22 20:34:34 UTC
I have never used this 32-/64-bit contraption though included it for
the sake of those submitting and using it.

Alexander, Sean, Dwayne, Alistair, do you have any thoughts for Eduardo?
Comment 2 Dwayne MacKinnon 2024-04-22 21:20:34 UTC
(In reply to Eduardo C. from comment #0)
Hi Eduardo,

The error message suggests a mismatch between the version of FreeBSD that you're running and the version that built the packages. Can you report the output of

sysctl kern.osreldate

please?

If it returns 1400097 I would suggest removing everything from your .i386-wine-pkg directory and trying a fresh install with `pkg32.sh install` .
Comment 3 Eduardo C. 2024-04-22 22:10:15 UTC
(In reply to Dwayne MacKinnon from comment #2)

Hello Dwayne,

I ran that command and returns 1400097.  I deleted .i386-wine-pkg directory and ran 'pkg32.sh install wine mesa-dri', I got exactly the same error!
Comment 4 Eduardo C. 2024-04-22 22:15:51 UTC
(In reply to Dwayne MacKinnon from comment #2)
I forgot to mention that I use pkg install to install all my packages, I'm not building the ports locally.
Comment 5 Dwayne MacKinnon 2024-04-23 00:29:35 UTC
(In reply to Eduardo C. from comment #4)

Ok. Could you post the contents of /etc/pkg/FreeBSD.conf ?
Comment 6 Sean Farley freebsd_committer freebsd_triage 2024-04-23 04:02:42 UTC
I build locally and also see the same message:

To ignore this error set IGNORE_OSVERSION=yes
- package: 1400510
- running kernel: 0

$ sysctl kern.osreldate
kern.osreldate: 1400510

My system is stable/14-n267222-89dd0612d933.

Could it be the latest pkg (v1.21.2)?
Comment 7 Dwayne MacKinnon 2024-04-23 04:19:01 UTC
(In reply to Sean Farley from comment #6)
I'm running into the same thing updating my local i386 repository. I agree, this is looking like a problem with pkg.
Comment 8 Eduardo C. 2024-04-23 14:07:51 UTC
(In reply to Dwayne MacKinnon from comment #5)

My /etc/pkg/FreeBSD.conf:

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

My /usr/local/etc/pkg/repos/FreeBSD.conf:

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
Comment 9 Alexander Vereeken 2024-04-23 17:37:53 UTC
Created attachment 250187 [details]
0001-emulators-wine-Fix-pkg32.sh.patch

Hello,

this patch should fix the issue.

Regards.
Comment 10 Eduardo C. 2024-04-24 00:17:28 UTC
(In reply to Alexander Vereeken from comment #9)

The ones using pkg command we still have to wait for the new wine to be packaged with this patch, correct?
Comment 11 Eduardo C. 2024-04-24 00:29:47 UTC
(In reply to Alexander Vereeken from comment #9)
I tried with other versions of wine including wine8 and I still get the same error.
Comment 12 Alexander Vereeken 2024-04-24 04:27:45 UTC
(In reply to Eduardo C. from comment #10)

You can just edit this script by hand with an editor.
Comment 13 Eduardo C. 2024-04-24 10:56:08 UTC
(In reply to Alexander Vereeken from comment #12)
I can't script, I wouldn't know what to expect if I did any editing!
Comment 14 Eduardo C. 2024-04-24 11:19:21 UTC
(In reply to Alexander Vereeken from comment #12)
After playing with it a bit I decided to edit /usr/local/share/wine/pkg32.sh and added those lines that you have in the script to look like this:

ABI=$(pkg config ABI | sed s/amd64/i386/)
OSVERSION=$(pkg config OSVERSION)
PKG_DBDIR=$I386_ROOT/var/db/pkg
# Show what we're going to do, then do it.
echo pkg -o ABI="$ABI" -o OSVERSION="$OSVERSION" -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"
exec pkg -o ABI="$ABI" -o OSVERSION="$OSVERSION" -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"

and it worked and it upgrade just fine but now when I run winefile I get this error:

$ winefile
0024:fixme:ntdll:create_logical_proc_info stub
0024:fixme:ntdll:init_cpu_info Failed to get logical processor information, status 0xc0000002.
002c:fixme:ntdll:create_logical_proc_info stub
002c:fixme:ntdll:init_cpu_info Failed to get logical processor information, status 0xc0000002.
wine: failed to load L"\\??\\C:\\windows\\system32\\ntdll.dll" error c0000135
0024:err:environ:run_wineboot failed to start wineboot c00000e5
0034:fixme:ntdll:create_logical_proc_info stub
0034:fixme:ntdll:init_cpu_info Failed to get logical processor information, status 0xc0000002.
wine: failed to load L"\\??\\C:\\windows\\system32\\ntdll.dll" error c0000135
003c:fixme:ntdll:create_logical_proc_info stub
003c:fixme:ntdll:init_cpu_info Failed to get logical processor information, status 0xc0000002.
003c:err:module:import_dll Library coml2.dll (which is needed by L"C:\\windows\\syswow64\\ole32.dll") not found
003c:err:module:import_dll Library ole32.dll (which is needed by L"C:\\windows\\syswow64\\winefile.exe") not found
003c:err:module:loader_init Importing dlls for L"C:\\windows\\syswow64\\winefile.exe" failed, status c0000135
Comment 15 Alexander Vereeken 2024-04-24 13:53:39 UTC
(In reply to Eduardo C. from comment #14)

Which wine version?
Comment 16 Eduardo C. 2024-04-24 13:56:37 UTC
(In reply to Alexander Vereeken from comment #15)
The new error is on version 9.0,1
Comment 17 Alexander Vereeken 2024-04-24 14:21:49 UTC
(In reply to Eduardo C. from comment #16)

You need to use wine8 for now, the newest version isn't patched for wow64 functionality.
Comment 18 Mark Linimon freebsd_committer freebsd_triage 2024-04-25 05:33:46 UTC
^Triage: canonicalize assignment.
Comment 19 Alexander Vereeken 2024-05-04 16:04:50 UTC
Created attachment 250371 [details]
0001-emulators-wine-Fix-pkg32.sh.patch

Hello,

i have discussed (via Discord) this change with Alex S and this patch is now the final result.

Regards.
Comment 20 Alex S 2024-05-04 16:30:56 UTC
Can we change `env ABI_FILE=/usr/lib32/libc.so.7` to `-o ABI_FILE=/usr/lib32/libc.so.7` parameter for pkg? Looks a bit nicer that way.
Comment 21 Alexander Vereeken 2024-05-04 17:00:26 UTC
Created attachment 250372 [details]
0001-emulators-wine-Fix-pkg32.sh.patch

Sure.
Comment 22 Alex S 2024-05-04 17:05:52 UTC
(In reply to Alexander Vereeken from comment #21)

LGTM
Comment 23 commit-hook freebsd_committer freebsd_triage 2024-05-05 19:13:27 UTC
A commit in branch main references this bug:

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

commit 3b0b9249b5c1a920c53f828ed51e73a0a638c24e
Author:     Alexander Vereeken <Alexander88207@protonmail.com>
AuthorDate: 2024-05-05 19:11:39 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2024-05-05 19:12:25 +0000

    emulators/wine-proton: Refine WoW64 32-bit ABI determination

    PR:             278525
    Reported by:    Eduardo C. <idude0407@gmail.com>
    Approved by:    Alex S <iwtcex@gmail.com> (maintainer)

 emulators/wine-proton/Makefile       | 2 +-
 emulators/wine-proton/files/pkg32.sh | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 24 Gerald Pfeifer freebsd_committer freebsd_triage 2024-05-05 20:45:15 UTC
Thank you Alex and Alexander!

Alex, you have been working in that area in the past: the patch in
  files/patch-dlls__ntdll__unix__loader.c
doesn't apply to current head as well as Wine 9 (emulators/wine).
Any suggestions?
Comment 25 Alex S 2024-05-06 04:36:27 UTC
Created attachment 250484 [details]
patch-dlls_ntdll_unix_loader.c fixed

(In reply to Gerald Pfeifer from comment #24)

I only tested the compilation, fwiw.
Comment 26 commit-hook freebsd_committer freebsd_triage 2024-05-06 09:21:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8d60603b7558af3635f2b9b96e61e7a613b77e64

commit 8d60603b7558af3635f2b9b96e61e7a613b77e64
Author:     Alexander Vereeken <Alexander88207@protonmail.com>
AuthorDate: 2024-05-05 19:15:19 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2024-05-06 09:20:58 +0000

    emulators/wine8: Refine WoW64 32-bit ABI determination

    PR:             278525
    Reported by:    Eduardo C. <idude0407@gmail.com>

 emulators/wine8/Makefile       | 2 +-
 emulators/wine8/files/pkg32.sh | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)
Comment 27 commit-hook freebsd_committer freebsd_triage 2024-05-07 05:52:45 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=78a29f61b9f34f96a7138c42440cc060098f9dbf

commit 78a29f61b9f34f96a7138c42440cc060098f9dbf
Author:     Alexander Vereeken <Alexander88207@protonmail.com>
AuthorDate: 2024-05-07 05:50:47 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2024-05-07 05:50:48 +0000

    emulators/wine: Refine WoW64 32-bit ABI determination

    PR:             278525
    Reported by:    Eduardo C. <idude0407@gmail.com>
    Reviewed by:    Alex S <iwtcex@gmail.com>

 emulators/wine/Makefile       | 1 +
 emulators/wine/files/pkg32.sh | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)
Comment 28 commit-hook freebsd_committer freebsd_triage 2024-05-09 06:45:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=789fe3db9a6066d0759a492cb59d303a3fdc04f7

commit 789fe3db9a6066d0759a492cb59d303a3fdc04f7
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2024-05-09 06:44:59 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2024-05-09 06:44:59 +0000

    emulators/wine-devel: Update to Wine 9.7

    This includes the following changes:
     - Some restructuration of the Vulkan driver interface.
     - Some ARM work (which we aren't using yet).
     - Various bug fixes.

    Also refine 32-bit ABI determination for WoW64. [1]

    PR:             278525 [1]
    Submitted by:   Alexander Vereeken <Alexander88207@protonmail.com> [1]
    Reviewed by:    Alex S <iwtcex@gmail.com> [1]

 emulators/wine-devel/Makefile       | 2 +-
 emulators/wine-devel/distinfo       | 6 +++---
 emulators/wine-devel/files/pkg32.sh | 5 ++---
 emulators/wine-devel/pkg-plist      | 1 +
 4 files changed, 7 insertions(+), 7 deletions(-)
Comment 29 Gerald Pfeifer freebsd_committer freebsd_triage 2024-05-09 06:51:11 UTC
(In reply to Alex S from comment #25)
> patch-dlls_ntdll_unix_loader.c fixed
>
> I only tested the compilation, fwiw.

Thank you, Alex! I'll point some people towards it.
Comment 30 Gerald Pfeifer freebsd_committer freebsd_triage 2024-05-09 06:51:41 UTC
I have updated all four affected ports.