Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Howto build wine 32 on 64 bit only Scientific Linux 7.1, Howto build wine 32 on 64 bit only Scien
Todd
 Posted: Jun 1 2015, 08:12 PM
Quote Post


SLF Rookie
*

Group: Members
Posts: 23
Member No.: 36
Joined: 11-April 11









Howto build wine 32 on 64 bit only Scientific Linux 7.1:

Based on gcomes article on 2014/11/12 17:35:46 titles How to Build wine 32 on CentOS7:
https://www.centos.org/forums/viewtopic.php?f=48&t=49542

by gcomes » 2015/05/27 14:59:52
ToddAndMargo wrote:
Dear gcomes, I rewrote your directions for Scientific Linux 7.1. I quote you heavily. Before I post to Wine's or others blogs, I would like your permission to include your writing. -Todd

"I don't think you need any permission in order to make a reference to a public forum's post . But if you feel you need such permission, then I grant it to you."

For purposes of this document:
prompt “$” refers to your user account
prompt “#” refers to the root account

Commands can be elevate to root with "su". For example:
su root -c "command ..."


Question: why do you not use "sudo"?
Answer: because I don't like it.

Question: why do you include "root" in the "su" command line? It is the default.
Answer: because I want to make the use of root obvious.

A special thanks to Treutwein Bernhard for his assistance in proof reading this document

Step 1:
If you have already installed Wine 64, you should remove it.
Create a working directory on a Linux based file system (not a Samba share) under your user account. For example:

$ mkdir ~/Documents/Wine32
$ cd ~/Documents/Wine32


If you do not already have EPEL's (http://fedoraproject.org/wiki/EPEL) repository loaded, download and install it.

You can check which repos you have loaded with:
$ yum repolist

Download and install EPEL's repository from (lower paragraph under the Packages heading):

# yum install epel-release

Or, download it directly from

http://mirror.us.leaseweb.net/epel/7/x86_64/repoview/epel-release.html

$ su root -c "rpm -ivh http://mirror.us.leaseweb.net/epel/7/x86_64/e/epel-release-7-5.noarch.rpm”

Note: if you already have EPEL installed but disabled, add the following to your yum command line: "--enablerepo=epel*"


Download gcomes' rpmbuild script:
$ wget 'https://www.centos.org/forums/download/file.php?id=405' -O './rpmrebuild.gz' -c
$ gunzip ./rpmrebuild.gz ; chmod a+x rpmrebuild


gcomes description of rpmrebuild:

Its use is straitforward: ./rpmrebuild [-e] <package.src.rpm> were the option -e allows to edit (with vi) the spec file before the build starts. The script will create the directories for RPM building in the current directory and it will overwrite $HOME/.rpmmacros (make a backup copy of $HOME/.rpmmacros if you need to preserve its content).


Step 2:

Install development packages:
Note that "#" refers to root's prompt. You can temporarily elevate with:
su root -c "command"

# yum --enablerepo=epel* install glibc-devel libstdc++-devel icoutils openal-soft-devel prelink gstreamer-plugins-base-devel gstreamer-devel ImageMagick-devel fontpackages-devel libv4l-devel gsm-devel giflib-devel libXxf86dga-devel mesa-libOSMesa-devel isdn4k-utils-devel libgphoto2-devel fontforge libusb-devel lcms2-devel audiofile-devel

Install the following 32-bit packages (note the "#"):

# yum --enablerepo=epel* install glibc-devel.i686 dbus-devel.i686 freetype-devel.i686 pulseaudio-libs-devel.i686 libX11-devel.i686 mesa-libGLU-devel.i686 libICE-devel.i686 libXext-devel.i686 libXcursor-devel.i686 libXi-devel.i686 libXxf86vm-devel.i686 libXrender-devel.i686 libXinerama-devel.i686 libXcomposite-devel.i686 libXrandr-devel.i686 mesa-libGL-devel.i686 mesa-libOSMesa-devel.i686 libxml2-devel.i686 libxslt-devel.i686 zlib-devel.i686 gnutls-devel.i686 ncurses-devel.i686 sane-backends-devel.i686 libv4l-devel.i686 libgphoto2-devel.i686 libexif-devel.i686 lcms2-devel.i686 gettext-devel.i686 isdn4k-utils-devel.i686 cups-devel.i686 fontconfig-devel.i686 gsm-devel.i686 libjpeg-turbo-devel.i686 pkgconfig.i686 libtiff-devel.i686 unixODBC.i686 openldap-devel.i686 alsa-lib-devel.i686 audiofile-devel.i686 freeglut-devel.i686 giflib-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 libXmu-devel.i686 libXxf86dga-devel.i686 libieee1284-devel.i686 libpng-devel.i686 librsvg2-devel.i686 libstdc++-devel.i686 libusb-devel.i686 unixODBC-devel.i686 qt-devel.i686

Install the Development Tools:

# yum groupinstall "Development Tools"
or
$ su root -c "yum groupinstall "Development Tools" "

Install cmake:

# yum install cmake
or
$ su root -c "yum install cmake"


Step 3:

build auxiliary 32-bit packages:

download http://vault.centos.org/7.0.1406/os/Source/SPackages/chrpath-0.13-14.el7.src.rpm
build the 32-bit rpm:
$ wget http://vault.centos.org/7.1.1503/os/Source/SPackages/chrpath-0.13-14.el7.src.rpm
$ linux32 ./rpmrebuild chrpath-0.13-14.el7.src.rpm


install chrpath 32-bit:
# yum localinstall rpmbuild/RPMS/i686/chrpath-0.13-14.el7.i686.rpm
or
$ su root -c "yum localinstall rpmbuild/RPMS/i686/chrpath-0.13-14.el7.i686.rpm"


download openal-soft-1.16.0-2.el7.src.rpm or current version from http://dl.fedoraproject.org/pub/epel/7/SRPMS/o/
$ wget http://dl.fedoraproject.org/pub/epel/7/SRPMS/o/openal-soft-1.16.0-2.el7.src.rpm


Build the 32-bit rpm (with spec file edit):

$ linux32 ./rpmrebuild -e openal-soft-1.16.0-2.el7.src.rpm

This opens the spec file in "vi". (Use the "vi" command ":set nu" to show line numbers.) Remove the line BuildRequires: portaudio-devel (it takes too much work to compile portaudio-devel 32-bit), save and exit (ZZ).

Install openal-soft and openal-soft-devel 32-bit:

# yum localinstall rpmbuild/RPMS/i686/openal-soft{,-devel}-1.16.0-2.el7.i686.rpm
or
$ su root -c "yum localinstall rpmbuild/RPMS/i686/openal-soft{,-devel}-1.16.0-2.el7.i686.rpm"

save openal-soft 32-bit rpm (do no skip this step, rpmrebuild erases and restarts each time it is run):

$ cp rpmbuild/RPMS/i686/openal-soft-1.16.0-2.el7.i686.rpm .


download nss-mdns-0.10-12.el7.src.rpm or current version from: http://dl.fedoraproject.org/pub/epel/7/SRPMS/n/
build the 32-bit rpm:

$ wget http://dl.fedoraproject.org/pub/epel/7/SRPMS/n/nss-mdns-0.10-12.el7.src.rpm
$ linux32 ./rpmrebuild nss-mdns-0.10-12.el7.src.rpm


save nss-mdns 32-bit rpm:

$ cp rpmbuild/RPMS/i686/nss-mdns-0.10-12.el7.i686.rpm .



Step 4:

build wine 32-bit:

download wine-1.7.22-1.el7.src.rpm or current version from: http://dl.fedoraproject.org/pub/epel/7/SRPMS/w/
build the 32-bit rpm (with spec file edit):

$ wget http://dl.fedoraproject.org/pub/epel/7/SRPMS/w/wine-1.7.22-1.el7.src.rpm
$ linux32 ./rpmrebuild -e wine-1.7.22-1.el7.src.rpm


Use the "vi" command ":set nu" to show line numbers. Between the lines (close to lines 559-561).

export CFLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'` -Wno-error"
and
%configure \

insert the following line: (make winegcc generate 32-bit code)
sed -i '/winegcc/s/-o /-m32 &/' tools/makedep.c

find and remove or comment out the lines (approximately line 594-597):

%if 0%{?rhel} >= 7
%{__ln_s} %{_bindir}/wine64 %{buildroot}%{_bindir}/wine
%endif


find the lines (approximately lines 339-343):

%if 0%{?rhel} >= 7
Requires: wine-core(x86-64) = %{version}-%{release}
%else
Requires: wine-core(x86-32) = %{version}-%{release}
%endif


and delete or comment out them except the line:
Requires: wine-core(x86-32) = %{version}-%{release}


remove or comment out the line (~ line 1348)
%{_libdir}/wine/winegstreamer.dll.so

(gcomes didn't manage to make configure use gstreamer), save and exit (ZZ)

If there was no error now you have build wine 32-bit. Save the rpm:

$ cp rpmbuild/RPMS/*/* .

If you don't need the debuginfo rpm you can delete it:

$ rm <destination_dir>/wine-debuginfo-1.7.22-1.el7.centos.i686.rpm


Step 5:

install wine 32-bit:

Assuming the wine rpms just build are in a directory called <winerpm> then you can install them with:

# yum localinstall *.rpm
or
$ su root -c "yum localinstall *.rpm"


Extra Stuff:

Download and install Wine Tricks from http://wiki.winehq.org/winetricks
$ wget http://winetricks.org/winetricks
$ chmod +x winetricks


Install Wine Core Fonts:
# yum install cabextract
or
$ su root -c "yum install cabextract"

$ ./winetricks corefonts


Install msttcorefonts:
# rpm -ivh ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/p/po/postinstaller/fedora/releases/21/x86_64/msttcorefonts-2.5-1.fc21.noarch.rpm

Optional: install mscore-fonts from "nux" repo (download from pbone.net):
# yum localinstall mscore-fonts

To regenerate your fonts (you shouldn't need to):
# fc-cache -f -v
or
$ su root -c "fc-cache -f -v"

Optional, but makes Lotus Smart Suite quite remarking about no printer:
# yum install cups-pdf
or
$ su root -c "yum install cups-pdf"

Smart Suite:
Both Lotus Approach tabs and Word Pro pull up bars (at the bottom) use "MS Sans Serif"", a.k.a. "sserife.fon". If this font is not present, you will get very tiny fonts in Approach's tab and Word Pro's pull up bars. To correct the issue, copy sserife.fon directly into Wine's Fonts directory:

$ cp <path>/sserife.fon <user home>/.wine/drive_c/windows/Fonts/.
Or whatever WINEPREFIX you are using.

This is actually a bug in Wine (Wine only maps system wide True Type fonts):
Bitmap fonts like Terminus are not supported
https://bugs.winehq.org/show_bug.cgi?id=24923

Lotus Approach will not run correctly (after the second time it is reinstalled), unless it runs from its root directory:

$ sh -c "cd ~/.wine/drive_c/lotus/approach; wine approach.exe"
Or whatever WINEPREFIX you are using
PMEmail Poster
^
Tomo
 Posted: Feb 11 2016, 03:36 PM
Quote Post


SLF Newbie


Group: Members
Posts: 1
Member No.: 3617
Joined: 11-February 16









Hello,

now that wine 1.8 has been released and compiled in EPEL (with release CentOS release 7.2). Step 2, 3 and 4 have changed a little bit (but overall, it get simpler).

In Step 2:

add "libpcap-devel.i686" to the list of lib installed.

In Step 3:

here are the link for the rpm I've downloaded : wget http://vault.centos.org/7.2.1511/os/Source/SPackages/chrpath-0.13-14.el7.src.rpm

Also, all my *.rpm files created are named "*centos.i686.rpm" (adding centos compared to the first post author name). Note that I did all the procedure in a basic CentOS 7.2 (not scientific linux).

In Step 4:

wget http://dl.fedoraproject.org/pub/epel/7/SRPMS/w/wine-1.8-1.el7.src.rpm
linux32 ./rpmrebuild -e wine-1.8-1.el7.src.rpm

I only needed to put the "sed" line. The spec file has already been changed for supporting 32bit/64bit architecture and the gstreamer thing is working fine.

Hope this is useful.

Regards.

Thomas.
PMEmail Poster
^
sunglant
 Posted: Mar 21 2016, 01:09 AM
Quote Post


SLF Rookie
*

Group: Members
Posts: 15
Member No.: 3319
Joined: 25-December 14









Wine newbie, I have been trying to compile a 32 supported version of 1.8.1 but have not had any luck following the instructions on Scientific Linux 7.2. has any one had any luck compiling the packages?

if anyone could also tell me how to add playonlinux as well. I have to get training apps working and not interested in building a windows virtual machine just to use a couple of apps for a couple of months.

Please and thank you for any and all support anyone can offer.



Moderator note: removed unnecessary complete quote of first post

This post has been edited by tux99: Mar 21 2016, 09:45 AM
PMEmail Poster
^
Todd
 Posted: Mar 24 2016, 02:21 AM
Quote Post


SLF Rookie
*

Group: Members
Posts: 23
Member No.: 36
Joined: 11-April 11









QUOTE (sunglant @ Mar 20 2016, 05:09 PM)
Wine newbie, I have been trying to compile a 32 supported version of 1.8.1 but have not had any luck following the instructions on Scientific Linux 7.2.  has any one had any luck compiling the packages?

if anyone could also tell me how to add playonlinux as well.  I have to get training apps working and not interested in building a windows virtual machine just to use a couple of apps for a couple of months. 

Please and thank you for any and all support anyone can offer.
[/i]



Download latest Wine Staging from
https://github.com/wine-compholio/wine-patched/releases

Install EPEL repo:

Install supporting programs:
For SL7: (note: do in two steps. An error occures if you run them together)

# yum --enablerepo=epel* install glibc-devel libstdc++-devel icoutils openal-soft-devel prelink gstreamer-plugins-base-devel gstreamer-devel ImageMagick-devel fontpackages-devel libv4l-devel gsm-devel giflib-devel libXxf86dga-devel mesa-libOSMesa-devel isdn4k-utils-devel libgphoto2-devel fontforge libusb-devel lcms2-devel audiofile-devel

# yum --enablerepo=epel* install glibc-devel.i686 dbus-devel.i686 freetype-devel.i686 pulseaudio-libs-devel.i686 libX11-devel.i686 mesa-libGLU-devel.i686 libICE-devel.i686 libXext-devel.i686 libXcursor-devel.i686 libXi-devel.i686 libXxf86vm-devel.i686 libXrender-devel.i686 libXinerama-devel.i686 libXcomposite-devel.i686 libXrandr-devel.i686 mesa-libGL-devel.i686 mesa-libOSMesa-devel.i686 libxml2-devel.i686 libxslt-devel.i686 zlib-devel.i686 gnutls-devel.i686 ncurses-devel.i686 sane-backends-devel.i686 libv4l-devel.i686 libgphoto2-devel.i686 libexif-devel.i686 lcms2-devel.i686 gettext-devel.i686 isdn4k-utils-devel.i686 cups-devel.i686 fontconfig-devel.i686 gsm-devel.i686 libjpeg-turbo-devel.i686 pkgconfig.i686 libtiff-devel.i686 unixODBC.i686 openldap-devel.i686 alsa-lib-devel.i686 audiofile-devel.i686 freeglut-devel.i686 giflib-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 libXmu-devel.i686 libXxf86dga-devel.i686 libieee1284-devel.i686 libpng-devel.i686 librsvg2-devel.i686 libstdc++-devel.i686 libusb-devel.i686 unixODBC-devel.i686 qt-devel.i686

Compile away from the first directory inside the tar ball!

$ ./configure --disable-win64
$ make depend
$ make
# make install

Or

# ./configure --disable-win64; make depend; make; make install
# su root -c "./configure --disable-win64; make depend; make; make install"

HTH,
-T
PMEmail Poster
^
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll