Mac Build Errors

Hi,
I've been trying to build the svn version on my mac with mono 1.2.6. I posted on the user forum about one error, but I've found a few, and felt they were better off in this forum, so I'm collating my problems here. I've been building using build.sh. Incidentally, where can I find the build.log? I'm a bit unfamiliar with mono/nant, so bear with me!

1)---------------------------------------

[nant] /Users/graham/code/libs/taoframework/examples/SdlExamples/SdlExamples.exe.build build
Buildfile: file:///Users/graham/code/libs/taoframework/examples/SdlExamples/SdlExam...
Target framework: Mono 2.0 Profile
Target(s) specified: build

build:

[echo] Build Directory is /Users/graham/code/libs/taoframework/examples/SdlExamples/bin/Release
[mkdir] Creating directory '/Users/graham/code/libs/taoframework/examples/SdlExamples/bin/Release'.
[csc] Compiling 7 files to '/Users/graham/code/libs/taoframework/examples/SdlExamples/bin/Release/SdlExamples.exe'.
[resgen] Read in 1 resources from '/Users/graham/code/libs/taoframework/examples/SdlExamples/SdlExamples.resx'
[resgen] Writing resource file... Done.
[csc] ** (/Library/Frameworks/Mono.framework/Versions/1.2.6/lib/mono/2.0/gmcs.exe:2364): WARNING **: The class Mono.WebBrowser.DOM.IElement could not be loaded, used in Mono.Mozilla, Version=0.1.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756
[csc] ** (/Library/Frameworks/Mono.framework/Versions/1.2.6/lib/mono/2.0/gmcs.exe:2364): WARNING **: The class Mono.WebBrowser.DOM.IElementCollection could not be loaded, used in Mono.Mozilla, Version=0.1.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756
[csc] Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
[csc] at <0x00000>
[csc] at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
[csc] at System.Reflection.Assembly.GetExportedTypes () [0x00000]
[csc] at Mono.CSharp.TypeManager.LoadAllImportedTypes () [0x00000]
[csc] at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000]
[csc] at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]

BUILD FAILED - 0 non-fatal error(s), 9 warning(s)

/Users/graham/code/libs/taoframework/examples/SdlExamples/SdlExamples.exe.build(14,10):
External Program Failed: /Library/Frameworks/Mono.framework/Versions/1.2.6/lib/mono/2.0/gmcs.exe (return code was 1)

2)---------------------------------------
(Found by disabling SDLExamples and building again. I tried to work around this by disabling the warning 1569, as I'd seen recommended elsewhere, but the compiler complains that it doesn't recognise the warning, which makes sense, as it's actually an error Smiling

[nant] /Users/graham/code/libs/taoframework/src/Tao.OpenGl/Tao.OpenGl.dll.build build
Buildfile: file:///Users/graham/code/libs/taoframework/src/Tao.OpenGl/Tao.OpenGl.dl...
Target framework: Mono 2.0 Profile
Target(s) specified: build

build:

[echo] Build Directory is /Users/graham/code/libs/taoframework/src/Tao.OpenGl/bin/Release
[mkdir] Creating directory '/Users/graham/code/libs/taoframework/src/Tao.OpenGl/bin/Release'.
[csc] Compiling 8 files to '/Users/graham/code/libs/taoframework/src/Tao.OpenGl/bin/Release/Tao.OpenGl.dll'.
[csc] error CS1569: Error generating XML documentation file `/Users/graham/code/libs/taoframework/src/Tao.OpenGl/bin/Release/Tao.OpenGl.xml' (`Operation is not supported.')
[csc] Compilation failed: 1 error(s), 0 warnings

BUILD FAILED - 0 non-fatal error(s), 1 warning(s)

/Users/graham/code/libs/taoframework/src/Tao.OpenGl/Tao.OpenGl.dll.build(14,10):
External Program Failed: /Library/Frameworks/Mono.framework/Versions/1.2.6/lib/mono/2.0/gmcs.exe (return code was 1)

Total time: 77.2 seconds.

BUILD FAILED

Nested build failed. Refer to build log for exact reason.

Total time: 97.4 seconds.

Thanks
Graham

Second error you've got

Second error you've got seems to be a general issue for Mono 1.2.6. Quite weird since previous versions and MS .NET don't complain about it. Workaround is to disable documentation for Tao.OpenGL (remove the doc="..." from Tao.OpenGL.dll.build).

Thanks. Although I thought

Thanks. Although I thought I'd tried that. Tried it again and the workaround worked.

Next problem I hit is with it trying to build Tao.Platform.Windows. I would assume this shouldn't be built for the mac build, so I've commented it out. If this is the case, this also needs fixed in svn.

After I tried that, I hit a problem building Tao.Platform.X11, which I'd hope isn't needed for the mac build. I'll disable it and see what breaks next Wink The error I get follows:

[nant] /Users/graham/code/libs/taoframework/src/Tao.Platform.X11/Tao.Platform.X11.dll.build build
Buildfile: file:///Users/graham/code/libs/taoframework/src/Tao.Platform.X11/Tao.Pla...
Target framework: Mono 2.0 Profile
Target(s) specified: build

build:

[echo] Build Directory is /Users/graham/code/libs/taoframework/src/Tao.Platform.X11/bin/Release
[mkdir] Creating directory '/Users/graham/code/libs/taoframework/src/Tao.Platform.X11/bin/Release'.
[copy] Copying 1 file to '/Users/graham/code/libs/taoframework/src/Tao.Platform.X11/bin/Release'.
[csc] Compiling 5 files to '/Users/graham/code/libs/taoframework/src/Tao.Platform.X11/bin/Release/Tao.Platform.X11.dll'.
[csc] ** (/Library/Frameworks/Mono.framework/Versions/1.2.6/lib/mono/2.0/gmcs.exe:13125): WARNING **: The class Mono.WebBrowser.DOM.IElement could not be loaded, used in Mono.Mozilla, Version=0.1.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756
[csc] ** (/Library/Frameworks/Mono.framework/Versions/1.2.6/lib/mono/2.0/gmcs.exe:13125): WARNING **: The class Mono.WebBrowser.DOM.IElementCollection could not be loaded, used in Mono.Mozilla, Version=0.1.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756
[csc] Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
[csc] at <0x00000>
[csc] at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
[csc] at System.Reflection.Assembly.GetExportedTypes () [0x00000]
[csc] at Mono.CSharp.TypeManager.LoadAllImportedTypes () [0x00000]
[csc] at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000]
[csc] at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]

BUILD FAILED - 0 non-fatal error(s), 9 warning(s)

/Users/graham/code/libs/taoframework/src/Tao.Platform.X11/Tao.Platform.X11.dll.build(15,10):
External Program Failed: /Library/Frameworks/Mono.framework/Versions/1.2.6/lib/mono/2.0/gmcs.exe (return code was 1)

Total time: 4 seconds.

Thanks.

Same problem with

Same problem with GlfwExamples. Disabled that. Same problem with examples/NateRobins and examples/RedBook, so have disabled both.

Next problem is that the NeHe examples rely on Tao.Platform.Windows. I'll disable that too, but it would obviously be better to be platform independent where possible (if indeed platform.windows is platform specific - I haven't verified, but it sounds like it is!)

I'll get back to building and disabling later, but that's plenty for now.

BTW, is anyone actually able to build this on the mac?

--graham

Tao.Platform.* are indeed

Tao.Platform.* are indeed platform specific libraries. However, they should build regardless of the underlying platform.

It seems that somewhere, somehow, an option is set to treat warning 1569 (or all warnings, even) as errors - and this breaks the build. However, I am not familiar enough with nant or Tao's build system, to make a guess where that option could be hidden.

Edit:
[csc] Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
Never seen that before, but it certainly looks like a gmcs bug.

------
OpenTK

There are defintely problems

There are defintely problems with the Mono handling of documentation for OpenGL. I can replicate the OpenGL issue with Mono on Windows. I am going to remove doc generation for OpenGL in SVN so this won't be an issue.

It seems the following line

It seems the following line in Properties/AssemblyInfo.cs causes the unhandled exception problems:
[assembly: CLSCompliant(true)]
Setting it to false or removing the line seems to fix the compile time problem in the case I tried. I'll try making the change across the board to see what happens.

Note that I'm new to c# and mono, so am not aware of any consequences of changing this.

Cheers

I created the following bug

I created the following bug for the mono compiler: https://bugzilla.novell.com/show_bug.cgi?id=358131

They seem to believe I'm missing an unmanaged dependency. Any idea what that might be?

Cheers,
g

Theme by La Boite a site | Powered by Drupal