x86_64 chroot on Manjaro Arm + Install x86_64 *.deb + Install Wine & Windows apps

UPDATE 4: Ubuntu x86_64 Bionic(chroot)

Finally I managed to successfully install Sketchup via PlayOnLinux 4.3.4, after many unsuccessful attempts using wine and winetricks. However, the moment I open it crashes.
All dependencies are satisfied. Just to let you know installing dependencies is really hard via winetricks. It often crashes and never get the job done.

This is the POL I am using:

Screenshot_2020-07-09_20-16-31

This image shows the crash in sketchup 8

Screenshot_2020-07-09_23-37-22

I also managed to install Sketchup 7.1 in the same virtual drive:

Screenshot_2020-07-09_23-44-57

Even I managed to see the splash screen, but cannot click anything inside sketchup then it crashes (at least I can see that there might be a "hope")

Screenshot_2020-07-10_00-01-01

Here's what the debug says:

te: 07/09/20 16:12:56

> PlayOnLinux Version
  4.3.4
> uname -a
  Linux rna 5.7.2-1-MANJARO-ARM #1 SMP PREEMPT Fri Jun 12 22:12:23 +03 2020 x86_64 x86_64 x86_64 GNU/Linux
> lsb_release -a
  
> wine --version
  wine-3.0.5
> POL_WINEVERSION
  3.0.5
> WINEPREFIX
  /home/rna/.PlayOnLinux//wineprefix/GoogleSketchUp8
> Distribution
  Ubuntu 18.04 LTS
> glxinfo \| grep rendering
  direct rendering: Yes
> glxinfo \| grep renderer
      GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 6.0, 128 bits)
> OpenGL libs (Direct rendering testing)
  32bits direct rendering is enabled
  64bits direct rendering is enabled

[07/09/20 16:21:31] - Running wine-3.0.5 cmd /c echo %ProgramFiles% (Working directory : /usr/share/playonlinux/python)
C:\Program Files
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:22:30] - Running wine-3.0.5 regedit /home/rna/.PlayOnLinux//tmp/regkey.reg (Working directory : /usr/share/playonlinux/python)
[07/09/20 16:22:30] - Content of /home/rna/.PlayOnLinux//tmp/regkey.reg
-----------
REGEDIT4

[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"OpenGL"="enabled"
-----------
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:24:44] - Running wine-3.0.5 start /unix /home/rna/Downloads/Trimble SketchUp Pro 8/SketchUpProWEN.exe (Working directory : /home/rna)
0034:fixme:mscoree:get_runtime_info unsupported startup flags 6
0034:fixme:mscoree:get_runtime_info unsupported runtimeinfo flags 18
0032:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
0032:fixme:msi:event_spawn_wait_dialog doing nothing
0032:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
0032:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
0032:err:msi:free_package_structures failed to delete L"C:\\users\\rna\\Temp\\msi2b39.tmp" (5)
[07/09/20 16:32:49] - Running wine-3.0.5 regedit.exe RegModif.reg (Working directory : /home/rna)
wine client error:1e: write: Bad file descriptor
[07/09/20 16:33:32] - Running wine-3.0.5 regedit /home/rna/.PlayOnLinux//tmp/VGA_ID_fix.reg (Working directory : /home/rna)
[07/09/20 16:33:32] - Content of /home/rna/.PlayOnLinux//tmp/VGA_ID_fix.reg
-----------
REGEDIT4

[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"VideoPCIVendorID"=dword:0000
"VideoPCIDeviceID"=dword:0000
"VideoDriver"="vga.dll"
-----------
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:34:18] - Running wine-3.0.5 winepath -u C:\\users\\rna\\Desktop (Working directory : /home/rna)
/home/rna/.PlayOnLinux//wineprefix/GoogleSketchUp8/dosdevices/c:/users/rna/Desktop
wine client error:2d: write: Bad file descriptor
[07/09/20 16:36:08] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 8)

Intrinsic Alchemy v3.3 Beta-0702 (Dynamic/Release)
Built by <unknown> on Fri Jul 2 00:00:00 2010

wine client error:32: read: Bad address
wine client error:32: read: Bad address
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:37:58] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 8)

Intrinsic Alchemy v3.3 Beta-0702 (Dynamic/Release)
Built by <unknown> on Fri Jul 2 00:00:00 2010

[07/09/20 16:40:13] - Running wine-3.0.5 /home/rna/Downloads/Google Sketchup 7.1/GoogleSketchUpProWEN 7.1.exe (Working directory : /)
0031:fixme:mscoree:get_runtime_info unsupported startup flags 6
0031:fixme:mscoree:get_runtime_info unsupported runtimeinfo flags 18
0033:fixme:mscoree:get_runtime_info unsupported startup flags 6
0033:fixme:mscoree:get_runtime_info unsupported runtimeinfo flags 18
002f:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
002f:err:richedit:ReadStyleSheet skipping optional destination
002f:err:richedit:ReadStyleSheet skipping optional destination
002f:fixme:msi:event_spawn_wait_dialog doing nothing
002f:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
002f:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:54:39] - Running wine-3.0.5 winepath -u C:\\users\\rna\\Desktop (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c)
wine client error:2d: read: Bad address
[07/09/20 16:55:55] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:7fffffff: init_thread failed with status 103
rpc_transport.c:428: rpcrt4_conn_np_write: Assertion `io_status.Information == count' failed.
wine client error:1f: read: Bad address
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:57:06] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

threadpool.c:2035: tp_object_release: Assertion `!object->num_pending_callbacks' failed.
wine client error:36: write: Bad file descriptor
wine client error:3f: wine client error:3f: read: Bad address
read: Bad address
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:58:33] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

qemu: uncaught target signal 11 (Segmentation fault) - core dumped
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 17:00:01] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:37: write: Bad file descriptor
wine client error:3a: write: Bad file descriptor
wine client error:3c: wine client error:3d: qemu: uncaught target signal 11 (Segmentation fault) - core dumped
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 17:14:07] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:37: read: Bad file descriptor
wine client error:35: write: Bad file descriptor
wine client error:3c: read: Bad address
wine client error:3c: read: Bad address
wine client error:3f: read: Bad file descriptor
wine client error:40: 
[07/09/20 17:15:18] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:44: read: Bad address
[07/09/20 17:19:41] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

[07/09/20 17:23:00] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:37: write: Bad file descriptor
[07/09/20 17:24:09] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)
0054:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.VC80.MFCLOC" (8.0.50608.0)
0054:fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 30000
0054:fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 30000
0054:fixme:wininet:InternetSetOptionW INTERNET_OPTION_CONNECT_RETRIES 0
0054:fixme:msvcrt:type_info_name_internal_method type_info_node parameter ignored

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

0054:fixme:ieframe:PersistStreamInit_InitNew (0x151a80)
0054:fixme:ieframe:navigate_url Unsupported args (Flags 0x32f1a0 {VT_I4: 4}; TargetFrameName 0x32f1b0 {VT_BSTR: (null)})
0054:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0054:fixme:ieframe:WebBrowser_Stop (0x151a80)
0054:fixme:ieframe:navigate_url Unsupported args (Flags 0x32f7b0 {VT_I4: 4}; TargetFrameName 0x32f7c0 {VT_BSTR: (null)})
0054:fixme:dwmapi:DwmIsCompositionEnabled 0xf563018
005c:fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0xc05b608, context 0x27746e8, init_notify 0, handle 0xfb9fc88): stub
0054:fixme:msctf:ThreadMgrSource_AdviseSink (0x3792358) Unhandled Sink: {71c6e74e-0f28-11d8-a82a-00065b84435c}
0054:fixme:imm:ImmGetDescriptionW (0x4090409, (nil), 0): semi stub
0054:fixme:imm:ImmGetDescriptionW (0x4090409, 0x116b52a8, 9): semi stub
0054:fixme:imm:ImmGetOpenStatus (0x3794de8): semi-stub
0054:fixme:imm:ImmReleaseContext (0x101a4, 0x3794de8): stub
006a:err:ntdll:RtlpWaitForCriticalSection section 0x27735d0 "?" wait timed out in thread 006a, blocked by 0054, retrying (60 sec)
[07/09/20 17:26:49] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)
0009:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.VC80.MFCLOC" (8.0.50608.0)
0009:fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 30000
0009:fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 30000
0009:fixme:wininet:InternetSetOptionW INTERNET_OPTION_CONNECT_RETRIES 0
0009:fixme:msvcrt:type_info_name_internal_method type_info_node parameter ignored

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

0009:fixme:ieframe:PersistStreamInit_InitNew (0x151b60)
0009:fixme:ieframe:navigate_url Unsupported args (Flags 0x32f1a0 {VT_I4: 4}; TargetFrameName 0x32f1b0 {VT_BSTR: (null)})
0009:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0038:err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception.
wine client error:30: read: Bad address
001e:err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7ef834f6
001e:err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7ef7af9e
wine client error:1e: write: Bad file descriptor

Dear All,

Testing wine in chroot environment takes time. And I don't have that luxury. So maybe somebody could help us to test it. I will post what I did so far. If you follow exactly what I did. You don't need to put yourself into trouble.

Important Note:
I have tested:

  • Debian Stretch x86 and x86_64
  • Debian Buster x86 and x86_64
  • Ubuntu Bionic x86 and x86_64
  • Ubuntu Focal x86 and x86_64

I will highlight that you should stick with Ubuntu Bionic x86_64 as it works best, and most winetricks works. But for some it doesn't. But it is better compared to the rest of what I tested.

OK Let's start:

PREPARATION:
Before we start, make sure that Binfmt_misc is compiled in your kernel. If it is not, then you cannot continue this procedure.

$ zcat /proc/config.gz | grep BINFMT_MISC

Make sure that you had installed the base-devel package, Thanks to @Lolix to point it out:

$ sudo pacman -Syyu base-devel --needed

Now Let's install the required package first:

$ yay -S qemu-user-static schroot debootstrap

Now let's install the configuration file for qemu, Thanks to @xabbu for the fix.

$ wget https://raw.githubusercontent.com/qemu/qemu/master/scripts/qemu-binfmt-conf.sh
$ sudo bash qemu-binfmt-conf.sh --systemd i386
$ sudo bash qemu-binfmt-conf.sh --systemd x86_64
$ ls /etc/binfmt.d/

Make sure that you got two files in the folder /etc/binfmt.d/
qemu-i386.conf
qemu-x86_64.conf

Now let's check the status:

$ /usr/lib/systemd/systemd-binfmt --cat-config --no-pager

Now let's edit the qemu-i386.conf because the config is not correct:

$ sudo nano /etc/binfmt.d/qemu-i386.conf

Now replace nearly at the end of the line :/usr/local/bin/qemu-i386: with :/usr/bin/qemu-i386-static:
Then ctrl+x, yes and save

We have to edit the qemu-x86_64.conf as well:

$ sudo nano /etc/binfmt.d/qemu-x86_64.conf

Now replace nearly at the end of the line :/usr/local/bin/qemu-x86_64: with :/usr/bin/qemu-x86_64-static:
Then ctrl+x, yes and save

Now let's restart and check our binfmt status:

$ systemctl restart systemd-binfmt
$ systemctl status systemd-binfmt --no-pager

INSTALLING UBUNTU BIONIC x86_64 (DEBOOTSTRAP)
If you follow step by step the procedure above, then you should be OK to run the following step. If not, go back to the Preparation procedure:

In this procedure we will debootstrap the ubuntu bionic x86_64 in the folder /srv/chroot/ubuntu-x64. If you deviate from this, then you are on your own. You will get trouble when installing winetricks, etc. As I mentioned earliar. At the moment I am writing this, ubuntu bionic x86_64 is the best option:

$ sudo mkdir /srv/chroot/ubuntu-x64
$ sudo debootstrap --arch amd64 --foreign bionic /srv/chroot/ubuntu-x64 http://archive.ubuntu.com/ubuntu/
$ sudo cp /usr/bin/qemu-i386-static /srv/chroot/ubuntu-x64/usr/bin
$ sudo cp /usr/bin/qemu-x86_64-static /srv/chroot/ubuntu-x64/usr/bin
$ sudo chroot "/srv/chroot/ubuntu-x64" /debootstrap/debootstrap --second-stage

If everything runs smoothly, then let's continue:

$ sudo nano /etc/schroot/chroot.d/ubuntu-x64.conf

Now add this following text, change username with your own user name:

[ubuntu-x64]
description=Ubuntu Bionic x86_64 chroot
aliases=ubuntu-x64
type=directory
directory=/srv/chroot/ubuntu-x64
profile=desktop
personality=linux
preserve-environment=true
root-users=<username>
users=<username>

Then ctrl+x, yes and save

Now lets fix the database issue:

$ sudo nano /etc/schroot/desktop/nssdatabases

then put # in font of networks, group, passwd and add #user. It should look like this:

# System databases to copy into the chroot from the host system.
#
# <database name>
#passwd
shadow
#group
gshadow
services
protocols
#networks
#hosts
#user

Then ctrl+x, yes and save

Now let's fix the stateoverride issue:

$ sudo nano /srv/chroot/ubuntu-x64/var/lib/dpkg/statoverride

change the first crontab and the first messagebus with root, it should look like this:

root root 2755 /usr/bin/crontab
root root 4754 /usr/lib/dbus-1.0/dbus-daemon-launch-helper

Then ctrl+x, yes and save

Now, you can start chrooting into ubuntu:

$ sudo schroot -c ubuntu-x64
$ cd
$ sudo apt install nano
$ sudo nano ~/.bashrc

then add this line in the bottom:

export LANGUAGE=ā€Cā€
export LC_ALL=ā€Cā€
export DISPLAY=:0

Then ctrl+x, yes and save

Now let's restart our chroot, by exit

$ exit

INSTALL UBUNTU REPOSITORY (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ cd
$ sudo apt install software-properties-common wget build-essential
$ sudo add-apt-repository universe
$ sudo add-apt-repository multiverse
$ sudo add-apt-repository restricted 
$ sudo apt update && sudo apt upgrade
$ exit

INSTALL WINE & WINETRICKS (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ cd
$ sudo dpkg --add-architecture i386
$ sudo apt update
$ sudo apt install libxml2-dev:i386
$ sudo apt install wine-development
$ wine --version
$ sudo apt install winetricks
$ sudo apt install zenity
$ sudo apt install winbind
$ sudo apt install nemo
$ exit

INSTALL PLAYONLINUX (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ cd
$ wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
$ sudo wget http://deb.playonlinux.com/playonlinux_bionic.list -O /etc/apt/sources.list.d/playonlinux.list
$ sudo apt update
$ sudo apt install playonlinux
$ exit

Now let's check our ID first:

$ id

ADDING A USER (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ adduser <username>
$ su - <username>
$ nano ~/.bashrc

add this text in the bottom:

export LANGUAGE=ā€Cā€
export LC_ALL=ā€Cā€
export DISPLAY=:0

Then ctrl+x, yes and save

Now let's exit:

$ exit

CONFIGURING WINE & WINETRICKS (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ su - <username>
$ winecfg
$ winetricks
$ exit

INSTALLING .deb Package (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ sudo dpkg -i <the-location-of-the-deb-package>
$ exit

Once you are done, you can create a shortcut in the desktop running as your username

Nemo Launcher

schroot -c ubuntu-x64 nemo

Other apps:

schroot -c ubuntu-x64 /opt/the/location/of/your/app

With this process, now you should be able to run x86_64 *.deb and install a wine app.

WARNING:
Follow the procedure step by step. Other wise you'll get into trouble.

Hope this might help somebody out there.
Thanks to @Lolix and @xabbu for helping.

I also urge you to post your result with wine to help other.

Many Thanks,
RNA

1 Like

Forum kindly sponsored by