Troubleshooting
From OpenSimulator
This is the beginnings of a troubleshooting page. This advice is geared towards troubleshooting compiling and running OpenSim on a variety of systems.
CentOS 5
If you see this error:
Failed generating terrain map: System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: gdiplus.dll
First, check to make sure that libgdiplus.so is known to the dynamic linker:
/sbin/ldconfig -p | grep libgdiplus
If nothing is found, make sure that the directory libgdiplus.so exists in is either in your LD_LIBRARY_PATH environment variable or listed in a *.conf file (e.g., gdiplus.conf) in /etc/ld.so.conf.d/. Then run ldconfig to update the cache. Then it should be able to find the library.
You may still have the above error, however, since libgdiplus also depends on other dynamic libraries, and if they fail to load, libgdiplus will fail. To test for this, run OpenSim with debugging information turned on:
MONO_LOG_LEVEL=debug mono OpenSim.exe
It may show errors loading other libraries, like libexif.so.9. In that case, linking to an existing version of the offending library may work:
ln -s libexif.so.12 libexif.so.9
(Is there a cleaner solution than this?)
Debian 4.0r0
I will go through each of the steps to install Opensim intentionally incorrectly executing each item. The first thing is to cd into your favorite directory and SVN the latest source.
Before we begin, we need to prep the system. Your sources file [/etc/apt/sources.list] must include 'unstable' entries, and you should apt-get dist-upgrade your system after doing so to catch your system up to date with all the new files. In my experience, if you do not use 'unstable' then the packages are not up to date enough, and you run into version issues, which lead to the two error messages seen below which appear at the very end of the process when you run OpenSim.exe;
Failed generating terrain map: System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: gdiplus.dll
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&) at System.Drawing.GDIPlus..cctor () [0x00000] --- End of inner exception stack trace --- at <0x00000> <unknown method> at System.Drawing.Bitmap..ctor (System.String filename, Boolean useIcm) [0x00000] at System.Drawing.Bitmap..ctor (System.String filename) [0x00000] at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (string) at OpenSim.Region.Terrain.TerrainEngine.ExportJpegImage (System.String gradientmap) [0x00000]
adding asset 845d07f0-2146-4708-964f-56311f0185c7
And
Failed generating terrain map: System.DllNotFoundException: ./libopenjpeg-libsl-2.1.2.0.so
at (wrapper managed-to-native) OpenJPEGNet.OpenJPEG:LibslAllocDecoded (OpenJPEGNet.OpenJPEG/LibslImage&) at OpenJPEGNet.OpenJPEG.Encode (System.Byte[] decoded, Int32 width, Int32 height, Int32 components, Boolean lossless) [0x00000] at OpenJPEGNet.OpenJPEG.EncodeFromImage (System.Drawing.Bitmap bitmap, Boolean lossless) [0x00000] at OpenSim.Region.Terrain.TerrainEngine.ExportJpegImage (System.String gradientmap) [0x00000]
adding asset e8df7745-d263-49b0-ab46-7055e71a5094
And then we begin.
# svn co http://opensimulator.org/svn/opensim/trunk opensim
-bash: svn: command not found
Ok this ones a gimme. If you don't know why your getting this message, just go home, there is no hope for you. This message clearly means you do not have Subversion installed. To rectify this:
# apt-get install subversion
Now that you have subversion, run the command again to get yourself a copy of the source.
The next step says to cd into your opensim.new/trunk directory wherever you put it, and run the following:
# mono bin/Prebuild.exe /target nant
If you see:
-bash: mono: command not found
Again, this one is a gimme. This means you do not have mono installed. Mono does not come installed on the base system and must be retrieved via apt:
# apt-get install mono
Spoiler!!: If you apt-get install mono nant mono-gmcs mono-mjs libmono-microsoft8.0-cil libmono-system-runtime2.0-cil Then you won't encounter the errors described below on this page, and can cruise through the mono, and nant build process without incident.
Now that we have mono we can try running that nifty mono command again:
# mono bin/Prebuild.exe /target nant
If you see:
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/usr/lib/mono/[1.0/2.0]/mscorlib.dll' directory.
This indicates that you are missing one of the mscor libs that comes with nant. This is easily solved by getting nant which comes with both versions 1.0 and 2.0 of the required lib.
# apt-get install nant
Fixes this. Rerun the mono command. At this stage we have successfully created a NAnt build file. (Yay!) The next step is # nant -buildfile:OpenSim.build
Which very likely will fail if you've been following these steps, with the following error:
[nant] /usr/src/opensim.new/trunk/OpenSim/Framework/Console/OpenSim.Framework.Console.dll.build build
Buildfile: file:///usr/src/opensim.new/trunk/OpenSim/Framework/Console/OpenSim.Framework.Console.dll.build Target framework: Mono 2.0 Profile Target(s) specified: build build: [echo] Build Directory is /usr/src/opensim.new/trunk/OpenSim/Framework/Console/bin/Release [csc] Compiling 4 files to '/usr/src/opensim.new/trunk/OpenSim/Framework/Console/bin/Release/OpenSim.Framework.Console.dll'. [csc] Cannot open assembly /usr/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe. BUILD FAILED - 0 non-fatal error(s), 1 warning(s) /usr/src/opensim.new/trunk/OpenSim/Framework/Console/OpenSim.Framework.Console.dll.build(10,10): External Program Failed: /usr/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe (return code was 2) Total time: 0.2 seconds.
BUILD FAILED
This is quickly fixed by retrieving mono-gmcs.
# apt-get install mono-gmcs
The next error that I come across is this one:
[nant] /usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/OpenSim.Region.Terrain.BasicTerrain.dll.build build
Buildfile: file:///usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/OpenSim.Region.Terrain.BasicTerrain.dll.build Target framework: Mono 2.0 Profile Target(s) specified: build build: [echo] Build Directory is /usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/bin/Release [mkdir] Creating directory '/usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/bin/Release'. [csc] Compiling 28 files to '/usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/bin/Release/OpenSim.Region.Terrain.BasicTerrain.dll'. [csc] /usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs(33,17): error CS0234: The type or namespace name `JScript' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? [csc] /usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs(33,1): error CS0246: The type or namespace name `Microsoft.JScript' could not be found. Are you missing a using directive or an assembly reference? [csc] /usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs(33,17): error CS0234: The type or namespace name `JScript' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? [csc] /usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs(33,1): error CS0246: The type or namespace name `Microsoft.JScript' could not be found. Are you missing a using directive or an assembly reference? [csc] Compilation failed: 4 error(s), 0 warnings BUILD FAILED - 0 non-fatal error(s), 4 warning(s) /usr/src/opensim.new/trunk/OpenSim/Region/Terrain.BasicTerrain/OpenSim.Region.Terrain.BasicTerrain.dll.build(10,10): External Program Failed: /usr/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe (return code was 1) Total time: 0.9 seconds.
BUILD FAILED
Note that it says Jscript over and over again. Hint perhaps?
# apt-get install mono-mjs libmono-microsoft8.0-cil
The next error encountered is:
[nant] /usr/src/opensim.new/trunk/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build build
Buildfile: file:///usr/src/opensim.new/trunk/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build Target framework: Mono 2.0 Profile Target(s) specified: build build: [echo] Build Directory is /usr/src/opensim.new/trunk/OpenSim/Region/Communications/OGS1/bin/Release [mkdir] Creating directory '/usr/src/opensim.new/trunk/OpenSim/Region/Communications/OGS1/bin/Release'. [csc] Compiling 6 files to '/usr/src/opensim.new/trunk/OpenSim/Region/Communications/OGS1/bin/Release/OpenSim.Region.Communications.OGS1.dll'. [csc] /usr/src/opensim.new/trunk/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs(7,40): error CS0234: The type or namespace name `Tcp' does not exist in the namespace `System.Runtime.Remoting.Channels'. Are you missing an assembly reference? [csc] /usr/src/opensim.new/trunk/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs(7,1): error CS0246: The type or namespace name `Channels.Tcp' could not be found. Are you missing a using directive or an assembly reference? [csc] Compilation failed: 2 error(s), 0 warnings BUILD FAILED - 0 non-fatal error(s), 2 warning(s) /usr/src/opensim.new/trunk/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build(10,10): External Program Failed: /usr/lib/pkgconfig/../../lib/mono/2.0/gmcs.exe (return code was 1) Total time: 0.7 seconds.
BUILD FAILED
This one is taken care of with a quick
# apt-get install libmono-system-runtime2.0-cil
After this final install, re-running the specified nant command should build successfully. <<BUILD SUCCEEDED>> Build time is only 24~ seconds on a 2Ghz Intel Core 2 Duo Macbook with 2GB Ram, you can approximate for your own systems.
Using the mono "Linux Installer for x86 (All distributions)" stable installer on a base Debian system.
If you start with a base Debian system as we did at the top of the page, but instead of using the apt version of mono you would rather use the up-to-date installer from their website, then these are some of the issues you may encounter.
After getting the .bin file from http://www.mono-project.com/Downloads, and executing it as per it's instructions, upon finishing, you may find that if you try to run `mono --version` you are presented with this friendly message:
mono: error while loading shared libraries: libgthread-2.0.so.0: cannot open shared object file: No such file or directory
This one means you need to install libglib2.0-0.
# apt-get install libglib2.0-0
If you retry your `mono --version` you should see the following, perhaps with a more recent version number.
- mono --version
Mono JIT compiler version 1.2.5 (tarball) Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: normal Architecture: x86 Disabled: none
At this stage, trying to run the mono command will work, but trying to run NAnt will not.
BUILD FAILED
The current runtime framework 'mono-2.0' is not correctly configured in the NAnt configuration file.
Unable to locate 'mono' module using pkg-config. Download the Mono development packages from http://www.mono-project.com/downloads/.
For more information regarding the cause of the build failure, run the build again in debug mode.
Try 'nant -help' for more information
This one seems to be fixed by retrieving the apt version of nant.
# apt-get install nant
It should now build without incident.
If you run your Opensim.exe (with mono, duh) and you get a funky error message, like the two seen at the very top of this page, then you need to upgrade your system to 'unstable' and repeat the entire process.
Information will be added here as it is encountered.