wine: fix sane related build failure
PATCH 1/1 wine: fix sane related build failure
If sane is installed system-wide on the build machine, then the sane-config binary found is the one of the system, which returns incorrect library paths for cross-compilation.
To fix this, this commit adds a patch to wine to make it support a SANE_CONFIG environment variable, and then adjusts wine.mk to explicitly pass the path to $(STAGING_DIR)/usr/bin/sane-config.
Fixes:
http://autobuild.buildroot.org/results/8bd/8bdc1eed55075313403aa8a6c9af6a427bce198e/
--- package/wine/0003-sane-config-fix.patch | 21 +++++++++++++++++++++ package/wine/wine.mk | 1 + 2 files changed, 22 insertions(+) create mode 100644 package/wine/0003-sane-config-fix.patch
package/wine/0003-sane-config-fix.patch new file +21 -0
@@ -0,0 +1,21 @@ +Add support for SANE_CONFIG variable + +Instead of using directly the sane-config command, allow to pass a +SANE_CONFIG environment variable to override where to find the +sane-config tool. + +Signed-off-by: Thomas Petazzoni <[email protected]> + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -1375,7 +1375,7 @@ + if test "x$with_sane" != "xno" + then + ac_save_CPPFLAGS="$CPPFLAGS" +- WINE_PACKAGE_FLAGS(SANE,[libsane],,[`sane-config --cflags 2>/dev/null`],[`sane-config --ldflags 2>/dev/null`]) ++ WINE_PACKAGE_FLAGS(SANE,[libsane],,[`${SANE_CONFIG:-sane-config} --cflags 2>/dev/null`],[`${SANE_CONFIG:-sane-config} --ldflags 2>/dev/null`]) + AC_CHECK_HEADER(sane/sane.h, + [WINE_CHECK_SONAME(sane,sane_init,,[SANE_CFLAGS=""],[$SANE_LIBS])], + [SANE_CFLAGS=""])
package/wine/wine.mk +1 -0
@@ -174,6 +174,7 @@ endif ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y) WINE_CONF_OPTS += --with-sane WINE_DEPENDENCIES += sane-backends +WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config else WINE_CONF_OPTS += --without-sane endif
Signature · 1 line
2.4.5
PATCH 1/1 wine: fix sane related build failure
Thomas, All,
On 2015-07-05 13:15 +0200, Thomas Petazzoni spake thusly:
Quoted 8 lines
If sane is installed system-wide on the build machine, then the sane-config binary found is the one of the system, which returns incorrect library paths for cross-compilation.
To fix this, this commit adds a patch to wine to make it support a
SANE_CONFIGenvironment variable, and then adjusts wine.mk to explicitly pass the path to $(STAGING_DIR)/usr/bin/sane-config.
Quoted 5 lines
Fixes:
http://autobuild.buildroot.org/results/8bd/8bdc1eed55075313403aa8a6c9af6a427bce198e/
Signed-off-by Thomas Petazzoni <[email protected]>
Regards,
Yann E. MORIN.
Quoted 52 lines
--- package/wine/0003-sane-config-fix.patch | 21 +++++++++++++++++++++ package/wine/wine.mk | 1 + 2 files changed, 22 insertions(+) create mode 100644 package/wine/0003-sane-config-fix.patchpackage/wine/0003-sane-config-fix.patch new file +21
-0@@ -0,0 +1,21 @@ +Add support for SANE_CONFIG variable + +Instead of using directly the sane-config command, allow to pass a +SANE_CONFIG environment variable to override where to find the +sane-config tool. + +Signed-off-by: Thomas Petazzoni <[email protected]> + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -1375,7 +1375,7 @@ + if test "x$with_sane" != "xno" + then + ac_save_CPPFLAGS="$CPPFLAGS" +- WINE_PACKAGE_FLAGS(SANE,[libsane],,[`sane-config --cflags 2>/dev/null`],[`sane-config --ldflags 2>/dev/null`]) ++ WINE_PACKAGE_FLAGS(SANE,[libsane],,[`${SANE_CONFIG:-sane-config} --cflags 2>/dev/null`],[`${SANE_CONFIG:-sane-config} --ldflags 2>/dev/null`]) + AC_CHECK_HEADER(sane/sane.h, + [WINE_CHECK_SONAME(sane,sane_init,,[SANE_CFLAGS=""],[$SANE_LIBS])], + [SANE_CFLAGS=""])package/wine/wine.mk +1
-0@@ -174,6 +174,7 @@ endif ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y) WINE_CONF_OPTS += --with-sane WINE_DEPENDENCIES += sane-backends +WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config else WINE_CONF_OPTS += --without-sane endifSignature · 6 lines
2.4.5 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH 1/1 wine: fix sane related build failure
In reply to Thomas PetazzoniHello,
Quoted 10 lines · Thomas Petazzoni
If sane is installed system-wide on the build machine, then the sane-config binary found is the one of the system, which returns incorrect library paths for cross-compilation.
To fix this, this commit adds a patch to wine to make it support a
SANE_CONFIGenvironment variable, and then adjusts wine.mk to explicitly pass the path to $(STAGING_DIR)/usr/bin/sane-config.Fixes:
Quoted 8 lines
http://autobuild.buildroot.org/results/8bd/8bdc1eed55075313403aa8a6c9af6a427bce198e/
Signed-off-by Thomas Petazzoni <[email protected]>--- package/wine/0003-sane-config-fix.patch | 21 +++++++++++++++++++++ package/wine/wine.mk | 1 + 2 files changed, 22 insertions(+) create mode 100644 package/wine/0003-sane-config-fix.patch
Applied.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 wine: fix sane related build failure
In reply to Thomas PetazzoniHi Thomas,
Moving this discussion to the correct thread...
I meanwhile submitted https://bugs.winehq.org/show_bug.cgi?id=39660 which didn't caught much attention yet. But I looked at it myself and I think I found a way to avoid patching Wine.
Wines configure exposes special COMPONENT_CFLAGS and COMPONENT_LIBS variables which get prioritized over "guessed" tools. What's your opinion on this (afaict it works):
package/wine/wine.mk +2 -1
@@ -173,8 +173,9 @@ endif ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y) WINE_CONF_OPTS += --with-sane +WINE_CONF_OPTS += SANE_CFLAGS="`$(STAGING_DIR)/usr/bin/sane-config --cflags 2>/dev/null`" +WINE_CONF_OPTS += SANE_LIBS="`$(STAGING_DIR)/usr/bin/sane-config --ldflags 2>/dev/null`" WINE_DEPENDENCIES += sane-backends -WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config else WINE_CONF_OPTS += --without-sane endif
Am 05.07.2015 um 13:15 schrieb Thomas Petazzoni:
Quoted 59 lines
If sane is installed system-wide on the build machine, then the sane-config binary found is the one of the system, which returns incorrect library paths for cross-compilation.
To fix this, this commit adds a patch to wine to make it support a
SANE_CONFIGenvironment variable, and then adjusts wine.mk to explicitly pass the path to $(STAGING_DIR)/usr/bin/sane-config.Fixes:
http://autobuild.buildroot.org/results/8bd/8bdc1eed55075313403aa8a6c9af6a427bce198e/
Signed-off-by Thomas Petazzoni <[email protected]>--- package/wine/0003-sane-config-fix.patch | 21 +++++++++++++++++++++ package/wine/wine.mk | 1 + 2 files changed, 22 insertions(+) create mode 100644 package/wine/0003-sane-config-fix.patchpackage/wine/0003-sane-config-fix.patch new file +21
-0@@ -0,0 +1,21 @@ +Add support for SANE_CONFIG variable + +Instead of using directly the sane-config command, allow to pass a +SANE_CONFIG environment variable to override where to find the +sane-config tool. + +Signed-off-by: Thomas Petazzoni <[email protected]> + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -1375,7 +1375,7 @@ + if test "x$with_sane" != "xno" + then + ac_save_CPPFLAGS="$CPPFLAGS" +- WINE_PACKAGE_FLAGS(SANE,[libsane],,[`sane-config --cflags 2>/dev/null`],[`sane-config --ldflags 2>/dev/null`]) ++ WINE_PACKAGE_FLAGS(SANE,[libsane],,[`${SANE_CONFIG:-sane-config} --cflags 2>/dev/null`],[`${SANE_CONFIG:-sane-config} --ldflags 2>/dev/null`]) + AC_CHECK_HEADER(sane/sane.h, + [WINE_CHECK_SONAME(sane,sane_init,,[SANE_CFLAGS=""],[$SANE_LIBS])], + [SANE_CFLAGS=""])package/wine/wine.mk +1
-0@@ -174,6 +174,7 @@ endif ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y) WINE_CONF_OPTS += --with-sane WINE_DEPENDENCIES += sane-backends +WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config else WINE_CONF_OPTS += --without-sane endif
PATCH 1/1 wine: fix sane related build failure
Quoted 14 lines · Andr? Hentschel
Hi Thomas,
Moving this discussion to the correct thread...
I meanwhile submitted https://bugs.winehq.org/show_bug.cgi?id=39660 which didn't caught much attention yet. But I looked at it myself and I think I found a way to avoid patching Wine.
Wines configure exposes specialCOMPONENT_CFLAGSandCOMPONENT_LIBSvariables which get prioritized over "guessed" tools. What's your opinion on this (afaict it works):package/wine/wine.mk +0
-0
package/wine/wine.mk endif · line 181
Quoted 10 lines
package/wine/wine.mk +2
-1@@ -173,8 +173,9 @@ endif ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y) WINE_CONF_OPTS += --with-sane +WINE_CONF_OPTS += SANE_CFLAGS="`$(STAGING_DIR)/usr/bin/sane-config --cflags 2>/dev/null`" +WINE_CONF_OPTS += SANE_LIBS="`$(STAGING_DIR)/usr/bin/sane-config --ldflags 2>/dev/null`" WINE_DEPENDENCIES += sane-backends -WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config else WINE_CONF_OPTS += --without-sane endif
Looks good to me. However, doesn't sane install a pkg-config file as well? I'd
prefer to use that one then.
Regards,
Arnout
[snip]
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH 1/1 wine: fix sane related build failure
Am 05.12.2015 um 15:48 schrieb Arnout Vandecappelle:
Quoted 16 lines · Andr? Hentschel
Quoted 15 lines
Hi Thomas,
Moving this discussion to the correct thread...
I meanwhile submitted https://bugs.winehq.org/show_bug.cgi?id=39660 which didn't caught much attention yet. But I looked at it myself and I think I found a way to avoid patching Wine.
Wines configure exposes specialCOMPONENT_CFLAGSandCOMPONENT_LIBSvariables which get prioritized over "guessed" tools. What's your opinion on this (afaict it works):package/wine/wine.mk +0
-0@@ -173,8 +173,9 @@ endif
Quoted 12 lines
package/wine/wine.mk endif · line 181
Quoted 9 lines
package/wine/wine.mk +2
-1ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y) WINE_CONF_OPTS += --with-sane +WINE_CONF_OPTS += SANE_CFLAGS="`$(STAGING_DIR)/usr/bin/sane-config --cflags 2>/dev/null`" +WINE_CONF_OPTS += SANE_LIBS="`$(STAGING_DIR)/usr/bin/sane-config --ldflags 2>/dev/null`" WINE_DEPENDENCIES += sane-backends -WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config else WINE_CONF_OPTS += --without-sane endifLooks good to me. However, doesn't sane install a pkg-config file as well? I'd
prefer to use that one then.
Thx for the hint, but this is closer to what Wine would do, seems somewhat saver to me and I would stick to this approach if it's not a total NoGo