TheLastRar / CLR-DEV9

A Dev9 Plugin for PCSX2 Written in C#
49 stars 9 forks source link

Compile from Linux for Linux? #5

Open Fothsid opened 6 years ago

TheLastRar commented 6 years ago

It must be having issues tying to load/create its config file.

Retry with latest commit, I've added logging messages to the config loader

Fothsid commented 6 years ago

I'm sorry, I was kinda dumb and I overwrote wrong CLR_DEV9_CORE.dll file. Anyways, here's log: DEV9_CLR.log

TheLastRar commented 6 years ago

I've uploaded a build with more logging

I've also did some local testing, CoreCLR needs the x86 version of libssl, otherwise it will crash in the same spot. this supports multiarch so you can install it with apt-get.

Fothsid commented 6 years ago

I have lib32-openssl already installed xD (I use Arch Linux)

Here's log: DEV9_CLR.log

TheLastRar commented 6 years ago

Install lib32-openssl-1.0 using pacman

Edit: CoreCLR does not yet support 1.1

Fothsid commented 6 years ago

WOW. GAME NOW STARTS. I've tried to join obsrv.org server for Resident Evil Outbreak File 1/2, but it hangs on "Now Loading" screen.

TheLastRar commented 6 years ago

Open PCSX2\inis\CLR_DEV9.ini

change <AutoDNS1>true</AutoDNS1> to <AutoDNS1>false</AutoDNS1> Find the line <DNS1>0.0.0.0</DNS1> and replace "0.0.0.0" with the Outbreak DNS server's IP

The core version of the plugin lacks the config menu, hence having to edit the file by hand.

Fothsid commented 6 years ago

Nope. Still hangs on "Now Loading" screen

edit: even without editing config file, i have customized DNS using Sony's Network Access Disc, so there is no so much changes.

Fothsid commented 6 years ago

Here's log: DEV9_CLR.log

Fothsid commented 6 years ago

I tried once again with no settings changed or something, and now it suddenly WORKS!

edit: it seems that it hangs randomly. I tried to start game once again and it again hanged on "Now Loading" screen

TheLastRar commented 6 years ago

There seems to be a threading bug / race condition in the latest version which I did not catch in testing, I'm working on a fix.

TheLastRar commented 6 years ago

Should be fixed with the latest commits

Fothsid commented 6 years ago

Wow, now it works on the first try. Thank you very much.

Fothsid commented 6 years ago

I tested it a bit and got a crash mid-game. Log is way too big (32 MBs), so i'm posting last 1000 lines https://pastebin.com/Uj6FuLE1

edit: this might have been because of the game. it loves to crash when certain chararcter uses certain ad-lib in certain locations.

TheLastRar commented 6 years ago

I'm not seeing anything obvious in the logs, I'll try testing with another game to see if I can reproduce it.

Fothsid commented 6 years ago

I played just ok for about 2 hours now, but it crashed again now.

TheLastRar commented 6 years ago

I have reproduce the crash with another game (in an Arch Linux VM), so it's not specific to outbreak, I will try to see if I can find the cause.

Fothsid commented 6 years ago

HDD emulation seems to be OK, I'm installing Outbreak to the emulated HDD now.

edit: However, plugin adds backslash to the name of HDD file from config file.

Fothsid commented 6 years ago

Yup, crashes seem to be absolutely random.

ghost commented 6 years ago

Can someone compile it for linux and give me the binaries? No idea how to compile it.

yerbestpal commented 6 years ago

How is progress with this? I found compiling to lead me down a rabbit hole of installing Windows development software, non of which actually succeeded in compiling.

yerbestpal commented 6 years ago

Also, using the attached files on this post causes PCSX2 to die when opening the plugins/BIOS selection screen on Kubuntu.

I should mention that using said attached files eventually worked on Opensuse, though I'm really not sure why.

TheLastRar commented 6 years ago

You should be able to build the mono based plugin without vs code or any other Microsoft tool. The .net core would require the .net core SDK (2.1 or newer) to be installed.

What messages where your getting while building?

Regarding PCSX2 crashing in the plugins/BIOS selection screen, I suspect that there may be missing dependencies, since it functions correctly on lubuntu and I don't think any differences between that and Kubuntu would be significant enough to cause issues.

The plugin should print any exceptions mono encounters into the console, however I believe pcsx2 eats log messages when you open the plugins selection screen.

yerbestpal commented 6 years ago

I have installed .NET Core SDK 2.1

The system doesn't seem to recognise the command msbuild, that's why I have been using VSCode. It gives the the error Command 'msbuild' not found.

This is a screenshot of what is going on on VSCode: forgithub

Despite installing the C# extension, it still says there are unresolved dependencies. Hitting restore does nothing. As for dependencies, do you mean PCSX dependencies or your plugins dependencies?

TheLastRar commented 6 years ago

I was referring to plugin dependencies, the prebuilt plugin in my post needs mono (on ubuntu the package is mono-complete) installed, as well x86 versions of it's dependencies as noted in my post.

You can ignore the unresolved dependencies message, that is referring to the DllExport package which is only used on windows, I couldn't figure out how to stop vscode from restoring it on linux,

I'm assuming your running Build CLR_DEV9 or Build CLR_DEV9_LINUX_MONO, these commands use the version of msbuild provided by mono instead of the one provided by .Net Core, installing mono-complete would allow you to build these projects.

If you want to build the .Net Core version, use Build CLR_DEV9_CORE and Build CLR_DEV9_LINUX instead.

yerbestpal commented 6 years ago

Okay, so running Build CLR_DEV9_LINUX successfully produced the file 'CLR_DEV9_lx_wrapper 0.0.0 [libclrdev9]'. When I place this in the plugins folder, I see this: forgithub2

Edit: This could be because the original files I used (again, referring to your uploaded files on the PCSX2 forums) came with files to be placed in /usr/lib (libgdiplus.so, libmono-llvm.a, etc). These didn't accompany the file I just compiled.

TheLastRar commented 6 years ago

That is because your building the .Net core version, not the Mono version that I uploaded (yes there are two different Linux ports)

The folder mono_i386 provided in the upload is intended to be copied to the same directory the plugin is. the reason for this is to allow the plugin's version of mono to run alongside the system install of mono. It shouldn't be copied into usr/lib. I suppose the post isn't sufficiently clear on this.

The .Net core version you are building requires you to provide a build of CoreCLR and CoreFX for x86 (as these aren't built by MS yet, you will have to build these yourself, I've provided some guidance here https://github.com/TheLastRar/CLR-DEV9/blob/master/CLR_DEV9_LINUX/LinuxBuild.md#coreclr--corefx).

You would also need to copy the CLR_DEV9_CORE.dll from CLR_DEV9/bin/<Release|Debug>/netcoreapp2.1/ into PCSX2's inis folder (Typically ~/.config/PCSX2/inis/)

yerbestpal commented 6 years ago

I would prefer to build using the mono method, though despite having installed mono-complete, msbuild still doesn't work.

Edit: I managed to install msbuild by installing mono-devel, as per the instructions here. Now it runs, though the build fails:

~/CLR-DEV9$ msbuild CLR_DEV9.sln /t:CLR_DEV9 /p:Configuration="DEBUG" /p:Platform="Any CPU" /p:DefineConstants=SKIP_DLLEXPORT /property:GenerateFullPaths=true
Microsoft (R) Build Engine version 15.1.8.0 ( Wed Sep  5 19:27:37 UTC 2018) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 08/10/2018 19:05:04.
Project "/home/ross/CLR-DEV9/CLR_DEV9.sln" on node 1 (CLR_DEV9 target(s)).
ValidateSolutionConfiguration:                                                                                                                                                                                                              
  Building solution configuration "DEBUG|Any CPU".
ValidateProjects:
  The project "CLR_DEV9_LINUX" is not selected for building in solution configuration "Debug|Any CPU".
  The project "CLR_EMBED_TEST" is not selected for building in solution configuration "Debug|Any CPU".
  The project "CLR_DEV9_LINUX_MONO" is not selected for building in solution configuration "Debug|Any CPU".
  The project "MonoTestEmbed" is not selected for building in solution configuration "Debug|Any CPU".
  The project "MonoTestEmbedLib" is not selected for building in solution configuration "Debug|Any CPU".
Project "/home/ross/CLR-DEV9/CLR_DEV9.sln" (1) is building "/home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj" (2) on node 1 (default targets).
DllExportRestorePkg:
  cd "/home/ross/CLR-DEV9/" & DllExport.bat  -action Restore
  /bin/sh: 2: /tmp/tmp19bfc6d27bd244f5a063c2df63268d37.exec.cmd: DllExport.bat: not found
/home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj(248,5): error MSB3073: The command "cd "/home/ross/CLR-DEV9/" & DllExport.bat  -action Restore" exited with code 127.
_CleanRecordFileWrites:
  Creating directory "obj_netfx/Debug/".
Done Building Project "/home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj" (default targets) -- FAILED.
Done Building Project "/home/ross/CLR-DEV9/CLR_DEV9.sln" (CLR_DEV9 target(s)) -- FAILED.

Build FAILED.

"/home/ross/CLR-DEV9/CLR_DEV9.sln" (CLR_DEV9 target) (1) ->
"/home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj" (default target) (2) ->
(DllExportRestorePkg target) -> 
  /home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj(248,5): error MSB3073: The command "cd "/home/ross/CLR-DEV9/" & DllExport.bat  -action Restore" exited with code 127.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.63
TheLastRar commented 6 years ago

I was under the impression that mono-devel was included within mono-complete, clearly this is not the case, at least for every distro.

An update to one of the packages I use had undone some of the changes I made for Linux, pushed a fix along with another silly correction.

Try again with the latest commit.

yerbestpal commented 6 years ago

I had to switch distro (KDE Neon to Ubuntu Mate) and now, despite having installed both mono-complete and mono-devel, msbuild is not present. No idea what to do.

TheLastRar commented 6 years ago

Can you run mono --version and tell me the result.

yerbestpal commented 6 years ago
$ mono --version
Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1ubuntu1)
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 
    LLVM:          supported, not enabled.
    GC:            sgen
TheLastRar commented 6 years ago

msbuild is included in mono from version 5.0.0, you version predates that, only having xbuild.

If you wish to continue using the older version of mono you have installed, you can try replacing msbuild commands to xbuild in the following lines in tasks.json; https://github.com/TheLastRar/CLR-DEV9/blob/fa766d93664129e9dc5396455dae3706170291bd/.vscode/tasks.json#L101-L104 https://github.com/TheLastRar/CLR-DEV9/blob/fa766d93664129e9dc5396455dae3706170291bd/.vscode/tasks.json#L122-L125

yerbestpal commented 6 years ago

I chose to update mono.

This is the output from msbuild CLR_DEV9.sln /t:CLR_DEV9 /p:Configuration="DEBUG" /p:Platform="Any CPU" /p:DefineConstants=SKIP_DLLEXPORT /property:GenerateFullPaths=true:

$ msbuild CLR_DEV9.sln /t:CLR_DEV9 /p:Configuration="DEBUG" /p:Platform="Any CPU" /p:DefineConstants=SKIP_DLLEXPORT /property:GenerateFullPaths=true
Microsoft (R) Build Engine version 15.1.8.0 ( Wed Sep  5 19:27:37 UTC 2018) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 11/10/2018 12:39:42.
Project "/home/ross/CLR-DEV9/CLR_DEV9.sln" on node 1 (CLR_DEV9 target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "DEBUG|Any CPU".
ValidateProjects:
  The project "CLR_DEV9_LINUX" is not selected for building in solution configuration "Debug|Any CPU".
  The project "CLR_EMBED_TEST" is not selected for building in solution configuration "Debug|Any CPU".
  The project "CLR_DEV9_LINUX_MONO" is not selected for building in solution configuration "Debug|Any CPU".
  The project "MonoTestEmbed" is not selected for building in solution configuration "Debug|Any CPU".
  The project "MonoTestEmbedLib" is not selected for building in solution configuration "Debug|Any CPU".
Project "/home/ross/CLR-DEV9/CLR_DEV9.sln" (1) is building "/home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj" (2) on node 1 (default targets).
PrepareForBuild:
  Creating directory "bin/Debug/".
  Creating directory "obj_netfx/Debug/".
ResolveAssemblyReferences:
  Primary reference "DllExport".
/usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DllExport". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj]
          For SearchPath "{HintPathFromItem}".
          Considered "/home/ross/CLR-DEV9/packages/DllExport.1.6.1/gcache/metalib/PSE/DllExport.dll", but it didn't exist.
          For SearchPath "{TargetFrameworkDirectory}".
          Considered "/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/DllExport.winmd", but it didn't exist.
          Considered "/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/DllExport.dll", but it didn't exist.
          Considered "/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/DllExport.exe", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/DllExport.winmd", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/DllExport.dll", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/DllExport.exe", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/DllExport.winmd", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/DllExport.dll", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/DllExport.exe", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/DllExport.winmd", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/DllExport.dll", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/DllExport.exe", but it didn't exist.
          For SearchPath "{GAC}".
          Considered "DllExport", which was not found in the GAC.
          For SearchPath "{RawFileName}".
          Considered treating "DllExport, PublicKeyToken=8337224c9ad9e356" as a file name, but it didn't exist.
          For SearchPath "bin/Debug/".
          Considered "bin/Debug/DllExport.winmd", but it didn't exist.
          Considered "bin/Debug/DllExport.dll", but it didn't exist.
          Considered "bin/Debug/DllExport.exe", but it didn't exist.
CoreResGen:
  /usr/lib/mono/4.5/resgen.exe /useSourcePath /r:/usr/lib/mono/4.5-api/Microsoft.CSharp.dll /r:/usr/lib/mono/4.5-api/mscorlib.dll /r:/usr/lib/mono/4.5-api/System.Core.dll /r:/usr/lib/mono/4.5-api/System.Data.DataSetExtensions.dll /r:/usr/lib/mono/4.5-api/System.Data.dll /r:/usr/lib/mono/4.5-api/System.dll /r:/usr/lib/mono/4.5-api/System.Drawing.dll /r:/usr/lib/mono/4.5-api/System.Management.dll /r:/usr/lib/mono/4.5-api/System.Runtime.Serialization.dll /r:/usr/lib/mono/4.5-api/System.Windows.Forms.dll /r:/usr/lib/mono/4.5-api/System.Xml.dll /r:/usr/lib/mono/4.5-api/System.Xml.Linq.dll /compile Config/ConfigForm.resx,obj_netfx/Debug/CLRDEV9.Config.ConfigForm.resources Config/ConfigFormEth.resx,obj_netfx/Debug/CLRDEV9.Config.ConfigFormEth.resources Config/ConfigFormHdd.resx,obj_netfx/Debug/CLRDEV9.Config.ConfigFormHdd.resources Config/ConfigFormIncomingPorts.resx,obj_netfx/Debug/CLRDEV9.Config.ConfigFormIncomingPorts.resources HddCreate.resx,obj_netfx/Debug/CLRDEV9.HddCreate.resources
  Processing resource file "Config/ConfigForm.resx" into "obj_netfx/Debug/CLRDEV9.Config.ConfigForm.resources".
  Processing resource file "Config/ConfigFormEth.resx" into "obj_netfx/Debug/CLRDEV9.Config.ConfigFormEth.resources".
  Processing resource file "Config/ConfigFormHdd.resx" into "obj_netfx/Debug/CLRDEV9.Config.ConfigFormHdd.resources".
  Processing resource file "Config/ConfigFormIncomingPorts.resx" into "obj_netfx/Debug/CLRDEV9.Config.ConfigFormIncomingPorts.resources".
  Processing resource file "HddCreate.resx" into "obj_netfx/Debug/CLRDEV9.HddCreate.resources".
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
  /usr/lib/mono/msbuild/15.0/bin/Roslyn/csc.exe /noconfig /unsafe+ /nowarn:1701,1702 /fullpaths /nostdlib+ /platform:AnyCPU /errorreport:prompt /warn:4 /define:SKIP_DLLEXPORT /highentropyva+ /reference:/usr/lib/mono/4.5-api/Microsoft.CSharp.dll /reference:/usr/lib/mono/4.5-api/mscorlib.dll /reference:/usr/lib/mono/4.5-api/System.Core.dll /reference:/usr/lib/mono/4.5-api/System.Data.DataSetExtensions.dll /reference:/usr/lib/mono/4.5-api/System.Data.dll /reference:/usr/lib/mono/4.5-api/System.dll /reference:/usr/lib/mono/4.5-api/System.Drawing.dll /reference:/usr/lib/mono/4.5-api/System.Management.dll /reference:/usr/lib/mono/4.5-api/System.Runtime.Serialization.dll /reference:/usr/lib/mono/4.5-api/System.Windows.Forms.dll /reference:/usr/lib/mono/4.5-api/System.Xml.dll /reference:/usr/lib/mono/4.5-api/System.Xml.Linq.dll /debug+ /debug:portable /filealign:512 /optimize- /out:obj_netfx/Debug/CLR_DEV9.dll /subsystemversion:6.00 /resource:obj_netfx/Debug/CLRDEV9.Config.ConfigForm.resources /resource:obj_netfx/Debug/CLRDEV9.Config.ConfigFormEth.resources /resource:obj_netfx/Debug/CLRDEV9.Config.ConfigFormHdd.resources /resource:obj_netfx/Debug/CLRDEV9.Config.ConfigFormIncomingPorts.resources /resource:obj_netfx/Debug/CLRDEV9.HddCreate.resources /target:library /utf8output Config/ConfigFormIncomingPorts.cs Config/ConfigFormIncomingPorts.Designer.cs Config/ConfigHost.cs Config/ConfigLogging.cs Config/ConfigIncomingPort.cs Config/Test/Eth/ARPTest.cs Config/Test/Eth/DEV9_Test.cs Config/Test/EthTester.cs Config/Test/Eth/DHCPTest.cs Config/Test/Eth/DNSTest.cs Config/Test/Eth/SMAP_Test.cs DEV9/ATA/Commands/ATA_CmdDMA.cs DEV9/ATA/Commands/ATA_CmdExecuteDeviceDiag.cs DEV9/ATA/Commands/ATA_CmdNoData.cs DEV9/ATA/Commands/ATA_CmdPIODataToHost.cs DEV9/ATA/Commands/ATA_CmdSMART.cs DEV9/ATA/Commands/ATA_SCE.cs DEV9/SMAP/SMAP_State_Read.cs DEV9/SMAP/SMAP_State_Write.cs DEV9/SMAP/Winsock/ConnectionKey.cs DEV9/SMAP/Winsock/PacketReader/IP/DNS/DNS.cs DEV9/SMAP/Winsock/PacketReader/IP/DNS/DNSClasses.cs DEV9/SMAP/Winsock/PacketReader/IP/DNS/DNSEnums.cs DEV9/SMAP/Winsock/PacketReader/IP/IGMP.cs DEV9/SMAP/Winsock/PacketReader/IP/IPOptions.cs DEV9/SMAP/Winsock/PacketReader/IP/IPUnkown.cs DEV9/SMAP/Winsock/Sessions/DNSSession.cs DEV9/SMAP/Winsock/Sessions/IGMPSession.cs DEV9/SMAP/Winsock/Sessions/UDPSession/UDPFixedPort.cs DEV9/SMAP/Winsock/Sessions/UDPSession/UDPServerSession.cs DEV9/SPEED/SPEED_Header.cs DEV9/SPEED/SPEED_State.cs DEV9/SPEED/SPEED_State_Regs.cs GlobalSuppressions.cs PSE/CLR_PSE_DummyExport.cs PSE/CLR_PSE_NativeLoggerWin.cs Config/ConfigFile.cs Config/ConfigDirectIP.cs Config/ConfigFormEth.cs Config/ConfigFormEth.Designer.cs Config/ConfigForm.cs Config/ConfigForm.Designer.cs Config/ConfigFormHdd.cs Config/ConfigFormHdd.Designer.cs Config/ConfigSocketIP.cs DEV9.cs DEV9Header.cs DEV9LogSources.cs DEV9/ATA/Commands/ATA_Commands.cs DEV9/ATA/ATA_HDDInfo.cs DEV9/ATA/ATA_State.cs DEV9/ATA/ATA_State_regs.cs DEV9/ATA/ATA_Transfer.cs DEV9/DEV9_State.cs DEV9/DEV9_State_Regs.cs DEV9/FLASH/FLASH_Constants.cs DEV9/FLASH/FLASH_State.cs DEV9/FLASH/FLASH_State_regs.cs DEV9/SMAP/AdapterLoader.cs DEV9/SMAP/AdapterManager.cs DEV9/SMAP/BridgeHelper.cs DEV9/SMAP/Data/DirectAdapter.cs DEV9/SMAP/Data/NetAdapter.cs DEV9/SMAP/Data/NetPacket.cs DEV9/SMAP/Data/SMAP_bd.cs DEV9/SMAP/SMAP_State.cs DEV9/SMAP/Tap/INetCfg/Bridge.cs DEV9/SMAP/Tap/INetCfg/INetCfg.cs DEV9/SMAP/Tap/Tap_Native.cs DEV9/SMAP/WinPcap/WinPcap.cs DEV9/SMAP/WinPcap/WinPcap_Native.cs DEV9/SMAP/Winsock/PacketReader/ARP/ARPPacket.cs DEV9/SMAP/Winsock/PacketReader/EtherFrameType.cs DEV9/SMAP/Winsock/PacketReader/EthernetFrame.cs DEV9/SMAP/Winsock/PacketReader/EthernetPayload.cs DEV9/SMAP/Winsock/PacketReader/IP/DHCP/DHCP.cs DEV9/SMAP/Winsock/PacketReader/IP/DHCP/DHCPOptions.cs DEV9/SMAP/Winsock/PacketReader/IP/ICMP.cs DEV9/SMAP/Winsock/PacketReader/IP/IPPacket.cs DEV9/SMAP/Winsock/PacketReader/IP/IPPayload.cs DEV9/SMAP/Winsock/PacketReader/IP/IPType.cs DEV9/SMAP/Winsock/PacketReader/IP/TCP.cs DEV9/SMAP/Winsock/PacketReader/IP/TCPOption.cs DEV9/SMAP/Winsock/PacketReader/IP/UDP.cs DEV9/SMAP/Winsock/PacketReader/NetLib.cs HddCreate.cs HddCreate.Designer.cs Properties/AssemblyInfo.cs PSE/CLR_PSE.cs PSE/CLR_PSE_Callbacks.cs PSE/CLR_PSE_DEV9.cs PSE/CLR_PSE_FreezeData.cs PSE/CLR_PSE_PluginLog.cs DEV9/SMAP/Winsock/Sessions/DHCPSession.cs DEV9/SMAP/Winsock/Sessions/ICMPSession.cs DEV9/SMAP/Winsock/Sessions/Session.cs DEV9/SMAP/Winsock/Sessions/TCPSession/TCPSession.cs DEV9/SMAP/Winsock/Sessions/TCPSession/TCPSession_In.cs DEV9/SMAP/Winsock/Sessions/TCPSession/TCPSession_Out.cs DEV9/SMAP/Winsock/Sessions/UDPSession/UDPSession.cs DEV9/SMAP/Tap/Tap.cs PSE/CLR_PSE_SudoPtr.cs PSE/CLR_PSE_Utils.cs PSE/CLR_PSE_Version.cs PSE/CLR_PSE_Mono.cs Utils.cs DEV9/SMAP/Winsock/Winsock.cs "/tmp/.NETFramework,Version=v4.5.AssemblyAttributes.cs"
CopyFilesToOutputDirectory:
  Copying file from "obj_netfx/Debug/CLR_DEV9.dll" to "bin/Debug/CLR_DEV9.dll".
  CLR_DEV9 -> /home/ross/CLR-DEV9/CLR_DEV9/bin/Debug/CLR_DEV9.dll
  Copying file from "obj_netfx/Debug/CLR_DEV9.pdb" to "bin/Debug/CLR_DEV9.pdb".
Done Building Project "/home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj" (default targets).
Done Building Project "/home/ross/CLR-DEV9/CLR_DEV9.sln" (CLR_DEV9 target(s)).

Build succeeded.

"/home/ross/CLR-DEV9/CLR_DEV9.sln" (CLR_DEV9 target) (1) ->
"/home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj" (default target) (2) ->
(ResolveAssemblyReferences target) -> 
  /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DllExport". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/home/ross/CLR-DEV9/CLR_DEV9/CLR_DEV9.csproj]

    1 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.65

and this is the ouput from build.sh:

~/CLR-DEV9/CLR_DEV9_LINUX_MONO$ ./build.sh
Get:1 https://download.mono-project.com/repo/ubuntu stable-bionic/main i386 libgdiplus i386 5.6-0xamarin5+ubuntu1804b1 [158 kB]
Get:2 https://download.mono-project.com/repo/ubuntu stable-bionic/main i386 libmonosgen-2.0-1 i386 5.16.0.179-0xamarin1+ubuntu1804b1 [1,698 kB]
Get:3 https://download.mono-project.com/repo/ubuntu stable-bionic/main i386 mono-runtime-common i386 5.16.0.179-0xamarin1+ubuntu1804b1 [876 kB]
Fetched 2,733 kB in 1s (4,040 kB/s)               
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ross/CLR-DEV9/CLR_DEV9_LINUX_MONO/obj/x86/Debug
Scanning dependencies of target clrdev9mono
[ 33%] Building CXX object CMakeFiles/clrdev9mono.dir/DEV9.cpp.o
[ 66%] Building CXX object CMakeFiles/clrdev9mono.dir/PSE.cpp.o
/home/ross/CLR-DEV9/CLR_DEV9_LINUX_MONO/PSE.cpp: In function ‘void LoadCoreCLR()’:
/home/ross/CLR-DEV9/CLR_DEV9_LINUX_MONO/PSE.cpp:283:68: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  pluginDomain = mono_domain_create_appdomain("AssemblyDomain", NULL);
                                                                    ^
[100%] Linking CXX shared library libclrdev9mono.so
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/../../../libmonosgen-2.0.so when searching for -lmonosgen-2.0
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/../../../libmonosgen-2.0.a when searching for -lmonosgen-2.0
/usr/bin/ld: skipping incompatible //usr/lib/libmonosgen-2.0.so when searching for -lmonosgen-2.0
/usr/bin/ld: skipping incompatible //usr/lib/libmonosgen-2.0.a when searching for -lmonosgen-2.0
/usr/bin/ld: cannot find -lmonosgen-2.0
collect2: error: ld returned 1 exit status
CMakeFiles/clrdev9mono.dir/build.make:122: recipe for target 'libclrdev9mono.so' failed
make[2]: *** [libclrdev9mono.so] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/clrdev9mono.dir/all' failed
make[1]: *** [CMakeFiles/clrdev9mono.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
cp: cannot stat 'obj/x86/Debug/libclrdev9mono.so': No such file or directory
TheLastRar commented 6 years ago

Turns out I never tested building on an 64bit OS (I've always used a 32bit OS building this project)

I've pushed a fix that allows building on a 64bit OS.

yerbestpal commented 6 years ago

Okay, it successfully built. Though PCSX2 does not seem to see the files that were extracted from libclrdev9mono.Debug.tar.gz into the plugins folder.

TheLastRar commented 6 years ago

Can you retry with the latest commit, I've fixed a couple issues, namely not being detected by PCSX2 if built on Linux and hopefully resolve the issue with PCSX2 crashing if the bundled mono and system installed build of mono where different versions.

yerbestpal commented 6 years ago

It's working perfectly now. Thank you very much for your time and patience. Do you take donations at all?