Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wont run in ubuntu 23.04 #2119

Closed
Master811129 opened this issue Sep 18, 2023 · 14 comments · Fixed by #2035
Closed

Wont run in ubuntu 23.04 #2119

Master811129 opened this issue Sep 18, 2023 · 14 comments · Fixed by #2035

Comments

@Master811129
Copy link

simply running winetricks won't open the gui. Removing .wine didn't help.

wine version: wine-8.0 (Ubuntu 8.0~repack-4)

~$ winetricks
Executing mkdir -p /home/ubuntu
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 28
drwxrwxr-x  7 ubuntu ubuntu 4096 سپتامبر 17 23:53 .
drwxrwxr-x  4 ubuntu ubuntu 4096 سپتامبر 18 15:36 ..
drwxrwxr-x  3 ubuntu ubuntu 4096 سپتامبر 17 23:53 ProgramData
drwxrwxr-x  6 ubuntu ubuntu 4096 سپتامبر 17 23:53 Program Files
drwxrwxr-x  6 ubuntu ubuntu 4096 سپتامبر 17 23:53 Program Files (x86)
drwxrwxr-x  4 ubuntu ubuntu 4096 سپتامبر 17 23:53 users
drwxrwxr-x 18 ubuntu ubuntu 4096 سپتامبر 17 23:53 windows

Registry info:
/home/ubuntu/.wine/system.reg:#arch=win64
/home/ubuntu/.wine/user.reg:#arch=win64
/home/ubuntu/.wine/userdef.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "" 
------------------------------------------------------


it says: warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message ""
interestingly, when i copy paste the command in the warning into terminal it gives me a string like this:

~$ wine cmd.exe /c echo '%AppData%'
C:\users\ubuntu\AppData\Roaming

@spiral009
Copy link

spiral009 commented Sep 24, 2023

Same

root@localhost:~# ./winetricks  ie8
------------------------------------------------------
warning: Running Wine/winetricks as root is highly discouraged. See https://wiki.winehq.org/FAQ#Should_I_run_Wine_as_root.3F
------------------------------------------------------
/usr/bin/od: wine: No such file or directory
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 25
drwxr-xr-x.  7 root root 3488 Sep 24 17:19 .
drwxr-xr-x.  4 root root 3488 Sep 24 17:57 ..
drwxr-xr-x.  6 root root 3488 Sep 24 17:19 Program Files
drwxr-xr-x.  6 root root 3488 Sep 24 17:20 Program Files (x86)
drwxr-xr-x.  3 root root 3488 Sep 24 17:19 ProgramData
drwxr-xr-x.  4 root root 3488 Sep 24 17:19 users
drwxr-xr-x. 19 root root 3488 Sep 24 17:44 windows

Registry info:
/root/.wine/system.reg:#arch=win64
/root/.wine/user.reg:#arch=win64
/root/.wine/userdef.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message ""
------------------------------------------------------

Also is ie8 going to work? I really need that activex
20230212-next - sha256sum: cf1e17a69db4126779e597def9facdecbb0703a20ed7172dd877b1f7824d66ec

@Chiitoo
Copy link
Collaborator

Chiitoo commented Sep 24, 2023

Do you get any different results with something like:


LANG="" winetrics

Ca set the lang to 'us' or something like that too to try.

For the second comment, do you really want to run this as 'root'? That will probably be causing more issues than not later.

@spiral009
Copy link

spiral009 commented Sep 24, 2023

Same,I can't run anything as non root as I'm using a chroot
LANG variable isn't set in the environment

root@localhost:~# LANG="en_US.UTF-8" ./winetricks ie8                                                                                                   ------------------------------------------------------                      warning: Running Wine/winetricks as root is highly discouraged. See https://wiki.winehq.org/FAQ#Should_I_run_Wine_as_root.3F                            ------------------------------------------------------                      od: wine: No such file or directory                                         ------------------------------------------------------                      warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.                            ------------------------------------------------------                      ------------------------------------------------------                      WINEPREFIX INFO:                                                            Drive C: total 25                                                           drwxr-xr-x.  7 root root 3488 Sep 24 17:19 .                                drwxr-xr-x.  4 root root 3488 Sep 24 19:31 ..                               drwxr-xr-x.  3 root root 3488 Sep 24 17:19 ProgramData                      drwxr-xr-x.  6 root root 3488 Sep 24 17:19 Program Files                    drwxr-xr-x.  6 root root 3488 Sep 24 17:20 Program Files (x86)              drwxr-xr-x.  4 root root 3488 Sep 24 17:19 users                            drwxr-xr-x. 19 root root 3488 Sep 24 17:44 windows                                                                                                      Registry info:                                                              /root/.wine/system.reg:#arch=win64                                          /root/.wine/userdef.reg:#arch=win64                                         /root/.wine/user.reg:#arch=win64                                            ------------------------------------------------------                      ------------------------------------------------------                      warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message ""                                                                       ----------------------------------------------------

@Master811129
Copy link
Author

Master811129 commented Sep 24, 2023

@Chiitoo I did some tests with LANG

~$ echo $LANG
en_US.UTF-8
~$ LANG="" winetricks
Executing mkdir -p /home/ubuntu
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 28
drwxrwxr-x  7 ubuntu ubuntu 4096 سپتامب 17 23:53 .
drwxrwxr-x  4 ubuntu ubuntu 4096 سپتامب 24 21:41 ..
drwxrwxr-x  6 ubuntu ubuntu 4096 سپتامب 17 23:53 Program Files
drwxrwxr-x  6 ubuntu ubuntu 4096 سپتامب 17 23:53 Program Files (x86)
drwxrwxr-x  3 ubuntu ubuntu 4096 سپتامب 17 23:53 ProgramData
drwxrwxr-x  4 ubuntu ubuntu 4096 سپتامب 17 23:53 users
drwxrwxr-x 18 ubuntu ubuntu 4096 سپتامب 17 23:53 windows

Registry info:
/home/ubuntu/.wine/system.reg:#arch=win64
/home/ubuntu/.wine/user.reg:#arch=win64
/home/ubuntu/.wine/userdef.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "" 
------------------------------------------------------
~$ LANG="us" winetricks
Executing mkdir -p /home/ubuntu
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 28
drwxrwxr-x  7 ubuntu ubuntu 4096 Sep 17 23:53 .
drwxrwxr-x  4 ubuntu ubuntu 4096 Sep 24 23:14 ..
drwxrwxr-x  6 ubuntu ubuntu 4096 Sep 17 23:53 Program Files
drwxrwxr-x  6 ubuntu ubuntu 4096 Sep 17 23:53 Program Files (x86)
drwxrwxr-x  3 ubuntu ubuntu 4096 Sep 17 23:53 ProgramData
drwxrwxr-x  4 ubuntu ubuntu 4096 Sep 17 23:53 users
drwxrwxr-x 18 ubuntu ubuntu 4096 Sep 17 23:53 windows

Registry info:
/home/ubuntu/.wine/system.reg:#arch=win64
/home/ubuntu/.wine/user.reg:#arch=win64
/home/ubuntu/.wine/userdef.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "" 
------------------------------------------------------
~$ LANG="en_US" winetricks
Executing mkdir -p /home/ubuntu
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 28
drwxrwxr-x  7 ubuntu ubuntu 4096 Sep 17 23:53 .
drwxrwxr-x  4 ubuntu ubuntu 4096 Sep 24 23:14 ..
drwxrwxr-x  6 ubuntu ubuntu 4096 Sep 17 23:53 Program Files
drwxrwxr-x  6 ubuntu ubuntu 4096 Sep 17 23:53 Program Files (x86)
drwxrwxr-x  3 ubuntu ubuntu 4096 Sep 17 23:53 ProgramData
drwxrwxr-x  4 ubuntu ubuntu 4096 Sep 17 23:53 users
drwxrwxr-x 18 ubuntu ubuntu 4096 Sep 17 23:53 windows

Registry info:
/home/ubuntu/.wine/system.reg:#arch=win64
/home/ubuntu/.wine/user.reg:#arch=win64
/home/ubuntu/.wine/userdef.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "" 
------------------------------------------------------

So nothing changed.

@GuillaumeCisco
Copy link

I have the exact same issue, using LANG does not help either...
I thought that I had an issue first with lutris using winetricks, but it looks like indeed the issue is about ubuntu 23.04.

Any tests we could run on our end?

@Chiitoo
Copy link
Collaborator

Chiitoo commented Nov 5, 2023

I set up an Ubuntu 23.10 virtual machine, and tried installing Winetricks via apt, which got me version 20230212, and it does run.

It seems it does so due to a Debian patch [1] they carry:

Description: Workaround case where wine and related binaries are in /usr/bin, but wine64 is only
  in Wine's bindir.
Author: Jens Reyer <[email protected]>
Forwarded: https://github.com/Winetricks/winetricks/pull/2035
Last-Update: 2023-02-26

--- a/src/winetricks
+++ b/src/winetricks
@@ -4922,10 +4922,17 @@ winetricks_set_wineprefix()
         elif command -v "${WINE}64" >/dev/null 2>&1; then
             WINE64="${WINE}64"
         else
-            # Handle case where wine binaries (or binary wrappers) have a suffix
-            WINE64="$(dirname "${WINE}")/"
-            [ "${WINE64}" = "./" ] && WINE64=""
-            WINE64="${WINE64}$(basename "${WINE}" | sed 's/^wine/wine64/')"
+            WINE_BINDIR="$(dirname "$(readlink -f /usr/bin/wineboot 2>/dev/null)" 2>/dev/null)"
+            if [ -x "${WINE_BINDIR}/wine64" ]; then
+                # Workaround case where wine and related binaries are in /usr/bin, but wine64 is only
+                # in Wine's bindir
+                WINE64="${WINE_BINDIR}/wine64"
+            else
+                # Handle case where wine binaries (or binary wrappers) have a suffix
+                WINE64="$(dirname "${WINE}")/"
+                [ "${WINE64}" = "./" ] && WINE64=""
+                WINE64="${WINE64}$(basename "${WINE}" | sed 's/^wine/wine64/')"
+            fi
         fi
         WINE_ARCH="${WINE64}"
         WINE_MULTI="${WINE}"

This change seems to already be under review here:

#2035

  1. https://sources.debian.org/patches/winetricks/20230212-2/wine64.patch/

@Chiitoo Chiitoo linked a pull request Nov 5, 2023 that will close this issue
@GuillaumeCisco
Copy link

I can confirm after adding this patch, it now works correctly.

@Master811129
Copy link
Author

Hello I just upgraded from 23.04 to 23.10 and this issue doesn't exist for me anymore. It looks like it's rather an Ubuntu packaging issue than a winetricks one.

@GuillaumeCisco
Copy link

It should not be closed :/
If no custom test is realized, it will never work.

@Chiitoo
Copy link
Collaborator

Chiitoo commented Nov 6, 2023

Yeah, I think this can remain open at least until the linked PR is handled, since the issue does prevent running Winetricks without modifications (aside from the packaged one, since that comes with the patche).

@kenorb
Copy link
Contributor

kenorb commented Jan 21, 2024

Here are repro steps for Debian:

$ docker run -it debian:latest

Inside Docker container:

# apt update
# DEBIAN_FRONTEND=noninteractive apt -y install ansible git
# ansible-galaxy install git+https://github.com/EA31337/ansible-role-wine.git,dev
# printf -- "- hosts: localhost\n  roles:\n    - ansible-role-wine\n" | ansible-playbook -i "localhost," -c local /dev/stdin -v
# install -v <(wget -qO- https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks) /usr/local/bin/winetricks

Now run:

# winetricks
...
Registry info:
/root/.wine/system.reg:#arch=win64
/root/.wine/user.reg:#arch=win64
/root/.wine/userdef.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "" 
# bash -x winetricks
+ printf '%s\nwarning: %b\n%s\n' ------------------------------------------------------ 'wine cmd.exe /c echo '\''%AppData%'\'' returned empty string, error message "" ' ------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "" 
# wine --version
wine-8.0 (Debian 8.0~repack-4)
# lsb_release -a
Description:	Debian GNU/Linux 12 (bookworm)

I've tested %AppData% and it seems it returns the value:

# wine cmd.exe /c echo '%AppData%'
C:\users\root\AppData\Roaming

but winetricks still errors, so it doesn't make much sense.


I've tested PR #2035 and it seems to work fine:

# install -v <(wget -qO- https://raw.githubusercontent.com/jre-wine/winetricks/Workaround_missing_/usr/bin/wine64/src/winetricks) /usr/local/bin/winetricks
# winetricks
(no errors)

kenorb added a commit to EA31337/ansible-role-metatrader that referenced this issue Jan 21, 2024
kenorb added a commit to EA31337/ansible-role-metatrader that referenced this issue Jan 21, 2024
kenorb added a commit to EA31337/ansible-role-metatrader that referenced this issue Jan 21, 2024
kenorb added a commit to EA31337/ansible-role-metatrader that referenced this issue Jan 21, 2024
@austin987
Copy link
Contributor

IMO this is a Debian packaging bug (which they work around by carrying their own patch).

There are similar issues with some other wrappers (protontricks, nixos, according to #2183), but as I wrote there, this is due to their wrappers.

I consider it a WONTFIX. There are a lot of things a wrapper could do, and I don't think it will be trivial to solve this in a generic way. If someone has an idea on how to do that, please submit a PR.

@austin987 austin987 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
@kenorb
Copy link
Contributor

kenorb commented Feb 7, 2024

If someone has an idea on how to do that, please submit a PR.

There is PR at #2035 which I've tested and solved the problem on Debian, is it going to be considered?

@austin987
Copy link
Contributor

Not in its current form, as it only fixes things for Debian and would break older macOS / possibly other platforms (which I wrote on the PR, but haven't seen any updates).

kenorb added a commit to kenorb-contrib/winetricks that referenced this issue Feb 10, 2024
…ne64' into WinetricksGH-2119-fix

* jre-wine/Workaround_missing_/usr/bin/wine64:
  Workaround missing /usr/bin/wine64.
kenorb added a commit to EA31337/ansible-role-metatrader that referenced this issue Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants