Jump to content
  • Sign Up

Archived

This topic is now archived and is closed to further replies.

  • 0
stamasd

MCGalaxy on OSX 10.4.11: how to run (if even possible)

Question

I am trying to run a MCGalaxy server on OSX 10.4 on a G4 mac. The issue I have is the following:

-MCGalaxy requires .NET 4. The oldest version of Mono that provides that is 2.8. However, 2.8 requires libiconv version 7 or later, and OSX 10.4 only provides version 5.

-the latest version of Mono that works with libiconv 5 is 2.6, but that does not provide compatibility with .NET 4.

Has anyone ever run MCGalaxy on OSX 10.4, and if so how? Is there a way to update libiconv on OSX 10.4 to version 7 or later?

Share this post


Link to post

15 answers to this question

Recommended Posts

MCGalaxy can be compiled to run on .NET 2.0 (just make sure to also define NET_20 defined when compiling it) - I could compile a .NET 2.0 build for you though if you want

Share this post


Link to post
29 minutes ago, UnknownShadow200 said:

 

I'm trying to see if updating libiconv by using MacPorts will allow the current .NET 4 binary run with Mono 2.8 - it takes a long time to install though (needs to compile gcc 4.2 first, and on a 450MHz G4 that's going to be a while). I will update here if it works. If not, I will downgrade Mono to 2.6 and try to compile against .NET 2.0 as you suggested. I wasn't even aware that it was a possibility. 🙂

Share this post


Link to post

Yeah, installing an updated libiconv through macports didn't change anything. The installation succeeded, but mono still only sees the original system library (which came with Xcode 2.5 I think) and complains about its incompatible version.

I wonder however - if I uninstall Mono 2.8 (which I have installed now, though non-functional) and install mono through macports (it's version 6.12) would MCGalaxy be able to be built and run using that? I may give it a try when I have time. It will take a very long time to compile mono on this machine. (the "bootstrap" version of gcc 4.2 took 3.5h)

 

 

(edit) yeah that won't be viable. The macports version of mono pulls in about 30 other dependencies which would take days to compile. So I went back to Mono 2.6 and tried to compile MCGalaxy against it. I'm not familiar at all with .NET/Mono; I went through all the .csproj files and changed all references to TargetFramework to 2.0 but that doesn't allow it to compile. I got 41 errors, I can attach the log file if you want. Same happens if I change the references to netstandard2.0. Not sure where to define NET_20 - in MCGalaxy.sln?

Share this post


Link to post
3 hours ago, stamasd said:

(edit) yeah that won't be viable. The macports version of mono pulls in about 30 other dependencies which would take days to compile. So I went back to Mono 2.6 and tried to compile MCGalaxy against it. I'm not familiar at all with .NET/Mono; I went through all the .csproj files and changed all references to TargetFramework to 2.0 but that doesn't allow it to compile. I got 41 errors, I can attach the log file if you want. Same happens if I change the references to netstandard2.0. Not sure where to define NET_20 - in MCGalaxy.sln?

I'd be interested to see what errors you are getting (note that a bit confusingly, .NET core 2.0 and .NET standard 2.0 are a completely different thing to .NET framework 2.0)


You could try this precompiled version for .NET framework 2.0:
mcgalaxy_net20.zip
 

Share this post


Link to post

Attaching the error log

 

(also it seems that I cannot download attachments from this forum using TenFourFox, I'll have to download it on another machine and transfer the binary package over to the G4)

MCGalaxy-errors.txt

The binary you attached doesn't seem to run properly with Mono 2.6 on OSX 10.4.11. It keeps trying to open a new terminal, failing (? crashing) and doing it again and again. No error messages in the original terminal where I started it from.

Share this post


Link to post
3 hours ago, stamasd said:

Attaching the error log

 

(also it seems that I cannot download attachments from this forum using TenFourFox, I'll have to download it on another machine and transfer the binary package over to the G4)

MCGalaxy-errors.txt 44.52 kB · 1 download

The binary you attached doesn't seem to run properly with Mono 2.6 on OSX 10.4.11. It keeps trying to open a new terminal, failing (? crashing) and doing it again and again. No error messages in the original terminal where I started it from.

Ah, well the good thing is that there's no unsurprising errors in that error logs. But I do need to create some clearer instructions on how to compile for .NET 2.0 framework with mono though, so I'll try to get that written up later today

 

Is it able to create any folders/files? Especially the logs/errors folder

I will try to get a Linux VM with mono 2.6 setup, although that might take me a bit longer

 

Unfortunately, you have run into an edge case with the automatic restart on error (usually when there's a severe failure on server startup, it fails way before the restart on error behaviour gets enabled)

If the server is able to generate properties/server.properties, then you can turn off the automatic restart on error behaviour in that file

Share this post


Link to post

I've added instructions at https://github.com/UnknownShadow200/MCGalaxy/wiki/Compiling-for-.NET-2.0

 

You'll also need to copy across MySql.Data.dll for the server to work (although MCGalaxy doesn't use MySql at all by default, the old version of mono does need the DLL to be present)
Once I did that, I was able to get the CLI to successfully work on 10.4, although the GUI didn't work

Share this post


Link to post
11 hours ago, UnknownShadow200 said:

Ah, well the good thing is that there's no unsurprising errors in that error logs. But I do need to create some clearer instructions on how to compile for .NET 2.0 framework with mono though, so I'll try to get that written up later today

 

Is it able to create any folders/files? Especially the logs/errors folder

I will try to get a Linux VM with mono 2.6 setup, although that might take me a bit longer

 

Unfortunately, you have run into an edge case with the automatic restart on error (usually when there's a severe failure on server startup, it fails way before the restart on error behaviour gets enabled)

If the server is able to generate properties/server.properties, then you can turn off the automatic restart on error behaviour in that file

It creates a "logs" folder. I'm attaching the contents of the folder. No server.properties

logs.zip

Share this post


Link to post

The CLI gives me this (see screenshot)

If you want I can give you access to a qemu image with OSX 10.4.11 and Xcode 2.5/Mono 2.6 installed plus all the various binaries that I have, and the script to run it. It should run with any reasonably recent qemu-system-ppc. It's a 3.6GB download.

mcgalaxy-cli.png

It looks like it can't download MySQL.Data.dll (it does create an empty file with that name in the folder)

Share this post


Link to post

I've fixed the crash that was causing the server to get stuck in a restart loop in the latest commit


Alas, doesn't seem like the failure to load libgdiplus.dylib will be easy to resolve
image.png

Share this post


Link to post
On 6/15/2023 at 7:32 AM, UnknownShadow200 said:

I've added instructions at https://github.com/UnknownShadow200/MCGalaxy/wiki/Compiling-for-.NET-2.0

 

You'll also need to copy across MySql.Data.dll for the server to work (although MCGalaxy doesn't use MySql at all by default, the old version of mono does need the DLL to be present)
Once I did that, I was able to get the CLI to successfully work on 10.4, although the GUI didn't work

FWIW I had some time again today and tried again to compile MCGalaxy for .NET 2.0 following your instructions. I made the changes as indicated but it fails to compile. This is on OSX 10.4.11 with Mono 2.6. I'm attaching the error log.

errors2.txt

Share this post


Link to post

Unfortunately, the very old mono compiler doesn't support method overloads with default parameters properly.

So where there are cases like this:

class Level
{
 public void Blockchange(ushort x, ushort y, ushort z, BlockID block, bool overRide = false,
                                PhysicsArgs data = default(PhysicsArgs), bool addUndo = true) { }
 public void Blockchange(ushort x, ushort y, ushort z, BlockID block) { }
}

..
lvl.Blockchange(x1, y1, z1, Block.Grass);
lvl.Blockchange(x2, y2, z2, Block.Dirt, true);


you'll have to remove the default parameters from the method overloads, and change any code that was relying on them to specify every parameter

So the above example would now become:
 

class Level
{
 public void Blockchange(ushort x, ushort y, ushort z, BlockID block, bool overRide,
                                PhysicsArgs data, bool addUndo) { }
 public void Blockchange(ushort x, ushort y, ushort z, BlockID block) { }
}

..
lvl.Blockchange(x1, y1, z1, Block.Grass);
lvl.Blockchange(x2, y2, z2, Block.Dirt, true, default(PhysicsArgs), true);

 

Unfortunately, what's worse is that the compiler in this case only seems to report a single batch of failures when run.

So you'll have to repeatedly fix one batch of failures, run the compiler again, fix the next batch of failures, run the compiler again, and so on.

(It can be done, it just takes a long time.. when I tried this, I still cheated quite a bit and deleted code that was causing compile failures rather than fixing it a number of times)

Share this post


Link to post

Thanks. I'll just run your provided CLI binary for now. I'll try again to compile once I finish installing mono 6.1 via macports - it's been working at compiling it and all its dependencies for 2 days now.

Share this post


Link to post

×
×
  • Create New...