Skip to contentSkip to conversation

Wine package

RFC In review André Hentschel 2 participants 5 messages Jan 2, 2015 – Jan 3, 2015

lore
Share & tools
lore
#0 lore raw

Hi,
I'm working on the Wine package for upstream buildroot.
I attached Config.in and wine.mk for early review, so i don't start totally wrong. Note that it's not complete wrt to dependency checking.

For cross compilation wine needs its own tools compiled for the host architecture, therefor there is host-wine. As there's no easy way to only build the wine tools i disabled as much as possible.

Are stable or up-to-date (development) versions preferred? Wine 1.6.2 (latest stable) is one year old... -------------- next part --------------
config BR2_PACKAGE_WINE
bool "Wine"
depends on BR2_INET_IPV6
depends on BR2_TOOLCHAIN_HAS_THREADS
# Wine has much CPU specific code
depends on BR2_i386 || BR2_x86_64
help
Wine is a compatibility layer capable of running
Windows applications on Linux. Instead of simulating internal
Windows logic like a virtual machine or emulator,
Wine translates Windows API calls into POSIX calls on-the-fly,
eliminating the performance and memory penalties of other methods.

http://www.winehq.org

comment "Wine needs a toolchain w/ IPv6, threads"

	depends on BR2_i386 || BR2_x86_64
	depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine.mk
Type: text/x-makefile
Size: 4234 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150102/b11261be/attachment.bin>

#1 lore raw

Dear Andr? Hentschel,

Quoted 2 lines · Andr? Hentschel

I'm working on the Wine package for upstream buildroot.
I attached Config.in and wine.mk for early review, so i don't start totally wrong.

Can you send a proper patch, sent inline (using git send-email) ? This is actually what makes review easy as we can just hit "Reply" and put some comments inline in the code.

Quoted 2 lines

For cross compilation wine needs its own tools compiled for the host architecture, therefor there is host-wine. As there's no easy way to only build the wine tools i disabled as much as possible.

Ok.

Quoted 1 line

Are stable or up-to-date (development) versions preferred? Wine 1.6.2 (latest stable) is one year old...

We typically prefer stable versions, unless there's good reasons to use a more recent version.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

RFC 1/1 Wine package

Am 02.01.2015 um 19:13 schrieb Thomas Petazzoni:> Dear Andr? Hentschel,

Quoted 9 lines · Andr? Hentschel
Quoted 3 lines

I'm working on the Wine package for upstream buildroot.
I attached Config.in and wine.mk for early review, so i don't start totally wrong.

Can you send a proper patch, sent inline (using git send-email) ? This is actually what makes review easy as we can just hit "Reply" and put some comments inline in the code.

ok, here it is, modified the version and added the uclibc dependency

package/Config.in +1 -0
index a4f5d8b..e59b458 100644
@@ -997,6 +997,7 @@ menu "Miscellaneous"
 	source "package/snowball-init/Config.in"
 	source "package/sound-theme-borealis/Config.in"
 	source "package/sound-theme-freedesktop/Config.in"
+	source "package/wine/Config.in"
 endmenu
 
 menu "Networking applications"
package/wine/Config.in new file +19 -0
new file mode 100644
index 0000000..ad0c8f2
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_WINE
+	bool "Wine"
+	depends on BR2_INET_IPV6
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+    depends on !BR2_TOOLCHAIN_USES_UCLIBC
+	# Wine has much CPU specific code
+	depends on BR2_i386 || BR2_x86_64
+	help
+	  Wine is a compatibility layer capable of running
+	  Windows applications on Linux. Instead of simulating internal
+	  Windows logic like a virtual machine or emulator,
+	  Wine translates Windows API calls into POSIX calls on-the-fly,
+	  eliminating the performance and memory penalties of other methods.
+
+	  http://www.winehq.org
+
+comment "Wine needs a toolchain w/ IPv6, threads"
+	depends on BR2_i386 || BR2_x86_64
+	depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS
package/wine/wine.mk new file +203 -0

203 lines not on this page · raw message

#3 lore raw

Dear Andr? Hentschel,

Quoted 1 line · Andr? Hentschel

ok, here it is, modified the version and added the uclibc dependency

Thanks. See comments below.

package/wine/Config.in line 2

Quoted 8 lines
package/wine/Config.in new file +2 -0
new file mode 100644
index 0000000..ad0c8f2
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_WINE
+	bool "Wine"

Lowercase: "wine".

package/wine/Config.in line 5

Quoted 3 lines
package/wine/Config.in new file +3 -0
+	depends on BR2_INET_IPV6
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+    depends on !BR2_TOOLCHAIN_USES_UCLIBC

Indentation is not correct for this line. Also, just for curiosity, could you give some details on the issues you've seen when building wine against uclibc?

Does it work with the musl C library? In other words, do you need:

depends on !BR2_TOOLCHAIN_USES_UCLIBC

or:

depends on BR2_TOOLCHAIN_USES_GLIBC

?

Quoted 4 lines
package/wine/Config.in new file +4 -0
+	# Wine has much CPU specific code
+	depends on BR2_i386 || BR2_x86_64
+	help
+	  Wine is a compatibility layer capable of running

package/wine/Config.in line 19

Quoted 10 lines
package/wine/Config.in new file +10 -0
+	  Windows applications on Linux. Instead of simulating internal
+	  Windows logic like a virtual machine or emulator,
+	  Wine translates Windows API calls into POSIX calls on-the-fly,
+	  eliminating the performance and memory penalties of other methods.
+
+	  http://www.winehq.org
+
+comment "Wine needs a toolchain w/ IPv6, threads"
+	depends on BR2_i386 || BR2_x86_64
+	depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS

You need to take into account the uClibc issue here, by adding something like:

wine needs an (e)glibc toolchain w/ IPv6, threads

Of course assuming what you need is glibc only.

Also, lowercase "wine".

Quoted 6 lines
package/wine/wine.mk new file +0 -0
new file mode 100644
index 0000000..ce91587

package/wine/wine.mk line 10

Quoted 10 lines
package/wine/wine.mk new file +10 -0
@@ -0,0 +1,203 @@
+################################################################################
+#
+# wine
+#
+################################################################################
+
+WINE_VERSION = 1.6.2
+WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2
+WINE_SITE = http://source.winehq.org/git/wine.git/snapshot/
+WINE_LICENSE = LGPLv2.1

Can you double check whether it's LGPLv2.1 or LGPLv2.1+ ?

package/wine/wine.mk line 14

Quoted 4 lines
package/wine/wine.mk new file +4 -0
+WINE_LICENSE_FILES = COPYING.LIB
+WINE_INSTALL_TARGET = YES
+WINE_DEPENDENCIES = host-wine
+WINE_CONF_OPTS += --disable-tests --with-wine-tools=../host-wine-$(WINE_VERSION)

Having the target wine poke directly inside the source directory of host-wine isn't that great. Ideally, we should be able to remove the source directory of a package immediately after it has been built. The host wine package gets installed to $(HOST_DIR). Aren't the tools you need also installed there? If not, then please add a comment above this line that explains what is going on.

package/wine/wine.mk line 18

Quoted 4 lines
package/wine/wine.mk new file +4 -0
+
+ifeq ($(or $(BR2_aarch64),$(BR2_x86_64)),y)
+WINE_CONF_OPTS += --enable-win64
+endif

Your Config.in file only allows the wine package to be built on i386 and x86-64, so the aarch64 part seems superfluous here. So maybe just:

WINE_CONF_OPTS += $(if $(BR2_ARCH_IS_64),--enable-win64)

package/wine/wine.mk line 109

Quoted 6 lines
package/wine/wine.mk new file +6 -0
+ifeq ($(BR2_PACKAGE_XORG7),y)
+	WINE_CONF_OPTS += --with-x
+	WINE_DEPENDENCIES += x11r7
+else
+	WINE_CONF_OPTS += --without-x
+endif

There is no package named 'x11r7' in Buildroot, so clearly this hasn't been tested.

Did you test all those optional dependencies? If not, then please simply disable the ones you haven't tested (i.e force --without-<foo> in WINE_CONF_OPTS). Developers interested in enabling more optional dependencies can do so later on.

Other than that, looks good. Do you have a pointer to a simple command-line only Windows program that we could potentially use to test this wine package?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

RFC 1/1 Wine package

Hi Thomas,

I did a lot of tests, could i please have such good comments again on my current state? First i'll respond to some comments inline (removed comments are simply done):

Am 02.01.2015 um 20:29 schrieb Thomas Petazzoni:

Quoted 6 lines

Indentation is not correct for this line. Also, just for curiosity, could you give some details on the issues you've seen when building wine against uclibc?

Does it work with the musl C library? In other words, do you need:

Quoted 7 lines

depends on !BR2_TOOLCHAIN_USES_UCLIBC

or:

depends on BR2_TOOLCHAIN_USES_GLIBC

?

See https://bugs.winehq.org/show_bug.cgi?id=37809 for the uclibc problem (bessel functions). With musl it is version dependent on the Wine side, newer versions support it, but not the stable one. I choosed to start with the stable version (1.6.2), so i'll depend on glibc.

Quoted 9 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+WINE_DEPENDENCIES = host-wine
+WINE_CONF_OPTS += --disable-tests --with-wine-tools=../host-wine-$(WINE_VERSION)

Having the target wine poke directly inside the source directory of host-wine isn't that great. Ideally, we should be able to remove the source directory of a package immediately after it has been built. The host wine package gets installed to $(HOST_DIR). Aren't the tools you need also installed there? If not, then please add a comment above this line that explains what is going on.

As i explain now in a comment, Wine expects e.g. winebuild to be at tools/winebuild/winebuild which is true in the Wine source tree (or out of tree build of wine), but not in the installed bin/ folder

Quoted 3 lines

Other than that, looks good. Do you have a pointer to a simple command-line only Windows program that we could potentially use to test this wine package?

maybe http://sourceforge.net/projects/win32svn/

NOW to the new patch:

package/Config.in +1 -0
index a4f5d8b..e59b458 100644
@@ -997,6 +997,7 @@ menu "Miscellaneous"
 	source "package/snowball-init/Config.in"
 	source "package/sound-theme-borealis/Config.in"
 	source "package/sound-theme-freedesktop/Config.in"
+	source "package/wine/Config.in"
 endmenu
 
 menu "Networking applications"
package/wine/Config.in new file +19 -0
new file mode 100644
index 0000000..e7329e4
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_WINE
+	bool "wine"
+	depends on BR2_INET_IPV6
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	# Wine has much CPU specific code
+	depends on BR2_i386 || BR2_x86_64
+	help
+	  Wine is a compatibility layer capable of running
+	  Windows applications on Linux. Instead of simulating internal
+	  Windows logic like a virtual machine or emulator,
+	  Wine translates Windows API calls into POSIX calls on-the-fly,
+	  eliminating the performance and memory penalties of other methods.
+
+	  http://www.winehq.org
+
+comment "wine needs a (e)glibc toolchain w/ IPv6, threads"
+	depends on BR2_i386 || BR2_x86_64
+	depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS
package/wine/wine.mk new file +264 -0

264 lines not on this page · raw message