Author Topic: Wine for 64-bit - some preliminary questions  (Read 1062 times)

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Wine for 64-bit - some preliminary questions
« on: October 22, 2012, 02:35:10 PM »
One package that needs building for 64-bit is wine. I've been reading the wine wiki pages around http://wiki.winehq.org/Wine64 to get some clues, but it looks pretty daunting. That's probably why no one has done it yet.

It looks as if the first problem is to decide what we want to build. There are two aspects here:

1. pclos has wine 1.2.x but the current version is 1.4.x, so do we upgrade first and then add a 64-bit build, or do we do that in the reverse order? Doing both at the same time is likely to make troubleshooting difficult.

2. Do we aim for a Win32 wine (replicating the functionality on 32-bit) or for a WoW64 wine which might run some (it's still a bit experimental) Win64 Applications, or do we start with the first and then seek to upgrade to the other later?

The next question is how feasible it is to aim for one combined SRPM for 32 and 64 pclos, and that probably depends on how easy it is to combine the two? My initial guess is it should be possible by using conditional tests in the .spec file, but I'm not sure.

Finally, of course, we need to ensure all dependencies are packaged first.

I presume this is one of the missing packages that stops pclos 64 going live, though I don't know how it relates to other needs. It looks pretty daunting and my time is limited, but with the right support I'd be happy to give it a go. Is anyone else working on it? I suppose that's the first question...
« Last Edit: December 11, 2012, 03:10:55 PM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Online JohnW_57

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2104
Re: Wine for 64-bit - some preliminary questions
« Reply #1 on: October 22, 2012, 03:05:13 PM »
There some packages in (or were) in repository who needed ia-32libs like Google Earth (depends on Wine).
Seems it's very difficult to get to update those packages.

Don't know it's the same for Wine 64-bit?

JohnW
« Last Edit: October 22, 2012, 03:07:34 PM by JohnW_57 »
PCLinuxOS 2013 KDE4 (64 bit) on: home build system:  Intel Core 2 Quad (q6700) (2.66ghz), Asus P5K motherboard, 4 gig ddr2 memory, Asus Nvidia Geforce GTS 250 1024 mb gddr3, Crucial M4 128 SSD,  2x Samsung 500 gig HDD (sata), TSSTcorp CDDVDW SH-224BB.

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3790
Re: Wine for 64-bit - some preliminary questions
« Reply #2 on: October 22, 2012, 04:30:13 PM »
There some packages in (or were) in repository who needed ia-32libs like Google Earth (depends on Wine).
Seems it's very difficult to get to update those packages.

Don't know it's the same for Wine 64-bit?

JohnW

I've looked into it and this is how I take it:
Copy 32-bit dependencies from a 32-bit PCLinuxOS. Build a 32-bit wine on 64-bit. (Maybe, this can be copied, also.) If you want to support 64-bit windows programs, build a 64-bit wine. It doesn't sound to hard, but there are a lot of details to get correct. It is probably still over my head. ;)

Galen


Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: Wine for 64-bit - some preliminary questions
« Reply #3 on: November 20, 2012, 04:43:40 PM »
Progress report: slow!

I started by downloading the SRPM and looking at the BuildRequires. All but isdn4k-utils-devel are available in 64-bit, so I started by getting the SRPM for that and looking through it. To my surprise it looked as if it might be 64-bit ready, so I built it without alteration and it succeeded. I don't know whether it's right, of course (that depends on why Texstar didn't build it for 64 - maybe at the time he built this SRPM it had unavailable dependencies, or maybe there was a problem with the 64-bit version he hadn't resolved), but lib64isdn4k-utils3-3.12-2kjpetrie2012.x86_64.rpm, lib64isdn4k-utils-devel-3.12-2kjpetrie2012.x86_64.rpm and isdn4k-utils-3.12-2kjpetrie2012.x86_64.rpm installed OK here, so I decided to give it a try.

I downloaded the Mandriva SRPM for comparison, and tried to build wine with and without a change present in their spec file. Both failed identically when looking for the first library. Presumably, it's looking for the 32-bit libs and at present I only have 64s installed. That's not really surprising, as wine is basically an interface which connects 32-bit Windows apps to 32-bit Windows-style libraries which call Linux libs to interface with the Linux API when needed. 32-bit apps need 32-bit libs, but pclos aims for a pure 64-bit system and installing 800MB of 32-bit binaries to service wine (or at least the building of wine) is a bit of a compromise.

There is a procedure at http://wiki.winehq.org/Wine64ForPackagers I will look into, which involves copying four libraries from 32-bit. In future, the spec file should be altered to produce an extra package when built on 32-bit to go into the 64-bit repo as a BuildRequires for 64! That's going to be interesting to explain!
« Last Edit: November 20, 2012, 05:05:36 PM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3790
Re: Wine for 64-bit - some preliminary questions
« Reply #4 on: November 20, 2012, 10:13:36 PM »
I am glad that you are looking at this. I think that you will find quite a few problems to solve along the way, but it looks like you are off to a good start! :)

Galen

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: Wine for 64-bit - some preliminary questions
« Reply #5 on: November 23, 2012, 02:28:31 PM »
Well the first problem is here:
Code: [Select]
The following packages have unmet dependencies:
  wine-wow64.32bit: Depends: libGL.so.1 but it is not installable
                    Depends: libGLU.so.1 but it is not installable
                    Depends: liblcms.so.1 but it is not installable
                    Depends: libldap_r-2.4.so.2 but it is not installable
E: Broken packages

According to the page linked above:
Quote
As the standard package build process of a distribution might impose restrictions on the availability of 32bit libs in the 64bit build environment there are different ways around it.

WoW64 needs only following 32bit libraries and binaries:

    $libdir/libwine.so*
    $libdir/wine/
    $bindir/wine
    $bindir/wine-preloader

During Build of the 32bit Wine

During the 32bit package build of Wine an additional wine-wow64 sub-package can be build by copying the above libs and binaries.


I suppose it doesn't say the package can be installed. Seems odd that the only needed libraries should have dependencies.

libGL.so.1 and libGLU.so.1 are provided by lib(64)mesagl1,
liblcms.so.1 by lib(64)lcms1,
libldap_r-2.4.so.2 by lib(64)ldap2.4_2.

All 64 bit builds are installed so looks as if it wants the 32-bit packages.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3790
Re: Wine for 64-bit - some preliminary questions
« Reply #6 on: November 23, 2012, 04:09:10 PM »
For the wow (windows32 on windows64) to work, the 32-bit libraries have to be present. But even if they are in the /usr/lib/, the build process has to know how to find them and which ones to use. It appears that
Provides: liblcms
is in the spec file for lib64lcms1. This conflicts with finding the actual liblcms in the /usr/lib/ directory. I would just keep inspecting other distros spec files for clues to how they did it.

Galen

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: Wine for 64-bit - some preliminary questions
« Reply #7 on: November 24, 2012, 10:16:12 AM »
Comparing with the Mandriva spec helped - I had missed out a backslash before:
Code: [Select]
%ifarch x86_64
--enable-win64
%endif
so --enable-win64 wasn't added to the end of the line. That's why the preprocessor was looking for 32-bit headers!

It now compiles and installs in the build environment and fails when spec-helper runs the elf checks with:
Code: [Select]
open: No such file or directory
elf_open: No such file or directory
error: Bad exit status from /home/xxxxx/src/tmp/rpm-tmp.09Yo9x (%install)

So I've got a lot further - the thing compiles! Now I need a clue as to why the elf check goes wrong. Pity it doesn't say which file it was looking for.

(Checking the contents of wine-wow64 I now think that's meant to be installed at run-time rather than compile time to provide 32-bit dlls to Windows applications.)
« Last Edit: November 24, 2012, 10:19:05 AM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: Wine for 64-bit - some preliminary questions
« Reply #8 on: December 11, 2012, 03:52:04 PM »
Sorry to reply to myself. I must be going mad, but IT WORKS!!

I've just installed Lotus SmartSuite 97 into my 64-bit package testing machine and I'm looking at the 1-2-3 Welcome dialogue box as I type!

However, we're not out of the woods yet.

In order to get this working I had to install eight libraries from the 32-bit repo into my test machine, so we need to consider how we're going to automate that and also how we will avoid these conflicting with their 64-bit versions.

Code: [Select]
Committing changes...
Preparing                                ############################## [100%]
Updating / installing
  ia32-libs-2012-1pclos2012.x86_64       ############################## [100%]
  libldap2.4_2-2.4.23-1pclos2010.i586    ############################## [100%]
  liblcms1-1.19-5pclos2010.i586          ############################## [100%]
  libexpat1-2.0.1-3pclos2010.i586        ############################## [100%]
  libpciaccess0-0.10.9-1pclos2010.i586   ############################## [100%]
  libdrm2-2.4.26-1pclos2011.i586         ############################## [100%]
  libdri-drivers-7.11.2-1pclos2011.i586  ############################## [100%]
  libmesagl1-7.11.2-1pclos2011.i586      ############################## [100%]
  libmesaglu1-7.11.2-1pclos2011.i586     ############################## [100%]
  wine-wow64-1.4.1-2kjpetrie2012.i586    ############################## [100%]
  lib64wine1-1.4.1-2kjpetrie2012.x86_64  ############################## [100%]
  wine-1.4.1-2kjpetrie2012.x86_64        ############################## [100%]
Done.

I would suggest a new 64-bit repo section called, say, lib32, where 32-bit requirements for 64-bit applications can reside. I'm not sure how apt-get will find them and distinguish them from the 64-bit ones, but it seemed to manage all right with my test install (insisting they were not available rather than choosing their 64-bt equivalents, some of which might actually have been installed). The other question is to ensure when both architecture libraries are present, the system chooses the most appropriate one (LIBPATH order?). I don't really know enough to know the answer but I'm impressed to get wine running 32-bit Win apps on 64-bit.

It's coming!
« Last Edit: December 11, 2012, 03:54:52 PM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3790
Re: Wine for 64-bit - some preliminary questions
« Reply #9 on: December 11, 2012, 06:28:07 PM »
I don't think we need a new repo section. There is already an seperate library section /usr/lib. I think if you model the way the ia32-libs rpm is done (this was done by Texstar for skype), maybe called it wine32-libs. Set it up to put the pre-build 32-bit dependencies in the right place. I don't think it will conflict, if done right. ;)

Galen

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: Wine for 64-bit - some preliminary questions
« Reply #10 on: December 12, 2012, 04:35:53 AM »
/usr/lib is a directory, not a repo section!

We don't "need" the repo divided into sections at all, but it makes Neal's job easier and he will do what makes most sense to him.

Thanks for all the encouragement and help. I don't think I'd have got this done without it.

« Last Edit: December 12, 2012, 04:40:55 AM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3790
Re: Wine for 64-bit - some preliminary questions
« Reply #11 on: December 12, 2012, 08:14:28 AM »
/usr/lib is a directory, not a repo section!
I understand. I'm just suggesting that only the libraries need segregated, not the rpms. ;)

Quote
We don't "need" the repo divided into sections at all, but it makes Neal's job easier and he will do what makes most sense to him.
I was only talking about what is necessary to make the rpm work. I trust Neal to organize things the way that works for him.

Quote
Thanks for all the encouragement and help. I don't think I'd have got this done without it.
I appreciate you tackling this difficult package. Thank you!

Galen

Online JohnW_57

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2104
Re: Wine for 64-bit - some preliminary questions
« Reply #12 on: December 12, 2012, 12:52:09 PM »
Missing the wow64 package when it was uploaded to repo:

wine:
 Afhankelijk: wine-wow64 (=1.4.1-2pclos2012) but it is not installable (depends on)

JohnW
PCLinuxOS 2013 KDE4 (64 bit) on: home build system:  Intel Core 2 Quad (q6700) (2.66ghz), Asus P5K motherboard, 4 gig ddr2 memory, Asus Nvidia Geforce GTS 250 1024 mb gddr3, Crucial M4 128 SSD,  2x Samsung 500 gig HDD (sata), TSSTcorp CDDVDW SH-224BB.

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: Wine for 64-bit - some preliminary questions
« Reply #13 on: December 12, 2012, 01:04:44 PM »
Wait for the mirrors to sync. It's in ibiblio.
« Last Edit: December 12, 2012, 01:25:43 PM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: Wine for 64-bit - some preliminary questions
« Reply #14 on: December 12, 2012, 06:47:38 PM »
No, we're not there.

I've tried to install from the repo but now there are three more dependencies for wine-wow64 which are claimed not to be available (5 libraries from 3 packages). It worked on my test install locally, but not from the repo.

Will have to check this in the morning. Too late to think straight.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf