Log in

View Full Version : EQEmu on Mac OSX?


Corysia
09-23-2013, 01:51 PM
Has anyone done this? Given that it'll run on Linux and Win, 90% of the porting is probably taken care of.

I've an old Mac Mini I was thinking of trying to set a server up on. I thought I'd ask first to see if anyone's tried or what kinds of problems they've seen.

I'm sure it can be done, I'm just wondering if it would be of any interest to anyone besides me.

HnathBST
09-23-2013, 02:29 PM
The hardest part would be getting all the dependencies. I had the same problem trying to get eqemu to run on centos. It also seems, no matter how hard I try I can't get the login server to run.

I wouldn't see why it wouldn't be possible but it would be time consuming. The question here is why? If there is a reason you specifically need to use centos than I say give it a shot.

Vexyl
09-23-2013, 02:31 PM
You should have no problems as long as you have the dependencies and EQEmu is byte-order independent (Not really sure).

Edit: See http://www.eqemulator.org/forums/archive/index.php/t-26549.html and http://www.eqemulator.org/forums/archive/index.php/t-18759.html

Vexyl
09-23-2013, 02:34 PM
The hardest part would be getting all the dependencies. I had the same problem trying to get eqemu to run on centos. It also seems, no matter how hard I try I can't get the login server to run.

I wouldn't see why it wouldn't be possible but it would be time consuming. The question here is why? If there is a reason you specifically need to use centos than I say give it a shot.

OP said Mac OS X, not CentOS.

demonstar55
09-23-2013, 02:40 PM
Send me an Intel Mac and I can try to make it work :P

lerxst2112
09-23-2013, 02:56 PM
You should have no problems as long as you have the dependencies and EQEmu is byte-order independent (Not really sure).


All Intel based Macs, including the Mac Mini, are little-endian, so that wouldn't be an issue.

HnathBST
09-23-2013, 03:21 PM
OP said Mac OS X, not CentOS.

I was merely speaking from experience. I know that eqemu is built around packages for Debian and Fedora (and obvisiously windows). That said the login server dependencies are ONLY compiled for Debian/Fedora/windows, so there is no chance in getting a private login server running.

Just because Mac osx isn't centos doesn't mean you won't face the same hardships. If you re-read my post you'll also see that I said it will probably run, just won't be as easy as running it on Debian/fedora/windows.

Vexyl
09-23-2013, 04:00 PM
...
If there is a reason you specifically need to use centos than I say give it a shot.

I was referring to that sentence since it implies that you thought the OP was using CentOS.

All Intel based Macs, including the Mac Mini, are little-endian, so that wouldn't be an issue.

Oh, I didn't know the Mac Mini was intel based. Thanks for clearing that up for me:)

Corysia
09-23-2013, 04:57 PM
Ok, I think I'll give it a shot. I've not set up a server for a few years, so i plan to walk thru the windows setup first and get that up and running to remember how it's done.

I've mostly moved away from using Windows. I dual-boot Win7 when needed on my Macbook. I don't have any Linux systems currently. The Mac Mini is a good choice because it's on all the time while everything else i own is a laptop.

EQ Titanium installs and runs fine on an Intel Mac with Wine. I didn't find it crashing any more frequently than my old Windows PC when I used to play EQ back in 1999-2003.

I'll try to document how it goes and perhaps make a Mac guide, assuming I can get it all to work. Most of the dependencies are easy with Mac Ports.

sorvani
09-24-2013, 10:01 PM
Also, the login server is completely not needed to run a server.

Corysia
09-26-2013, 02:35 PM
Mmm, well, it doesn't compile cleanly. There are some C++ language issues. So, this may take a bit to sort out. Since I'm in the middle of moving to a new house, I probably won't finish this up for a bit.

In case a dev is listening:
std::to_string() isn't on Mac, either. But unlike VC++, it doesn't have an alternative version. I fixed it with pushing into std::stringstream first.

Second problem is with perl 5.12.4 and C++11:
/opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/CORE/pad.h:256:27: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
"Pad 0x%"UVxf"[0x%"UVxf"] restore_local\n",

I'm not quite sure what to do with that one yet.

lerxst2112
09-26-2013, 02:58 PM
What compiler and version are you using?

Vexyl
09-26-2013, 05:19 PM
std::to_string() was introduced to the standard library with C++11.
If your compiler supports the latest standard, find out how to enable it.

For example, for GCC you can pass -std=c++11 to enable it.
I am not entirely familiar with VC++, but I'm sure its equivalent setting is as simple as any other.

Corysia
09-26-2013, 06:00 PM
What compiler and version are you using?

> g++ --version
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Vexyl
09-26-2013, 06:27 PM
I think it's time to update your compiler.

demonstar55
09-26-2013, 07:03 PM
Our current min compiler targets are VS2010 and GCC 4.5 if I recall correctly. If OSX doesn't support GCC 4.5 you're shit out of luck. (Actually the main reason we chose that version is because of nullptr, but that can be fixed with a define since older GCCs had the same feature defined as something else, but no one has gotten around to fixing that)

Corysia
09-27-2013, 11:34 AM
I think it's time to update your compiler.

Unlike Linux and Cygwin under Windows, Apple is slow to adopt. This system is actually "up to date" as far as Apple is concerned.

I can update it using Mac Ports to get to libgcc @4.8.1_3 or even libgcc-devel @4.9-20130915, but I hesitate to do so. It complicates the steps to the guide.

On the other hand, the audience for this isn't my normal one. I usually have to write software in such a way I think my mom can install without having to call me and then I spend an hour walking her thru it over the phone.

lerxst2112
09-27-2013, 01:18 PM
clang should be relatively up to date depending on which version of Xcode you have installed.

demonstar55
09-27-2013, 01:38 PM
Running export CXX="clang++" then the normal cmake stuff and make should set the compiler to clang, but this fails to compile, so at the moment it's impossible to build EQEmu with clang (although the errors it spit out seem fixable so far)

edit: nevermind, the errors seem to be in PERL header files, not that easy :P

edit: also fails with just LUA in the LUA header files, there might be a flag to ignore those errors maybe?

Corysia
09-27-2013, 02:23 PM
clang should be relatively up to date depending on which version of Xcode you have installed.

This has Xcode 5 on it.

I've gone ahead and installed the Mac Ports version of gcc 4.8. After configuring cmake to point to the right dylibs for mysql and pointing the compilers to /opt/local, things chug along nicely up to shared_memory with only one source change. I needed to redefine MSG_NOSIGNAL to SO_NOSIGPIPE in common/TCPConnection.cpp (just like the FREEBSD change to map it to 0).

Shared memory is asking for librt.a, which Macs don't have. I've fixed that by adding an OS test in the CMakeList.txt files.

At this point, these compile:
common
shared_memory
world
zone
ucs
queryserv
eqlaunch
azone_common
awater
azone
listobj
cppunit
tests


loginserver needs libEQEmuAuthCrypto.a, which I don't know where to find the source for.

luabind doesn't compile with a long list of errors I haven't looked at yet.