Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296608 - app-emulation/wine: shared 64bit suppport win64/wine64
Summary: app-emulation/wine: shared 64bit suppport win64/wine64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: Wine Maintainers
URL: http://wiki.jswindle.com/index.php/Ge...
Whiteboard:
Keywords:
: 299987 337335 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-12 13:26 UTC by Michael Weber (RETIRED)
Modified: 2010-09-14 21:53 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
wine64 in addition to wine (32bit) (wine64-1.1.34.ebuild,4.39 KB, text/plain)
2009-12-12 16:58 UTC, Michael Weber (RETIRED)
Details
copy from portage tree (wine-1.1.15-winegcc.patch,1.51 KB, text/plain)
2009-12-12 16:59 UTC, Michael Weber (RETIRED)
Details
wine-1.1.42.ebuild (wine-1.1.42.ebuild,5.28 KB, text/plain)
2010-04-20 07:47 UTC, SpanKY
Details
another non-functioning ebuild (wine-1.1.42.ebuild,5.34 KB, text/plain)
2010-04-21 12:50 UTC, Michael Weber (RETIRED)
Details
bzip2'ed build.log (2.5M) (build.log.bz2,110.68 KB, text/plain)
2010-04-21 12:54 UTC, Michael Weber (RETIRED)
Details
wine-1.1.43 parallel build.log (build.log.bz2,98.06 KB, text/plain)
2010-05-06 23:35 UTC, Michael Weber (RETIRED)
Details
wine-1.1.43 non-parallel build.log (build.log.bz2,149.59 KB, text/plain)
2010-05-07 00:35 UTC, Michael Weber (RETIRED)
Details
wine-1.2.ebuild patch with wow64 (wine-1.2.ebuild.patch,3.50 KB, patch)
2010-07-18 14:55 UTC, Alexandre Borges Marcelo
Details | Diff
working wine-1.2.ebuild (wine-1.2.ebuild,5.30 KB, text/plain)
2010-07-20 13:38 UTC, Alexandre Borges Marcelo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weber (RETIRED) gentoo-dev 2009-12-12 13:26:54 UTC
According to http://wiki.jswindle.com/index.php/General_Wine_Information#64Wine_and_Wine_on_64 and http://www.winehq.org/pipermail/wine-devel/2009-February/073030.html the standard 32bit version (USE=-win64) of wine and the experimental 64bit (USE=win64) version should be seen as 2 totally independent pieces of software. At least as long as the 64bit launcher does not recognize 32bit EXE by printing

Trying to load PE image for unsupported architecture (I386)

In my humble opinion this is should be represented as two different packages, 
the 64bit one with modified path /usr/share/wine64 and /usr/bin/wine64.
It's not acceptable to reemerge wine with adequat win64 USE flag, everytime the called bin format is changed.



Reproducible: Always
Comment 1 Michael Weber (RETIRED) gentoo-dev 2009-12-12 16:58:30 UTC
Created attachment 212794 [details]
wine64 in addition to wine (32bit)

-wine's configure does not handle --program-suffix. I had to install almost everything to /opt/wine64. 
-the fonts and wine.inf in /usr/share/wine could not be moved and would conflict with app-emulation/wine -> runtime dependency to app-emulation/wine[-win64].
-wine64 does work, but I'm not sure which winedbg/... get's called by wine64.
Comment 2 Michael Weber (RETIRED) gentoo-dev 2009-12-12 16:59:37 UTC
Created attachment 212795 [details]
copy from portage tree

copy of /usr/portage/app-emulation/wine/files/wine-1.1.15-winegcc.patch
Comment 3 Michael Weber (RETIRED) gentoo-dev 2009-12-12 17:03:00 UTC
I don't know where to  locate package.use.mask inside a layman-managed overlay.
I've added app-emulation/wine64 -dbus -gnutls -gphoto2 -gsm -hal -jpeg -ldap -mp3 -nas -openal -scanner
to /etc/portage/package.use.

see http://svn.xmw.de/gentoo-overlay/
Comment 4 SpanKY gentoo-dev 2009-12-12 20:32:40 UTC
really needs a solution that doesnt involve duplicating everything
Comment 5 Michael Weber (RETIRED) gentoo-dev 2009-12-12 20:44:36 UTC
(In reply to comment #4)
> really needs a solution that doesnt involve duplicating everything

ack, in upstream. But currently the only common files were unduplicated in /usr/share/wine and gentoo should provide both 'versions' at the same time.

Comment 6 SpanKY gentoo-dev 2009-12-13 03:47:45 UTC
i'm talking about the ebuild.  i'm not going to merge a new "package" which is a duplicate of an existing package but a new name.

if you actually feel like doing the work here (honestly, i'm not), you can add a "win32" USE flag to the current ebuild and that will take care of building the right versions of wine:
USE="-win32 -win64" - install wine32
USE=" win32 -win64" - install wine32
USE="-win32  win64" - install wine64
USE=" win32  win64" - install wine32 and wine64
Comment 7 Michael Weber (RETIRED) gentoo-dev 2009-12-13 11:33:24 UTC
h(In reply to comment #6)
> i'm talking about the ebuild.  i'm not going to merge a new "package" which is
> a duplicate of an existing package but a new name.
I can comprehend your feeling and your suggested use flag constellation. 
But the request for the additional win64 stuff would trigger a recompilation of
the (already installed) win32 stuff. Ok, it's the era of ccache, multicore and
distcc, but the people from sunrise (were I tried to place some of my past
efforts) bashed me continuing for doing recompilations.

> if you actually feel like doing the work here (honestly, i'm not), you can add
> a "win32" USE flag to the current ebuild and that will take care of building
> the right versions of wine:
> USE="-win32 -win64" - install wine32
> USE=" win32 -win64" - install wine32
> USE="-win32  win64" - install wine64
> USE=" win32  win64" - install wine32 and wine64
If you think that's the right way, I can do so. But it would relocate the 
replication of the ebuild to loops inside of src_prepare, src_compile and 
src_install because of the --enable-win64 parameter of configure. It's a
divertion between wine32 and wine64, not an option for additional wine64.

The validity of the whole effort (produced as one flagged or two ebuilds) has
to be proven in addition. the libs would be installed to /usr/lib{32,64} but he bins end up in /usr/bin with no shipped --program-suffix option. 
This becomes a problem inside the kernel32.so which calls winedbg by name in case of a crash - which should be the right one, I assume.

Michael
Comment 8 SpanKY gentoo-dev 2009-12-13 14:39:25 UTC
you're talking a one-off cost which is largely irrelevant considering how often new versions of wine are released.  as for the sunrise stance, i dont care.

there are plenty of ebuilds in the tree which can be used as an example (like ncurses).  the econf/etc... steps are given their own function and called as needed based on USE flags with specific configure flags.

patching & pushing upstream a program-suffix solution should be fine
Comment 9 SpanKY gentoo-dev 2010-01-08 02:52:18 UTC
*** Bug 299987 has been marked as a duplicate of this bug. ***
Comment 10 Malte E. 2010-04-03 10:03:57 UTC
The winehq homepage says "Support for shared 32/64-bit setups" in the release notes of wine 1.1.42: http://www.winehq.org/announce/1.1.42
This should be solving this bug.
Comment 11 Michael Weber (RETIRED) gentoo-dev 2010-04-11 00:22:24 UTC
1.1.42 got intro tree, should be fixed now, see #314447.
Comment 12 SpanKY gentoo-dev 2010-04-20 07:46:51 UTC
wine itself doesnt "just work".  the ebuild still needs modification.
Comment 13 SpanKY gentoo-dev 2010-04-20 07:47:56 UTC
Created attachment 228487 [details]
wine-1.1.42.ebuild

here is a stab at things, but it doesnt really work and i dont have time to get it working

see http://wiki.winehq.org/Wine64ForPackagers
Comment 14 Michael Weber (RETIRED) gentoo-dev 2010-04-21 08:45:45 UTC
http://wiki.winehq.org/Wine64 describes something like this, look out for the --with-wine64

mkdir "${S}"/wine64
cd "${S}"/wine64
../configure --enable-win64 CC=$(tc-getCC)
make > make.log 2>&1
mkdir "${S}"/wine32
cd "${S}"/wine32
../configure --with-wine64=../wine64
make > make.log 2>&1

this two configure;make runs call out for an non-conventional src_compile with the above code and ignoring the src_configure. Or maybe the first configure in src_configure for the checks and the rest in src_compile. I'll check it out.
Comment 15 Michael Weber (RETIRED) gentoo-dev 2010-04-21 12:50:03 UTC
Created attachment 228623 [details]
another non-functioning ebuild

i should have looked better to see SpanKY's ebuild.
Mine doesn't drop the multilib_toolchain_setup x86 for -win64 on x86.

build.log follows
Comment 16 Michael Weber (RETIRED) gentoo-dev 2010-04-21 12:54:56 UTC
Created attachment 228625 [details]
bzip2'ed build.log (2.5M)

i've tried to multilib_toolchain_setup x86 during the compilation in wine32, but then a link invocations fails with elf64_x86_64 and elf32_x86 cannot be linked together.

I had to set MAKEOPTS="-j1" otherwise i got "rm fonts: fonts cannot be removed, it's a directory", twice.

I think the "Could not open importlib stdole2.tlb" error is described at http://wiki.winehq.org/JohnKlehm 

Michael
Comment 17 Michael Weber (RETIRED) gentoo-dev 2010-04-22 11:49:33 UTC
(In reply to comment #13)
> Created an attachment (id=228487) [details]
> wine-1.1.42.ebuild

Just checked, same result, "Cannot remove fonts dir" in parallel mode, and 
"error: Could not open importlib stdole2.tlb." in non-parallel mode.
Comment 18 Michael Weber (RETIRED) gentoo-dev 2010-05-06 23:35:21 UTC
Created attachment 230643 [details]
wine-1.1.43 parallel build.log

Just checked SpanKY's ebuild against 1.1.43 version, 

rm: cannot remove `fonts': Is a directory
make: *** [fonts] Error 1
rm: cannot remove `server': Is a directory
make: *** [server] Error 1

This build system could use a deeper look.
Comment 19 Michael Weber (RETIRED) gentoo-dev 2010-05-07 00:35:34 UTC
Created attachment 230649 [details]
wine-1.1.43 non-parallel build.log
Comment 20 fling 2010-07-17 02:16:58 UTC
Bug 296608 depends on: 328687

The Wine team is proud to announce that the stable release Wine 1.2 is
now available.

This release represents two years of development effort and over
23,000 changes. The main highlights are the support for 64-bit
applications, and the new graphics based on the Tango standard.
Comment 21 SpanKY gentoo-dev 2010-07-17 18:54:06 UTC
no, it does not
Comment 22 Alexandre Borges Marcelo 2010-07-18 14:55:34 UTC
Created attachment 239251 [details, diff]
wine-1.2.ebuild patch with wow64

(In reply to comment #21)
> no, it does not
> 

Actually, yes, it does.
I made an ebuild with the directions of comment #14 and it works nicely so far. With a "wow64" USE flag, it installs a wine and wine64: wine64 accepts both 32 and 64 apps, and while wine doesn't, it falls back gracefully to wine64 after a small error "Trying to load PE image for unsupported architecture (AMD-64)"
I'm not that experienced with making ebuilds, so feel free to correct anything you find inappropriate. Enjoy! =D
Comment 23 Alexandre Borges Marcelo 2010-07-18 16:07:23 UTC
Ok, now I see that wine64 also fails with 32bit and falls back to wine... Sorry about the mix up, but still works! =P
Comment 24 Alexandre Borges Marcelo 2010-07-18 16:53:28 UTC
Humm, looks like it still won't play nice with 32bit installers of 64bit apps.
I tried installing the unofficial firefox and it borked by the end of the install. Apparently it only tests if it's 32 or 64 at the beginning, then fixes that value through the execution, and when the 32bit installer tries to call the 64bit app it fails... It's probably a bug upstream though... =/
Comment 25 Alexandre Borges Marcelo 2010-07-20 02:15:11 UTC
(In reply to comment #22)
> (In reply to comment #21)
> > no, it does not
> Actually, yes, it does.

I didn't see the "depends on: 328687" in comment #21 and misinterpreted your answer. You're absolutely right, it does not depend on the version bump. Sorry about that...
Comment 26 Alexandre Borges Marcelo 2010-07-20 13:38:30 UTC
Created attachment 239555 [details]
working wine-1.2.ebuild

(In reply to comment #13)
> Created an attachment (id=228487) [details]
> wine-1.1.42.ebuild
> 
> here is a stab at things, but it doesnt really work and i dont have time to get
> it working
> 
> see http://wiki.winehq.org/Wine64ForPackagers
> 

Since I had some time, I looked at your ebuild (which is much better written than mine) and made it work by adding an ABI=x86 before the 32bit do_configure() and returning to the default after. Thank you for your pacience, I'll stop bothering now... =P
Comment 27 SpanKY gentoo-dev 2010-07-24 04:34:57 UTC
thanks, ive merged that into wine-9999.  if things go well, i'll merge it into the next released version too.

http://sources.gentoo.org/app-emulation/wine/wine-9999.ebuild?r1=1.54&r2=1.55
Comment 28 Malte E. 2010-07-31 12:52:13 UTC
(In reply to comment #27)
> thanks, ive merged that into wine-9999.  if things go well, i'll merge it into
> the next released version too.
I think this should be supported in 1.2, too, because it's the stable version and many people might want to run it for the next months.
Comment 29 SpanKY gentoo-dev 2010-09-14 21:53:32 UTC
*** Bug 337335 has been marked as a duplicate of this bug. ***