OpenRA Fails to run on FreeBSD

Discussion about the game and its default mods.
Post Reply
MP2E
Posts: 1
Joined: Fri Oct 21, 2011 6:57 pm

OpenRA Fails to run on FreeBSD

Post by MP2E »

I've compiled the latest OpenRA from git according to the guide in INSTALL and I've *nearly* gotten it to run, however, it fails upon loading the OpenGL part of Tao with this error:

Code: Select all

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Tao.OpenGl.Gl ---> System.PlatformNotSupportedException: FreeBSD: Unknown Unix platform - cannot load extensions. Please report a bug at http://taoframework.com
  at Tao.OpenGl.Gl.GetAddress &#40;System.String function&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at Tao.OpenGl.Gl.GetExtensionDelegate &#40;System.String name, System.Type signature&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at Tao.OpenGl.Gl.GetDelegate &#40;System.String name, System.Type signature&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at Tao.OpenGl.Gl.ReloadFunctions &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at Tao.OpenGl.Gl..cctor &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  --- End of inner exception stack trace ---
  at OpenRA.Renderer.SdlCommon.ErrorHandler.CheckGlError &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.SdlCommon.SdlGraphics.InitializeSdlGl &#40;System.Drawing.Size& size, WindowMode window, System.String&#91;&#93; requiredExtensions&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.Cg.GraphicsDevice..ctor &#40;Size size, WindowMode window&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.Cg.DeviceFactory.Create &#40;Size size, WindowMode windowMode&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Graphics.Renderer.CreateDevice &#40;System.Reflection.Assembly rendererDll, Int32 width, Int32 height, WindowMode window&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Graphics.Renderer.Initialize &#40;WindowMode windowMode&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Game.Initialize &#40;OpenRA.Arguments args&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Program.Run &#40;System.String&#91;&#93; args&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Program.Main &#40;System.String&#91;&#93; args&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
&#91;ERROR&#93; FATAL UNHANDLED EXCEPTION&#58; System.TypeInitializationException&#58; An exception was thrown by the type initializer for Tao.OpenGl.Gl ---> System.PlatformNotSupportedException&#58; FreeBSD&#58; Unknown Unix platform - cannot load extensions. Please report a bug at http&#58;//taoframework.com
  at Tao.OpenGl.Gl.GetAddress &#40;System.String function&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at Tao.OpenGl.Gl.GetExtensionDelegate &#40;System.String name, System.Type signature&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at Tao.OpenGl.Gl.GetDelegate &#40;System.String name, System.Type signature&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at Tao.OpenGl.Gl.ReloadFunctions &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at Tao.OpenGl.Gl..cctor &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  --- End of inner exception stack trace ---
  at OpenRA.Renderer.SdlCommon.ErrorHandler.CheckGlError &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.SdlCommon.SdlGraphics.InitializeSdlGl &#40;System.Drawing.Size& size, WindowMode window, System.String&#91;&#93; requiredExtensions&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.Cg.GraphicsDevice..ctor &#40;Size size, WindowMode window&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.Cg.DeviceFactory.Create &#40;Size size, WindowMode windowMode&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Graphics.Renderer.CreateDevice &#40;System.Reflection.Assembly rendererDll, Int32 width, Int32 height, WindowMode window&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Graphics.Renderer.Initialize &#40;WindowMode windowMode&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Game.Initialize &#40;OpenRA.Arguments args&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Program.Run &#40;System.String&#91;&#93; args&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Program.Main &#40;System.String&#91;&#93; args&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
Now, of course this is an issue that Tao needs to fix(not supporting FreeBSD, which should be rather trivial seeing as it's similar to Linux) but I find that the Cg renderer doesn't work either. Why does the Tao OpenGL library need to be loaded if the Cg renderer is enabled? Could a patch be added to "bypass" tao opengl loading when the cg renderer is used?(I suspect this will completely fix OpenRA on FreeBSD)

Thanks for your time!

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

The Tao OpenGL binding is used by both the Cg and GL(SL) renderers.

You probably want to hack Tao.OpenGL (it's on Github) so that it treats *BSD the same as Linux. There's no good reason why it shouldn't work then.

Post Reply