Empire !

Ask us to port a specific application.

Empire !

Postby tiedeman » Sat Oct 13, 2001 6:27 pm

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.
tiedeman
 
Posts: 4
Joined: Sat Oct 13, 2001 7:00 pm
Location: Chicago, IL

Re: Empire !

Postby apex » Sun Oct 14, 2001 6:29 am

I spent some time working on this and I seem to have gotten as far as i can without some help also [img]images/icons/smile.gif"%20border="0[/img]

<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre>
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
</pre>[/quote]
(I added some line breaks to preserve the layout of this webpage)

Is this the same problem you are having?
I also get:
<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre>
ranlib /var/root/emp4/lib/liblwp.a
ranlib: file: /var/root/emp4/lib/liblwp.a(arch.o) has no symbols
</pre>[/quote]
which appears to be the reason it is not compiling correctly.

[ October 13, 2001: Message edited by: apex ]
apex
 
Posts: 355
Joined: Sun Aug 05, 2001 7:00 pm

Re: Empire !

Postby tiedeman » Mon Oct 22, 2001 5:01 am

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:
<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre>(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
</pre>[/quote]

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

compile errors:
<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre>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</pre>[/quote]

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:
<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre>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</pre>[/quote]

______
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..?
tiedeman
 
Posts: 4
Joined: Sat Oct 13, 2001 7:00 pm
Location: Chicago, IL

Re: Empire !

Postby apex » Mon Oct 22, 2001 8:13 am

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).
apex
 
Posts: 355
Joined: Sun Aug 05, 2001 7:00 pm

Re: Empire !

Postby tiedeman » Fri Oct 26, 2001 9:58 pm

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 ]
tiedeman
 
Posts: 4
Joined: Sat Oct 13, 2001 7:00 pm
Location: Chicago, IL

Re: Empire !

Postby tiedeman » Sat Oct 27, 2001 5:10 am

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!
tiedeman
 
Posts: 4
Joined: Sat Oct 13, 2001 7:00 pm
Location: Chicago, IL


Return to Requests

Who is online

Users browsing this forum: No registered users and 47 guests

cron