Bug 12202

Summary: nant cannot compile boo, uses wrong path for /usr/share/NAnt/bin/NAnt.exe
Product: Mageia Reporter: Thomas Spuhler <thomas>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: dmorganec, pterjan
Version: Cauldron   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: nant-0.92-2.mga4 CVE:
Status comment:

Description Thomas Spuhler 2014-01-05 00:10:48 CET
Description of problem:
I am trying to build boo and get this error:
Cannot open assembly '/home/iurt/rpmbuild/BUILDROOT/nant-0.92-2.mga4.i386/usr/share/NAnt/bin/NAnt.exe': No such file or directory

correct path is /usr/share/NAnt/bin/NAnt.exe

Version-Release number of selected component (if applicable):
version from mageia3 (cauldron was moved to obsoletes

I am not quite sure, but this smells like a nant bug.


Steps to Reproduce:
1.checkout boo (mgarepo co boo)
2. go the SPEC and use bm -bil
3.


Reproducible: 

Steps to Reproduce:
Comment 1 Thierry Vignaud 2014-01-05 21:52:14 CET
I think this is what this morning's 0.92-3.mga4 fixed.

CC: (none) => dmorganec, pterjan

Comment 2 Pascal Terjan 2014-01-05 22:02:34 CET
Indeed

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 3 Thomas Spuhler 2014-01-05 22:25:50 CET
Yep, fixed.
What about: 
External Program Failed: /usr/lib/mono/4.0/dmcs.exe (return code was 2)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713768

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 4 Pascal Terjan 2014-01-05 22:29:56 CET
I think you need to add -t:mono-2.0 when calling nant.
Comment 5 Pascal Terjan 2014-01-05 22:33:28 CET
Or adding a patch like https://github.com/drslump/boo/commit/4902adbd5d5901c4e5603a16300fd01ab943907c to force mono-2.0 but I think passing -t:mono-2.0 is easier.
Comment 6 Thomas Spuhler 2014-01-06 19:49:36 CET
this didn't help.
The actual problem is:
Cannot open assembly '/usr/lib/mono/4.0/dmcs.exe': No such file or directory

This file does exist in mono of mga3, but it doesn't in cauldron
There is a bug report in ddebian:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708808
Comment 7 Pascal Terjan 2014-01-06 21:09:06 CET
It shouldn't use anything in 4.0 if you build for 2.0 and it doesn't here.

[pterjan@chopin boo]$ svn diff
Index: SOURCES/boo-0.9.4.9-warnings.patch
===================================================================
--- SOURCES/boo-0.9.4.9-warnings.patch	(revision 0)
+++ SOURCES/boo-0.9.4.9-warnings.patch	(working copy)
@@ -0,0 +1,21 @@
+--- boo-0.9.4.9/default.build	2014-01-02 10:33:34.616725528 +0000
++++ default.build	2014-01-02 10:33:28.236573328 +0000
+@@ -503,6 +503,9 @@
+ 			debug="${debug}"
+ 			optimize="${optimize}"
+ 			define="${csc.define}">
++			<nowarn>
++				<warning number="219,612,618,1635,649,414"/>
++			</nowarn>
+ 			
+ 			<sources basedir="src/Boo.Lang.Compiler">
+ 				<include name="**/*.cs" />
+@@ -747,7 +750,7 @@
+ 				<include name="${build.dir}/Boo.Lang.Compiler.dll" />
+ 			</references>
+ 			<nowarn>
+-				<warning number="618,219,162" />
++				<warning number="618,219,162,414" />
+ 			</nowarn>
+ 			<arg line="/keyfile:${keyfile.path}" unless="${keyfile.path == ''}" />
+ 		</csc>
Index: SPECS/boo.spec
===================================================================
--- SPECS/boo.spec	(revision 563940)
+++ SPECS/boo.spec	(working copy)
@@ -1,12 +1,13 @@
 Summary: A wrist friendly language for the CLI/Mono
 Name: boo
 Version: 0.9.4.9
-Release: %mkrel 3
+Release: %mkrel 4
 License: BSD
 Group: Development/Other
 Source0: http://dist.codehaus.org/boo/distributions/%{name}-%{version}-src.tar.bz2
 Patch1: boo-0.7.8.2559-gtksourceview2.patch
 Patch2: boo-0.7.9.2659-pkgconfig.patch
+Patch3: boo-0.9.4.9-warnings.patch
 URL: http://boo.codehaus.org/
 Requires: mono
 BuildRequires: nant
@@ -35,14 +36,13 @@
 This is a Nant task for building boo sources.
 %prep
 %setup -q
-%patch1 -p1
-%patch2 -p1
+%apply_patches
 
 # fix end-of-line encoding
 perl -pi -e 's/\r//' $(find examples/ -type f)
 
 %build
-nant -nologo -D:install.prefix=%{_prefix}
+nant -nologo -D:install.prefix=%{_prefix} -t:mono-2.0
 
 %install
 rm -rf %{buildroot}
Comment 8 Pascal Terjan 2014-01-06 21:17:19 CET
I have added the upstream patch allowing to build things with nant for more recent targets, but this triggers more warnings and errors in boo that you will have to fix.
Comment 9 Thomas Spuhler 2014-01-08 22:14:59 CET
Fixed with nant-0.92-4.mga
boo now builds

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED