[SOLVED] Can't compile on Debian/Linux

timginter

Well-Known Member
Jun 21, 2016
60
2
I give up.

I updated ServUO lately and now can't compile on my linux server. There are no problems with compiling using Visual Studio and running on Windows, but if I copy the same files to a Debian host and 'make' I first get this error:
Code:
/servuo/server/ServUO.sh: 2: /servuo/server/ServUO.sh: mono64: not found
Makefile:21: recipe for target 'run' failed
make: *** [run] Error 127
[email protected]:~/servuo/server#
I edited the ServUO.sh file and changed 'mono64' to 'mono' - core compiled but scripts don't:
Code:
ServUO - [https://www.servuo.com] Version 0.5, Build 6538.8304
Core: Running with arguments: -noconsole
Core: Optimizing for 2 64-bit processors
Core: Unix environment detected
RandomImpl: SimpleRandom (Software)
Core: Loading config...
Scripts: Compiling C# scripts...ScriptCompiler: : Scripts/Services/Harvest/HarvestSystem.cs(13,28): (Location of the symbol related to previous warning)
Finished with: 0 errors, 8 warnings
Warnings:
+ Custom/GraphicBasedHarvestSystems/LumberHarvest/LumberHarvest.cs:
    CS0108: Line 72: `Server.Engines.Harvest.UltimaLiveLumberjacking.Configure()' hides inherited member `Server.Engines.Harvest.HarvestSystem.Configure()'. Use the new keyword if hiding was intended
+ Custom/CustomCharCreation.cs:
    CS0162: Line 269: Unreachable code detected
+ Services/Monster Stealing/Core/StealingHandler.cs:
    CS1717: Line 94: Assignment made to same variable; did you mean to assign something else?
+ Services/Monster Stealing/Items/GemOfSalvation.cs:
    CS0472: Line 49: The result of comparing value type `System.DateTime' with null is always `true'
+ Services/Monster Stealing/Items/ManaDraught.cs:
    CS0472: Line 30: The result of comparing value type `System.DateTime' with null is always `true'
    CS0472: Line 70: The result of comparing value type `System.DateTime' with null is always `true'
+ Services/Monster Stealing/Items/SeedOflife.cs:
    CS0472: Line 44: The result of comparing value type `System.DateTime' with null is always `true'
    CS0472: Line 85: The result of comparing value type `System.DateTime' with null is always `true'
+ Abilities/Block.cs:
    CS0649: Line 132: Field `Server.Items.Block.BlockInfo.m_Target' is never assigned to, and will always have its default value `null'
+ Services/Expansions/High Seas/Multis/ShipTracking.cs:
    CS0649: Line 104: Field `Server.Multis.BoatTrackingArrow.m_Boat' is never assigned to, and will always have its default value `null'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
I have the latest version of mono installed.

I tried editing ScriptCompiler.cs as per a few different topics but didn't work either.

I'll be really grateful for any help, none of this happened on the previous version of ServUO (Pub 54) and I'm stuck.
 
Last edited:

timginter

Well-Known Member
Jun 21, 2016
60
2
My friggin' god... Finally found the bastard.

"CS0108: Line 72: `Server.Engines.Harvest.UltimaLiveLumberjacking.Configure()' hides inherited member `Server.Engines.Harvest.HarvestSystem.Configure()'.Use the new keyword if hiding was intended" - that was the culprit. .net was fine with it, both .net and mono threw it as an error, but with mono that prevented scripts from compiling. FINALLY!
 

Ixtabay

Well-Known Member
Mar 30, 2015
65
13
Spring, TX USA
I wanted to drop this here in case anyone is struggling to compile with the latest mono and Debian 9.

First, install a Debian 9 (Stretch) Minimal Server using this guide:
Code:
https://www.howtoforge.com/tutorial/debian-minimal-server/
Switch to super user
Code:
su
Install the basics
Code:
apt-get ssh-server install -y git autoconf libtool automake build-essential gettext cmake xclip unzip unixodbc screen htop libpng-dev zlib1g-dev mlocate htop dirmngr
Code:
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian stretch main" | tee /etc/apt/sources.list.d/mono-official.list
apt-get update
apt-get install mono-complete
Create a link for mono64 so compiler doesn't complain.
Code:
ln -s /usr/bin/mono /usr/bin/mono64
Edited ScriptCompiler.rs
Find
Code:
CompilerResults results = provider.CompileAssemblyFromFile( parms, "" );
Replace with
Code:
CompilerResults results = provider.CompileAssemblyFromFile( parms, files );
Copy these files from the Ultima Online directory on your PC to your server data directory specified in /Config/DataPath.cfg
Code:
Multi.idx
Multi.mul
VerData.mul
TileData.mul
Map*.mul or Map*LegacyMUL.uop
StaIdx*.mul
Statics*.mul
MapDif*.mul
MapDifL*.mul
StaDif*.mul
StaDifL*.mul
StaDifI*.mul
leave su
Code:
exit
now compile
Code:
make
 
  • Like
Reactions: timginter

toeshred

New Member
Sep 7, 2018
1
0
Ixtabay,

Thank you so much for the guide. I'm a new user here, and already planned on using debian for my server anyway, so finding your post here was just perfect timing.