Hi! It's me again.

This time I've experienced build breakage of xmms2
in binutils built with multitarget support (every single binutils
binary can handle many target formats and architectures).
It came out PE binutils subsystem ships 'windres' binary:
$ ls -l /usr/bin/windres
lrwxrwxrwx 1 root root 27 Apr  5 18:58 /usr/bin/windres -> 
x86_64-pc-linux-gnu-windres

So when building xmms2-devel#master branch I get the following error:

[ 26/269] winrc: pixmaps/xmms2.rc -> _build_/default/pixmaps/xmms2.rc.o
/usr/bin/windres: can't get BFD_RELOC_RVA relocation type: No error
Waf: Leaving directory 
`/var/tmp/paludis/media-sound-xmms2-9999-r3/work/xmms2-devel/_build_'
Build failed
 -> task failed (err #1):
        {task: winrc xmms2.rc -> xmms2.rc.o}

Following branch (and attached patch set) fixes the issue:
    git pull git://repo.or.cz/xmms2-devel/slyfox.git windres-on-linux

Web interface link to looks at them:
    
http://repo.or.cz/w/xmms2-devel/slyfox.git/shortlog/refs/heads/windres-on-linux

Many thanks to _caotic_ for help and and suggestions!

-- 

  Sergei
From c88ae41b6410fc94fc7fcbf29f65a895b6096ece Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <[email protected]>
Date: Mon, 19 Apr 2010 13:16:56 +0300
Subject: [PATCH 1/2] OTHER: fix build failure on windres aware binutils (linux host, native build)

Trying to use windres under linux (native build) is worthless:

[ 26/269] winrc: pixmaps/xmms2.rc -> _build_/default/pixmaps/xmms2.rc.o
/usr/bin/windres: can't get BFD_RELOC_RVA relocation type: No error
Waf: Leaving directory `/var/tmp/paludis/media-sound-xmms2-9999-r3/work/xmms2-devel/_build_'
Build failed
 -> task failed (err #1):
        {task: winrc xmms2.rc -> xmms2.rc.o}

Signed-off-by: Sergei Trofimovich <[email protected]>
---
 wscript |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/wscript b/wscript
index 2a29016..1d73813 100644
--- a/wscript
+++ b/wscript
@@ -265,12 +265,6 @@ def configure(conf):
     conf.check_tool('gcc')
     conf.check_tool('g++')
 
-    try:
-        conf.check_tool('winres')
-        conf.env['WINRCFLAGS'] = '-I' + os.path.abspath('pixmaps')
-        conf.env['xmms_icon'] = True
-    except Configure.ConfigurationError:
-        conf.env['xmms_icon'] = False
 
     if Options.options.target_platform:
         Options.platform = Options.options.target_platform
@@ -412,6 +406,17 @@ def configure(conf):
     else:
         conf.env['socket_impl'] = 'posix'
 
+    # platform does not support icons ...
+    conf.env['xmms_icon'] = False
+    # ... unless we target on windows
+    if Options.platform == 'win32':
+        try:
+            conf.check_tool('winres')
+            conf.env['WINRCFLAGS'] = '-I' + os.path.abspath('pixmaps')
+            conf.env['xmms_icon'] = True
+        except Configure.ConfigurationError:
+            pass
+
     # Glib is required by everyone, so check for it here and let them
     # assume its presence.
     conf.check_cfg(package='glib-2.0', atleast_version='2.8.0', uselib_store='glib2', args='--cflags --libs', mandatory=1)
-- 
1.6.4.4

From 38d186c95baf4b7bc6f1e9b25956b918d831856a Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <[email protected]>
Date: Mon, 19 Apr 2010 13:22:30 +0300
Subject: [PATCH 2/2] OTHER: adding one more my email to AUTHORS

Signed-off-by: Sergei Trofimovich <[email protected]>
---
 AUTHORS |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 2722bc0..f2ef9af 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -355,6 +355,7 @@ D: Various fixes
 N: Sergei Trofimovich
 E: [email protected]
 E: [email protected]
+E: [email protected]
 D: Various Cleanups
 
 N: Rémi Vanicat
-- 
1.6.4.4

Attachment: signature.asc
Description: PGP signature

--
_______________________________________________
Xmms2-devel mailing list
[email protected]
http://lists.xmms.se/cgi-bin/mailman/listinfo/xmms2-devel

Reply via email to