View Full Version : Compiling Lich to run in OS X
Gnomad
01-08-2009, 10:10 PM
So, long story short, I have Stormfront running in Wine (Crossover), and I'd like to get the Lich up and running in OS X to go along with it.
I trust that means I'll have to compile it to run in OS X, but I won't lie - I haven't compiled anything more complex than a TeX document since AP C++ in high school, and I haven't the slightest idea where to start with that.
Any help?
DaCapn
01-09-2009, 03:55 AM
His source has a readme file which gives details and some of the compile flags you might need. The way I see it you have 3 requirements, you have to be able to run a process as super user, you need to have 'make', and the necessary ruby libraries. Check the readme file to see if there's any flags you should need to use, then open up a terminal and just see what happens.
./configure
make
sudo make install
Post your terminal output if it doesn't work straight away. I have compiled it from source before and I've used the binary with the install script so I know that neither of them are outwardly broken in some way.
fallenSaint
01-09-2009, 08:38 AM
Just curious, is this easier than running a VM and XP? I only ask because that's how I've got it installed which took no thought process from me which is great.
DaCapn
01-09-2009, 11:37 AM
With a VM you're dedicating resources to run an OS. Sometimes you just need that (I've had to do it for AutoCAD before as my only option). But I think if you can get something to work under a compatibility layer like wine, it's really the best choice. You're not allocating a chunk of memory that may or may not get filled by the processes.
If I needed something every single day that wouldn't run under wine (something like AutoCAD for example), I'd throw together an EEPC (can be built up for about $200 now, smaller than a breadbox, or bought for about $300, a little larger than a router) and plug it into my KVM.
fallenSaint
01-09-2009, 12:05 PM
With a VM you're dedicating resources to run an OS. Sometimes you just need that (I've had to do it for AutoCAD before as my only option). But I think if you can get something to work under a compatibility layer like wine, it's really the best choice. You're not allocating a chunk of memory that may or may not get filled by the processes.
If I needed something every single day that wouldn't run under wine (something like AutoCAD for example), I'd throw together an EEPC (can be built up for about $200 now, smaller than a breadbox, or bought for about $300, a little larger than a router) and plug it into my KVM.
Makes sense I suppose, I have so many misc apps that are windows only I just couldnt turn down the VM for ease of working.
As a side note thou if your willing to share the info if you get everything working lemme know I'd be interested in seeing it work out with a Wine setup.
Gnomad
01-09-2009, 05:06 PM
Makes sense I suppose, I have so many misc apps that are windows only I just couldnt turn down the VM for ease of working.
As a side note thou if your willing to share the info if you get everything working lemme know I'd be interested in seeing it work out with a Wine setup.Yeah, I still need to update the RAM in the Macbook so running a VM is pretty taxing. The only windows apps I run with any regularity are MS Office (the Mac version blows donkeys) and now Gemstone, so Wine is by far the easier choice for me.
Crossover is pretty damn sweet, though; I've even played Portal and TF2 with no problems on the Macbook.
Danical
01-09-2009, 05:15 PM
QUESTION: Could you show this total n00blet how exactly to run MS Office on a iMac? The Mac MS Office doesn't have access and it makes me sad in the pants. :( :( :(
EDIT: I've tried using Parallels but that ended up sucking pendulous gorilla nuts.
Gnomad
01-09-2009, 05:35 PM
Parallels is virtualization software; it pretty much runs a copy of Windows in the background. It'll run a whole tone of programs, but it has a pretty big memory/processor overhead.
Crossover, what I'm using, is an implementation (a damn good one) of Wine, which is a translation layer. Instead of running Windows in the background, it translates any special Windows commands into Mac OS (or Linux, or...) commands. As a result, Crossover is much "cheaper" to run.
It is also a lot more buggy, and a lot less compatible. Windows has a lot of commands, and things like Direct X or the .Net framework add a whole bunch of new ones. The more "weird" commands a program calls, the more likely it is to not run or run strangely on Crossover.
Luckily, if it's popular, like Office or Source Engine games, or if it's relatively simple, like Simutronics clients, Crossover handles it pretty well.
You can try out Crossover at http://www.codeweavers.com/products/cxmac/, but the real version costs money (I think it's worth it).
Crossover is based on Wine, which is free. Darwine is a Mac OS version of Wine that's free, but not as polished as Crossover. It'll still run a lot of the same stuff, though. http://wiki.winehq.org/MacOSX/
DaCapn
01-09-2009, 05:47 PM
As a side note thou if your willing to share the info if you get everything working lemme know I'd be interested in seeing it work out with a Wine setup.
If you're asking about OSX, I personally have no idea. I've sat in front of a mac a few times within the past year but the last mac I sat in front of before that looked like this: http://en.wikipedia.org/wiki/File:Macintosh_classic.jpg Anyway, just post where you get hung up with it and someone might be able to help.
You won't be able to use Psinet 2.0 based on its requirement of the newer .NET framework (I've tried the mono route also to no success) and Jamus specifically blocks anyone using the 1.0 client from connecting to his Psinet server (despite the fact that it seemed to work on my end during the initial change-over). You can still get aliasing functionality and tracking of your own spells (for single and multi-accounts), though. And you may be able to manually send the skill files for other characters (say if you only have one or two hunting buddies) to keep rough track of spells from friends but there's no guarantee on compatibility between Psinet versions for these files.
DaCapn
01-09-2009, 05:51 PM
Crossover is based on Wine, which is free. Darwine is a Mac OS version of Wine that's free, but not as polished as Crossover. It'll still run a lot of the same stuff, though. http://wiki.winehq.org/MacOSX/
I've seen some of the Wine people get adamant about Crossover like "it's nothing more than a collection of cheap hacks bundled with wine in order to work around compatibility issues found in a selective list of mainstream applications." It's kind of funny, really. Eh, I use crossover's bastardization as much as I use the real wine; different job, different tool.
Gnomad
01-09-2009, 07:27 PM
Okay, finally hit a wall. I updated the two files Lich asked for from the linux versions to mac versions i compiled myself, but when i try to make Lich I get the error.
Artemis:lich xxxxx$ ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for main in -lcrypt... no
checking for main in -ldl... yes
checking for main in -lm... yes
checking for main in -lsocket... no
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for working alloca.h... yes
checking for alloca... yes
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking stdio_ext.h usability... no
checking stdio_ext.h presence... no
checking for stdio_ext.h... no
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking return type of signal handlers... void
checking for working strcoll... yes
checking for working strnlen... no
checking for getcwd... yes
checking for memset... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
Artemis:lich xxxxx$ make
gcc -I. -g -O2 lichrb.o lich.o lichparser.o wizardparser.o cachedarray.o versioncmp.o hook.o lichscript.o pathfind.o zlib.o socket.o lichxml.o -o lich -L. -I. -lruby-static -ldl -lcrypt -lm -lz -lglib-2.0 -Wl,-export-dynamic && strip lich && sudo chown root:root lich && sudo chmod 4755 lich
ld: library not found for -lcrypt
collect2: ld returned 1 exit status
make: *** [lich] Error 1
Artemis:lich xxxxx$ sudo make install
make: *** No rule to make target `install'. Stop.
edit: I'm assuming this means I need to get libcrypto in my path somewhere... working on that.
edit2: with /usr/lib in my path as well, now i'm missing libglib2.0
edit3: got fink (package manager), got glib2 and glib2dev, they're in my path, still not found
DaCapn
01-11-2009, 09:43 PM
You know what... I know someone who ran lich on OSX before, I'm going to see if I can get any info or tips, I'll post back if I hear from him.
Cephalopod
01-11-2009, 09:58 PM
Check /System/Library/Frameworks/openssl.framework/openssl for libcrypto.a.
DaCapn
01-13-2009, 01:37 AM
My buddy said he never compiled lich for OSX so I think the way he did it was by taking his linux-based server, running lich on that and then modifying his hosts file to point the domain gs3.simutronics.net to his linux server.
If you can't get it compiled under OSX, I know how you could do it in a VM environment (such that you're running lich in the VM, not anything else):
Get an emulator and make a stripped-down install (like a basic debian install, no desktop environment or anything), install lich on that. When you boot the linux VM, pass it some flags so that inbound traffic on port 4900 is piped into the VM on 4900 (I know how to do this with qemu, I don't know how this is done with other emulators). Modify your hosts file in OSX (ought to also be /etc/hosts) so that gs3.simutronics.net:4900 is mapped to localhost:4900. You'd have to comment out that entry in your hosts file if you want to login without lich, of course.
Anyway, it's kind of a janky option but it would work if you can't get that sorted out. It's not likely to consume much resources either. It should be able to run within something like 64MB of RAM.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.