CamilleMoon

Member
Hello, I was just wondering if anyone else has got this problem with compiling using ubuntu 18.04 lts? It happened recently not sure if i did something wrong, this is what im getting:

Error:
sudo make
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
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
/home/ServUO/Server/ScriptCompiler.cs(816,32): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
/home/ServUO/Server/ScriptCompiler.cs(817,32): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
/home/ServUO/Server/ScriptCompiler.cs(872,42): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
/home/ServUO/Server/ScriptCompiler.cs(885,53): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
Compilation failed: 4 error(s), 0 warnings
Makefile:35: recipe for target 'ServUO.exe' failed
make: *** [ServUO.exe] Error 1
 
Never mind I found a solution. For anyone else who has this problem all i did was add -langversion:experimental into the mcs compiler.

example:
mcs -langversion:experimental -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/*.c
 
Please help me, the problem isnt resolved, after this another error occurred when ServUO.sh start,

ServUO - [https://www.servuo.com] Version 0.5, Build 7154.3726 - Build on 08/03/2019 02:04:12 UTC - Release
Core: Running with arguments: -noconsole
Core: Optimizing for 3 64-bit processors
Core: Unix environment detected
Core: Compiled for MONO and running on 4.6.2 (Debian 4.6.2.7+dfsg-1)
RandomImpl: SimpleRandom (Software)
Core: Loading config...
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ Multis/Boats/BaseBoat.cs:
CS1644: Line 50: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 455: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 1908: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2100: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2269: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2515: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2709: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2733: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2735: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 3284: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 3284: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification

Scripts: One or more scripts failed to compile or no script files were found.
 
Got these errors when I did your fix up above . . . .

+ Multis/Boats/BaseBoat.cs:
CS1644: Line 50: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 496: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 1955: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2156: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2325: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2571: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2760: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2784: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 2786: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 3335: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
CS1644: Line 3335: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification
+ Services/Vendor Searching/VendorSearchMap.cs:
CS1644: Line 237: Feature `type pattern matching' cannot be used because it is not part of the C# 6.0 language specification
 
This starts to look like a mono version problem. I've a different code base but added a piece with pattern matching and it compiled fine. (without any -langversion settings, anywhere). The type pattern stuff seems to be c# 7.x (https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/is)

If I try to figure out what I have:

This command might vary on distribution and installed things:
yay -Qo `which mcs`
/usr/bin/mcs is owned by mono 6.0.0.334-1

These should work distribution independent:
mcs --version
Mono C# compiler version 6.0.0.0

mcs --help
Turbo C# compiler, Copyright 2001-2011 Novell, Inc., 2011-2016 Xamarin, Inc, 2016-2017 Microsoft Corp

mcs [options] source-files
<snip>
-langversion:TEXT Specifies language version: ISO-1, ISO-2, 3, 4, 5, 6, Default or Experimental
<snip>

mcs -langversion:error
error CS1617: Invalid -langversion option `error'. It must be `ISO-1', `ISO-2', Default, Latest or value in range 1 to 7.2
 
I did this:

sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt-get install mono-complete

and was able to get the make to start.
Post automatically merged:

To install the client binaries i had to do some extra wine work:

sudo dpkg --add-architecture i386
sudo apt-get -y install wget
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt-get update
sudo apt-get update
sudo apt install --install-recommends winehq-stable
wine --version
wine-4.0.2
Post automatically merged:

This was the server start dialog:

ServUO - [https://www.servuo.com] Version 0.5, Build 7241.39405 - Build on 10/29/2019 9:53:30 PM UTC - Release
Core: Running with arguments: -noconsole
Core: Optimizing for 2 64-bit processors
Core: Unix environment detected
Core: Compiled for MONO and running on 6.4.0.198 (tarball Tue Sep 24 01:21:28 UTC 2019)
RandomImpl: SimpleRandom (Software)
Core: Loading config...
Scripts: Compiling C# scripts...Finished with: 0 errors, 4 warnings

Some of my system details:
4.15.0-66-generic #75-Ubuntu
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
mono --version
Mono JIT compiler version 6.4.0.198 (tarball Tue Sep 24 01:21:28 UTC 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(610)
Suspend: hybrid
GC: sgen (concurrent by default)

[Honesty]: Generating...
[Honesty]: Felucca - Reticulating splines...done (47.72 seconds)
[Honesty]: Trammel - Reticulating splines...done (172.10 seconds)
[Honesty]: Creating 1,000 lost items...done (0.75 seconds)
[Honesty]: Generation completed in 220.57 seconds.

And then.....

22:13:05 Error:
22:13:05 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Server.Multis.HouseTeleporterTile.Initialize () [0x00005] in <fb3946eb99464be79ab1153a7ad87c18>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <285579f54af44a2ca048dad6be20e190>:0
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <285579f54af44a2ca048dad6be20e190>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) <0x7f14d05fe810 + 0x00040> in <285579f54af44a2ca048dad6be20e190>:0
at Server.ScriptCompiler.Invoke (System.String method) [0x00092] in <f8a8c64d5d334919ab36d454a0b44985>:0
at Server.Core.Main (System.String[] args) [0x00647] in <f8a8c64d5d334919ab36d454a0b44985>:0
22:13:05 Crash: Generating report...done
22:13:05 Crash: Backing up...done
22:13:05 Crash: Restarting...done
Killed


And just stuck in a restart loop..
 
Last edited:
And then found this post relating to older emulation scenarios:


So I applied that patch.

And... It started.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back