Nerun

Member
Hi there,

I am trying to compile ServUO 57.3 on Linux but no success. My system:
  • Linux Mint 21.2
  • Mono 6.8.0.105
  • Dotnet 7.0.110
  • ServUO 57.3
Using "make" works, a file "ServUO.exe" is created, but it doesn't run. Output is below.

ServUO pub 58 compile whitout issues, but it's a work in progress and is just a branch right now.

fail to compile:
$ make -j12
mcs -target:library -out:`pwd`/Ultima.dll -r:System.Drawing.dll -nowarn:0618,0219,0414,1635 -d:MONO -d:ServUO -d:NEWTIMERS -nologo -optimize -unsafe -recurse:`pwd`/Ultima/*.cs
rm -f ServUO.sh
rm -f ServUO.exe
rm -f ServUO.exe.mdb
rm -f Ultima.dll
rm -f Ultima.dll.mdb
rm -f *.bin
mcs -win32icon:`pwd`/Server/servuo.ico -r:`pwd`/Ultima.dll,System.Drawing.dll -nowarn:0618,0219,0414,1635 -target:exe -out:`pwd`/ServUO.exe -d:MONO -d:ServUO -d:NEWTIMERS -nologo -optimize -unsafe -recurse:`pwd`/Server/*.cs
echo "#!/bin/sh" > `pwd`/ServUO.sh
echo "mono `pwd`/ServUO.exe" >> `pwd`/ServUO.sh
chmod a+x `pwd`/ServUO.sh
sed -i.bak -e 's/<!--//g; s/-->//g' ServUO.exe.config
`pwd`/ServUO.sh
ServUO - [https://www.servuo.com] Version 0.5, Build 8623.23592 - Build on 11/08/2023 13:06:24 UTC - Release
Core: Running with arguments: -noconsole
Core: Optimizing for 12 64-bit processors
Core: Unix environment detected
Core: Compiled for MONO and running on 6.8.0.105 (Debian 6.8.0.105+dfsg-3.2 Wed Jun 30 05:34:49 UTC 2021)
RandomImpl: SimpleRandom (Software)
Core: Loading config...
Scripts: Compiling C# scripts...Error:
System.Exception: Compiler failed to produce the assembly. Output: ''
  at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x0035e] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0
  at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00047] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0
  at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00006] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0
  at Server.ScriptCompiler.CompileCSScripts (System.Boolean debug, System.Boolean cache, System.Reflection.Assembly& assembly) [0x001d9] in <70c9aea6376a483a8d29a26fde83c95f>:0
  at Server.ScriptCompiler.Compile (System.Boolean debug, System.Boolean cache) [0x00034] in <70c9aea6376a483a8d29a26fde83c95f>:0
  at Server.Core.Main (System.String[] args) [0x00624] in <70c9aea6376a483a8d29a26fde83c95f>:0
This exception is fatal, press return to exit

Killed
make: *** [Makefile:19: run] Erro 137

EDIT: this tutorial is not working too.
 
Last edited:
I read the above link carefully.
but I also got the same error.

My System:
Ubuntu 22.0.4.1 and 23.04
mono 6.8.0.105
ServUO Pub57 branch

What Should I Do?
 
Last edited:
ServUO R57 tag 57.2 seems to work fine!
So Linux and macOS users may use this version.
I think the new ScriptCompiler version has some issues.
 
We are on the case.. well Pyro is.. was yesterday for a couple of hours.

We worked on it yesterday and we've found Mono doesn't support C# 7.3, only 7.2.

Line 71 in Server/ScriptCompiler.cs

Change the version for 7.2 and try compiling it.

If you use anything above 7.2 in your coding, like
C#:
if (myVar is null)
    return;

It won't go through.

We found that csc compiler could compile and run because it's supporting C# 7.3 but nobody know yet how to use it with the script compiler of ServUo.

More to come.. I hope!
 
dotnet build is not exactly the same, one uses net and the other uses mono.

7.2 works or experimental, which is almost 7.3
 
hey guys, long time no see.
I've checked mono git, but it seems like suspended since 2021?
and it doesn't support 4.8 version of .net framework.
as YUKIMIMI said like that, it requires to run with 57.2 which is compile with 4.7 of .net framework.

GL!
 
57.3 also compiles to 7.2

And if you set the version like mentioned above, you may get some of the C# 7.3 features, but not all
 
  • Linux Mint 21.3
  • Mono 6.8.0.105
  • Dotnet 8.0.301
  • ServUO 57.3
Yes, with 7.2 change, the pub 57.3 compile scripts without errors. Also a note: pub 57.2 uses language 7.1.

But, after login into server, World Building, then use [admin gump to Shutdown & Restart (with save), i got an infinite looping of this:

Code:
Error:
02:40:45 System.IO.IOException: Invalid handle to path ".../ServUO-57.2/[Unknown]"
  at System.IO.FileStream.ReadData (System.Runtime.InteropServices.SafeHandle safeHandle, System.Byte[] buf, System.Int32 offset, System.Int32 count) [0x00036] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.IO.FileStream.ReadInternal (System.Byte[] dest, System.Int32 offset, System.Int32 count) [0x0002c] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.IO.FileStream.Read (System.Byte[] array, System.Int32 offset, System.Int32 count) [0x000b9] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.IO.StreamReader.ReadBuffer () [0x000bf] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.IO.StreamReader.Read () [0x0002e] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.TermInfoDriver.GetCursorPosition () [0x00051] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.TermInfoDriver.ReadUntilConditionInternal (System.Boolean haltOnNewLine) [0x00011] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.TermInfoDriver.ReadLine () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.ConsoleDriver.ReadLine () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.Console.ReadLine () [0x00019] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_delegate_end_invoke(object,intptr)
  at (wrapper delegate-end-invoke) System.Func`1[System.String].end_invoke_TResult__this___IAsyncResult(System.IAsyncResult)
  at Server.Misc.ServerConsole.<PollCommands>m__2 (System.IAsyncResult r) [0x00000] in <1ce648fb8fe045968b9718600f627556>:0
  at (wrapper managed-to-native) System.Runtime.Remoting.Messaging.AsyncResult.Invoke(System.Runtime.Remoting.Messaging.AsyncResult)
  at System.Runtime.Remoting.Messaging.AsyncResult.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
02:40:45 Crash: Generating report...done
02:40:45 Crash: Backing up...done
02:40:45 Crash: Restarting...done

BUT, if i just Shutdown (with Save), then mono ServUO.exe in terminal, it works!​

 
Last edited:
thats because the restart causes it to lose the handle on the console. 57.3 should have had a working workaround to that by opening a new terminal and all that .. :D

Also do you have libz installed?
 
Same for me for the latest:


Error:
System.Exception: Compiler failed to produce the assembly. Output: ''
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x0035e] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00047] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00006] in <a85c1a570f9a4f9f9c3d2cfa5504e34f>:0
at Server.ScriptCompiler.CompileCSScripts (System.Boolean debug, System.Boolean cache, System.Reflection.Assembly& assembly) [0x001d9] in <1d670c05a2db403daa3909c3fb9a2503>:0
at Server.ScriptCompiler.Compile (System.Boolean debug, System.Boolean cache) [0x00034] in <1d670c05a2db403daa3909c3fb9a2503>:0
at Server.Core.Main (System.String[] args) [0x00624] in <1d670c05a2db403daa3909c3fb9a2503>:0


I'm on UBUNTU 20
 
Last edited:
WORKAROUND AS MENTIONED BY @Korasec WORKS FINE ON MONO:

"Line 71 in Server/ScriptCompiler.cs, change the version for 7.2 and try compiling it"
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back