Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» MacOSX - forked.net   » Requests   » Empire !

UBBFriend: Email this page to someone!    
Author Topic: Empire !
Karl
Junior Member
Member # 158

posted October 13, 2001 11:27 AM      Profile for Karl   Email Karl   Send New Private Message      Edit/Delete Post  Reply With Quote 
The end-all be-all of turn-based strategy games. URL:www.empire.cx. I've been trying to port this over myself for a nearly a year, but it is juuust beyond my abilities. I've been able to compile and run everything but the world server. Pleease oh pleeease someone help me with this. The only work there appears to be is a few PPC specfiic code changes in what's called the LPW.
Posts: 4 | From: Chicago, IL | Registered: Oct 2001  |  IP: Logged
apex
Administrator
Member # 1

posted October 13, 2001 11:29 PM      Profile for apex   Email apex   Send New Private Message      Edit/Delete Post  Reply With Quote 
I spent some time working on this and I seem to have gotten as far as i can without some help also

code:

gcc -o emp_server main.o idle.o lostitem.o marketup.o shutdown.o
timestamp.o update.o /var/root/emp4/lib/libplayer.a /var/root/emp4/lib/libupdate.a /var/root/emp4/lib/libcommands.a
/var/root/emp4/lib/libsubs.a /var/root/emp4/lib/libcommon.a /var/root/emp4/lib/libgen.a /var/root/emp4/lib/libglobal.a
/var/root/emp4/lib/libas.a /var/root/emp4/lib/libempth.a /var/root/emp4/lib/liblwp.a -lm -lc
/usr/bin/ld: Undefined symbols:
_lwpInitContext
make: *** [emp_server] Error 1


(I added some line breaks to preserve the layout of this webpage)

Is this the same problem you are having?
I also get:

code:

ranlib /var/root/emp4/lib/liblwp.a
ranlib: file: /var/root/emp4/lib/liblwp.a(arch.o) has no symbols


which appears to be the reason it is not compiling correctly.

[ October 13, 2001: Message edited by: apex ]


Posts: 307 | From: Alaska | Registered: Aug 2001  |  IP: Logged
Karl
Junior Member
Member # 158

posted October 21, 2001 10:01 PM      Profile for Karl   Email Karl   Send New Private Message      Edit/Delete Post  Reply With Quote 
Hey, comrade! I've been struggling with this port for almost a year as I'm no C++ programmer and I know even less about UNIX.

Yeah, I'm getting those same errors. Here's a breakdown of all the code changes I've made and the compile errors I get (in that order).

/include/misc.h : commented out "extern char *sprintf();"

compile errors:

code:
(gcc -bsd -fwritable-strings -traditional-cpp)
ranlib /Users/karl/Documents/empire/emp4.A/lib/libempth.a
ranlib: file: /Users/karl/Documents/empire/emp4.A/lib/libempth.a(pthread.o) has no symbols
ranlib: file: /Users/karl/Documents/empire/emp4.A/lib/libempth.a(ntthread.o) has no symbols

src/lib/gen/signal.c : commented out declaration of sys_siglist because already declared in signal.h

compile errors:

code:
ranlib: file: /Users/karl/Documents/empire/emp4.A/lib/libgen.a(hpux.o) has no symbols
ranlib: file: /Users/karl/Documents/empire/emp4.A/lib/libgen.a(strdup.o) has no symbols
ranlib: file: /Users/karl/Documents/empire/emp4.A/lib/libgen.a(vsprintf.o) has no symbols
login.c:61: warning: variable `login_coms' is implicitly extern
ranlib: file: /Users/karl/Documents/empire/emp4.A/lib/libsubs.a(wire.o) has no symbols

src/lib/lwp/lwp.c : changed include <malloc.h> to <stdlib.h>
src/lib/lwp/sel.c : changed include <malloc.h> to <stdlib.h>
src/lib/lwp/sem.c : changed include <malloc.h> to <stdlib.h>

compile errors:

code:
ranlib: file: /Users/karl/Documents/empire/emp4.A/lib/liblwp.a(arch.o) has no symbols
(gcc -o emp_server etc... -flat_namespace -undefined warning -lm -lc)
/usr/bin/ld: warning multiple definitions of symbol _inet_ntoa
/lib/libgen.a(inet.o) definition of _inet_ntoa in section (__TEXT,__text)
/usr/lib/libm.dylib(inet_ntoa.o) definition of _inet_ntoa
/usr/bin/ld: warning undefined symbols:
_lwpInitContext

______
Everything I've done here is the result of countless Google searches, not programming experience, by the by. I'm hoping you might shed some more light on the situation..?


Posts: 4 | From: Chicago, IL | Registered: Oct 2001  |  IP: Logged
apex
Administrator
Member # 1

posted October 22, 2001 01:13 AM      Profile for apex   Email apex   Send New Private Message      Edit/Delete Post  Reply With Quote 
Try moving the -lm flag to the very end of your CFLAGS variable.
if that doesnt work, try removing -lm form the makefile. be sure you are not using =-lpthread in any makefiles (See the compiling page for info on that).

Posts: 307 | From: Alaska | Registered: Aug 2001  |  IP: Logged
Karl
Junior Member
Member # 158

posted October 26, 2001 02:58 PM      Profile for Karl   Email Karl   Send New Private Message      Edit/Delete Post  Reply With Quote 
Okay, so I've been pounding on this for several long nights... and it does seem that the biggest issue is that _lwpInitContext does not get defined in src/lib/lwp/arch.c.

So, breaking down the arch.c I see that I need to know a bit about how OSX and PPC handles threading. I tried screwing around with just enabling the ifdef(__PPC__) section, but I get nothing but errors.

Do you or anyone have experience with enabling lwp on OSX? Or is there a way to swap lwp for the OSX cthreads? Am I just talking a bunch of garbage?

I am waaay over my head, but I'm not beaten yet.

--I KNOW, I'll move this discussion to "Compile Problems."

[ October 26, 2001: Message edited by: Karl ]


Posts: 4 | From: Chicago, IL | Registered: Oct 2001  |  IP: Logged
Karl
Junior Member
Member # 158

posted October 26, 2001 10:10 PM      Profile for Karl   Email Karl   Send New Private Message      Edit/Delete Post  Reply With Quote 
I'm pleased to report the first successul build of Empire client and server. Here's an excerpt from the server log:

Fri Oct 26 23:47:09 2001 Empire server (pid 8892) started
Fri Oct 26 23:47:09 2001 pthreads initialized
Fri Oct 26 23:47:09 2001 Next update at Fri Oct 26 23:50:00 2001
Fri Oct 26 23:47:09 2001 Next update in 171 seconds

All hail the power of relentless determination!


Posts: 4 | From: Chicago, IL | Registered: Oct 2001  |  IP: Logged

All times are Pacific Time  

Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
Hop To:

Contact Us | macosx.forked.net

Powered by Infopop Corporation
Ultimate Bulletin BoardTM 6.1.0.2