En/wine multilib

From Studiosg
Revision as of 14:58, 2 January 2013 by Wikiuser (talk | contribs)
Jump to navigationJump to search

Welcome to Simone Giustetti's wiki pages.


Languages: English - Italiano



Wine 64 bit & Slackware

What follows is the installation procedure for Wine on a Slackware64 Linux Operating System with 32 bit software support.

A small revolution took place with the Slackware 13.0 release. A new Intel / Amd 64 bit official port was born. The 64 bit philosophy mirrored the one adopted for other ports done in the past: a dedicated development tree with no relation with the 32 bit release other than the source code. Slackware 64 is a “64 bit only” operating system; it can run 64 bit built software only as no 32 bit compatibility layer is included. All of the software usually packaged with the distro was obviously recompiled against the 64 bit architecture: Apache, Mysql, Kde, Gimp and many other packages; Sadly many third party applications are available still in their 32 bit only version. Among others is Wine the best solution to run Windows only software on Linux. The present article will detail a working 32 bit only and a 32 / 64 bit mixed mode Wine installation procedure with a 64 bit Slackware 13.1 operating system.

The installation procedure consists of the following steps:

  • Installing a 32 bit compatibility layer on Slackware64.
  • Configuring the system for multilib.
  • Choosing and installing the right Wine version.


Slackware64 Multilib

The first step consists of extending Slackware64 features to packages and libraries compiled for a 32 bit architecture. Slackware64 is “64 bit only” but it's also “Multilib ready” meaning that it can be easily extended to run and compile 32 bit software. A prerequisite to the step is the availability of the 32 bit install tree and packages. The Slackware 13.1 official Dvd contains both 32 and 64 bit installation trees: one for each Dvd side. Otherwise the packages can be downloaded from the usual sources:

Slackware repository

Some additional packages are needed: multil-ibrary packages that should be used instead of the institutional ones. Both glibc, the Gnu c standard library, and gcc, the standard Linux compiler suite, should be upgraded with their multi-library versions. Slackware 13.1 multilib packages can be downloaded from: Alien repository

Create an empty directory and download the packages there:

  mkdir /tmp/multilib

Upgrade the system:

  cd /tmp/multilib
  upgradepkg --reinstall *.t?z
  installpkg compat32-tools*.t?z

The previous command installed a new package: compat32-tools which contains some useful scripts needed to convert 32 bit packages to a stripped Slackware 64 compatible version. Create empty directory /tmp/compat32 where the packages will be generated.

  mkdir /tmp/compat32

Let's suppose your Slackware 32 bit install tree were located in /mnt/slackiso/slack-13.1/slackware/ The directory should contain the usual a/, ap/, d/, l/, etc. subdirectories.

  root@darkstar:~# ls -la /mnt/slackiso/slack-13.1/slackware/
  total 2920
  drwxr-xr-x 17 4015 4015    1024 2010-05-18 08:57 ./
  drwxr-xr-x 11 4015 4015    1024 2010-05-18 09:04 ../
  -rw-r--r--  1 4015 4015  209001 2010-05-18 08:57 CHECKSUMS.md5
  -rw-r--r--  1 4015 4015  259707 2010-05-18 08:55 FILE_LIST
  -rw-r--r--  1 4015 4015 2334599 2010-05-18 08:57 MANIFEST.bz2
  lrwxrwxrwx  1 4015 4015      15 2008-05-08 04:04 PACKAGES.TXT -> ../PACKAGES.TXT
  -rw-r--r--  1 4015 4015     242 2002-06-13 05:46 README.TXT
  drwxr-xr-x  2 4015 4015   17408 2010-05-18 01:20 a/
  drwxr-xr-x  2 4015 4015   10240 2010-05-16 07:05 ap/
  drwxr-xr-x  2 4015 4015    7168 2010-05-18 18:55 d/
  drwxr-xr-x  2 4015 4015    1024 2010-05-09 05:35 e/
  drwxr-xr-x  2 4015 4015    1024 2010-05-02 02:02 f/
  drwxr-xr-x  2 4015 4015    1024 2010-05-14 21:40 k/
  drwxr-xr-x  2 4015 4015    6144 2010-05-18 04:42 kde/
  drwxr-xr-x  2 4015 4015   16384 2010-05-06 23:09 kdei/
  drwxr-xr-x  2 4015 4015   26624 2010-05-14 21:40 l/
  drwxr-xr-x  2 4015 4015   18432 2010-05-18 01:20 n/
  drwxr-xr-x  2 4015 4015    1024 2010-05-18 01:20 t/
  drwxr-xr-x  2 4015 4015    1024 2009-12-07 03:23 tcl/
  drwxr-xr-x  2 4015 4015   49152 2010-05-14 21:40 x/
  drwxr-xr-x  2 4015 4015    7168 2010-05-17 06:30 xap/
  drwxr-xr-x  2 4015 4015    1024 2010-05-16 07:05 y/

compat32-tools installed two conversion scripts: convertpkg-compat32 and massconvert32.sh. The former is useful to convert single packages while the latter is meant to execute a single mass conversion of packages. The massconvert32.sh script contains a list of packages candidate for conversion. Some Wine needed packages are not part of the list. This can be resolved:

  1. Using the standard massconvert32.sh script then convertpkg-compat32 for the missing files.
  2. Using a modified script that can be downloaded here: Updated massconvert32.sh

Let's use the updated script. Use the following commands to execute the conversion.

  cd /tmp/compat32
  massconvert32.sh -i /mnt/slackiso/slack-13.1/slackware/

The script will convert packages and save results in /tmp/compat32. The procedure could require some time. Upon completion around 60 Mb of files will be available in directories a/, ap/, d/, l/, ecc.

Install the newly obtained packages

  installpkg /tmp/compat32/*/*.t?z

The resulting Linux box is now able to execute 32 bit code as well as the 64 bit one.

If the standard script were used, four more packages shall be converted by means of the convertpkg-compat32 script. The four packages being:

/mnt/slackiso/slack-13.1/slackware/l/libusb-1.0.6-i486-1.txz

/mnt/slackiso/slack-13.1/slackware/l/libieee1284-0.2.11-i486-2.txz

/mnt/slackiso/slack-13.1/slackware/xap/sane-1.0.21-i486-1.txz

/mnt/slackiso/slack-13.1/slackware/xap/xsane-0.996-i486-2.txz

Execute the conversion

  convertpkg-compat32 -i /mnt/slackiso/slack-13.1/slackware/l/libusb-1.0.6-i486-1.txz -d /tmp/compat32/l
  convertpkg-compat32 -i /mnt/slackiso/slack-13.1/slackware/l/libieee1284-0.2.11-i486-2.txz -d /tmp/compat32/l
  mkdir /tmp/compat32/xap
  convertpkg-compat32 -i /mnt/slackiso/slack-13.1/slackware/xap/sane-1.0.21-i486-1.txz -d /tmp/compat32/xap
  convertpkg-compat32 -i /mnt/slackiso/slack-13.1/slackware/xap/xsane-0.996-i486-2.txz -d /tmp/compat32/xap

Then install the obtained packages with the standard pkg management command:

  installpkg ./l/libusb*.t?z
  installpkg ./l/libieee1284*.t?z
  installpkg ./xap/sane*.t?z
  installpkg ./xap/xsane *.t?z


Configuration

Once the -compat32 packages are installed it is advisable to reinstall the proprietary Ati or Nvidia drivers; this way the system will use 32 bit libraries for 32 bit applications and 64 bit ones for 64 bit applications. The proprietary driver packages contain both the 32 and 64 bit libraries, but it is highly probable that only the 64 bit ones were installed on Slackware64. For Ati drivers: Download the installation package from the Ati web site. Download eventual patches and save them in directory /etc/ati/patch. Run the command:

  sh ./<file>.run --buildpkg=Slackware/All

This will create two packages one containing the kernel module and a second one containing the libraries. Notice that the latter package size will be twice as big as usual. Remove older drivers and install new ones:

  removepkg /var/log/packages/fglrx-*
  installpkg fglrx*.t?z

Update config file xorg.conf

  aticonfig --initial

Then reboot your machine the new module will be loaded on start-up.

Some programs that rely heavily on 3-D graphics like games could have problems while probing the driver version for use. You'll experience symptoms such as low frame rate in spite of a low detail configuration, bad polygon rendering, disappearing textures, bad shadow definition and so on. To solve such issues it is possible to impose a preferred driver. The 32 bit one is your safest bet. To impose it from a shell prompt run command:

  export LIBGL=usr/lib/xorg/modules/dri

before running Wine.

Save the command into the .profile file in your home directory if you want to automatically run it at login.


Installing Wine

The journey nears its ending. Once the system is multilib compliant all that is needed to run 32 bit software is installing it. To run 32 bit Wine download it from the Slackware repository, Wine download, and install it:

  installpkg wine-1.2-rc3-i486-1sg.txz

All 32 bit Windows software running on a Slackware 32 operating system should work on your Slackware64 flawlessly.

The 64 bit Wine package wine-1.2-rc3-x86_64-1sg.txz comes with both the 64 bit binaries and the WoW64 subsystem. WoW64 is the short form for Windows on Windows 64. It's a subsystem allowing execution of 32 bit Windows binaries on a 64 bit Windows system. The package allows to run both 32 and 64 bit Windows massconvert32.shbinaries using but one shared $WINEPREFIX. WoW64 is one of the new Wine 1.2 features. The package is quite stable but released for testing purposes; the Wine 32 packages is still recommended for every day use. Further details about WoW64 can be found here: WineHq.


Slackware 13.37

Slackware 13.37 was officially released 27th April 2011. The procedure to extend 32 bit binary support to the 64 bit only distribution slightly changed. The main differences in comparison to Slackware 13.1 are discussed below.

Multilib packages for Slackware 13.37 can be downloaded from: Alien repository

Script massconvert32.sh was updated and can now automatically convert the four packages required to manage scanners with Wine. Sadly it does not convert fribidi: a library for Unicode right-to-left languages support. A modified script, able to convert fribidi too, can be downloaded from: Updated massconvert32.sh

The package conversion can be manually executed running command:

  convertpkg-compat32 -i /mnt/slackiso/slack-13.37/slackware/l/fribidi-0.10.9-i486-2.txz -d /tmp/compat32/l

In the end some information about the ati proprietary drivers installation. Newest releases compile but one package instead of the two earlier ones did. Moreover the install program can recognize the Linux distribution the system is running. Check "Generate Distribution Specific Driver Package" in the install screen, then "Build Package for Detected OS" and the program will work by itself.


Slackware 14.0

Slackware 14.0 was officially released 19th September 2012. The procedure to extend 32 bit binary support to the 64 bit only distribution slightly changed from the old 13.37 release. The main differences in comparison to Slackware 13.1 and 13.37 are outlined below.

Multilib packages for Slackware 14.0 can be downloaded from: Alien repository

The Mesa package distributed with Slackware 14.0 does not include libOSMesa. LibOSMesa is a library Wine uses to perform OpenGL rendering in bitmaps and some applications could be badly affected by its lack. The Mesa package should be rebuilt enabling OSMesa support. Quick instructions to update the Mesa package follow:

  • Copy directory source/x/mesa and its content from a Slackware DVD or a FTP mirror in a local directory of choice, /tmp for example.
  • Update file mesa.SlackBuild with a text editor adding the --enable-osmesa option to the configure command. A patch can be downloaded from address: Mesa 8.0.4 patch. Run command patch -p1 -i < mesa.SlackBuild.patch to update the build script.
  • Run the updated build script: sh ./mesa.SlackBuild.
  • By build completion an updated package should be available in the /tmp directory. To replace the standard package run command upgradepkg --reinstall /tmp/mesa-8.0.4-i486-1.tgz or upgradepkg --reinstall /tmp/mesa-8.0.4-x86_64-1.tgz for Slackware64.

Script massconvert32.sh was updated again, but the new release does not convert all of the Wine required packages. The missing packages are: fribidi, nettle, p11-kit and xsane. Fribidi is a library for Unicode right-to-left languages support. Nettle is a cryptographic library. P11-kit provides support for installing and configuring PKCS#11 modules. Xsane is a graphical interface program for scanners. A modified script, able to convert the four missing packages too, can be downloaded from: Updated massconvert32.sh

The package conversion can be manually executed running commands:

  convertpkg-compat32 -i /mnt/slackiso/slack-14.0/slackware/l/fribidi-0.19.2-i486-3.txz -d /tmp/compat32/l
  convertpkg-compat32 -i /mnt/slackiso/slack-14.0/slackware/n/nettle-2.5-i486-1.txz -d /tmp/compat32/n
  convertpkg-compat32 -i /mnt/slackiso/slack-14.0/slackware/n/p11-kit-0.12-i486-1.txz -d /tmp/compat32/n
  convertpkg-compat32 -i /mnt/slackiso/slack-14.0/slackware/xap/xsane-0.998-i486-2.txz -d /tmp/compat32/xap

Be sure to update the 32 bit Mesa package before you run the conversion script otherwise package mesa-compat32-8.0.4-x86_64-1compat32.txz will lack the libOSMesa library.


For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net.


External links




Languages: English - Italiano