[Mono-bugs] [Bug 74528][Nor] New - NAnt fails to compile on Mono SVN

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 8 Apr 2005 15:42:55 -0400 (EDT)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mono@wirschell.nl.


--- shadow/74528	2005-04-08 15:42:55.000000000 -0400
+++ shadow/74528.tmp.3120	2005-04-08 15:42:55.000000000 -0400
@@ -0,0 +1,79 @@
+Bug#: 74528
+Product: Mono: Compilers
+Version: 1.1
+OS: Debian Woody
+OS Details: Debian Testing
+Status: NEW   
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mono@wirschell.nl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: NAnt fails to compile on Mono SVN
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+I'm unable to compile NAnt 0.85 rc2
+(http://nant.sourceforge.net/release/0.85-rc2/) and I'm convinced the
+compiler is to blame.
+Steps to reproduce the problem:
+1. Download and unpack NAnt
+2. Enter the nant-0.85-rc2 directory
+3. run 'make install prefix=<dest directory>'.
+Actual Results:
+$ make install prefix=/opt/nant-0.85
+mkdir -p bootstrap
+cp -R lib/ bootstrap/lib
+# Mono loads log4net before privatebinpath is set-up, so we need this in
+the same directory
+# as NAnt.exe
+cp lib/log4net.dll bootstrap
+cp src/NAnt.Console/App.config bootstrap/NAnt.exe.config
+mcs -target:exe -define:MONO -out:bootstrap/NAnt.exe -r:bootstrap/log4net.dll \
+-recurse:src/NAnt.Console/*.cs src/CommonAssemblyInfo.cs
+mcs -target:library -warn:0 -define:MONO -out:bootstrap/NAnt.Core.dll
+-r:lib/log4net.dll \
+-r:System.Web.dll -recurse:src/NAnt.Core/*.cs src/CommonAssemblyInfo.cs
+src/NAnt.Core/Element.cs(50) error CS1540: Cannot access protected member
+`NAnt.Core.Element.Location' via a qualifier of type `object'; the
+qualifier must be of type `NAnt.Core.Element' (or derived from it)
+Compilation failed: 1 error(s), 0 warnings
+make: *** [bootstrap/NAnt.Core.dll] Error 1
+Expected Results:
+Succesful compilation of the sources.
+How often does this happen? 
+Additional Information:
+Note that this happens with a freshly created mono pulled from SVN as of 4
+PM GMT+1. What the compiler is complaining about is that on line 50 of
+Element.cs an attribute is declared like so:
+        private Location _location = Location.UnknownLocation;
+This Location.UnknownLocation property is declared in the Location.cs file
+like so:
+        public static readonly Location UnknownLocation = new Location();
+As you can see, public, and thus, accessible. The only protected bit that I
+could find was this empty constructor:
+        private Location() {
+            Init(null, 0, 0);
+        }
+So far I've been unable to isolate this to a simple testcase.
+Someone else reported this bug to the NAnt people too. That bug is here: