Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 1999 13:55:20 +0200
From:      Gianmarco Giovannelli <gmarco@giovannelli.it>
To:        hackers@freebsd.org
Subject:   Uox, Linux emul and missing things.
Message-ID:  <4.1.19990422133009.00b95d10@194.184.65.4>

next in thread | raw e-mail | index | archive | help

I know this msg can be a little off-topics here, but I really don't know
where it have to be posted. 

Here is the problem:
I am trying to make uox3 v69.03 (ultima online emulator) working on freebsd
too (it works on linux and Winslow).

But I find some problems:

First I try with the linux binary:
gmarco:/usr/local/gm/games/uo/uox.03# file uox3.linux
uox3.linux: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically
linked, not stripped
gmarco:/usr/local/gm/games/uo/uox.03# ./uox3.linux 
./uox3.linux: error in loading shared libraries
: undefined symbol: __register_frame_info

The begin is not so good. The linux binary refuses to work. I have Linux
lib 2.6.1 installed and the system is a 4.0-current (of today).

Trying to compile by myself it result in a waited result :

gmarco:/tmp/dev# gmake linux
gmake uox3 "EXE=uox3" "LIBS=-lm"
gmake[1]: Entering directory `/usr/tmp/dev'
gcc -c -w -funsigned-char -fconserve-space -O2  admin.cpp -o admin.o
gcc -c -w -funsigned-char -fconserve-space -O2  archive.cpp -o archive.o
gcc -c -w -funsigned-char -fconserve-space -O2  combat.cpp -o combat.o
gcc -c -w -funsigned-char -fconserve-space -O2  data.cpp -o data.o
gcc -c -w -funsigned-char -fconserve-space -O2  debug.cpp -o debug.o
gcc -c -w -funsigned-char -fconserve-space -O2  globals.cpp -o globals.o
gcc -c -w -funsigned-char -fconserve-space -O2  house.cpp -o house.o
gcc -c -w -funsigned-char -fconserve-space -O2  im.cpp -o im.o
gcc -c -w -funsigned-char -fconserve-space -O2  items.cpp -o items.o
gcc -c -w -funsigned-char -fconserve-space -O2  magic.cpp -o magic.o
gcc -c -w -funsigned-char -fconserve-space -O2  msgboard.cpp -o msgboard.o
gcc -c -w -funsigned-char -fconserve-space -O2  necro.cpp -o necro.o
gcc -c -w -funsigned-char -fconserve-space -O2  newbie.cpp -o newbie.o
gcc -c -w -funsigned-char -fconserve-space -O2  pointer.cpp -o pointer.o
gcc -c -w -funsigned-char -fconserve-space -O2  regions.cpp -o regions.o
gcc -c -w -funsigned-char -fconserve-space -O2  scriptc.cpp -o scriptc.o
gcc -c -w -funsigned-char -fconserve-space -O2  skills.cpp -o skills.o
gcc -c -w -funsigned-char -fconserve-space -O2  trigger.cpp -o trigger.o
gcc -c -w -funsigned-char -fconserve-space -O2  uox3.cpp -o uox3.o
gcc -c -w -funsigned-char -fconserve-space -O2  weight.cpp -o weight.o
gcc -c -w -funsigned-char -fconserve-space -O2  worldmain.cpp -o worldmain.o
gcc -o uox3  admin.o  archive.o  combat.o  data.o  debug.o  globals.o
house.o  im.o  items.o  magic.o  msgboard.o  necro.o  newbie.o  pointer.o
regions.o  scriptc.o  skills.o  trigger.o  uox3.o  weight.o  worldmain.o -lm
archive.o: In function `ArchiveID(char *)':
archive.o(.text+0x172): undefined reference to `_itoa'
archive.o(.text+0x1c1): undefined reference to `_itoa'
archive.o(.text+0x1ff): undefined reference to `_itoa'
archive.o(.text+0x23a): undefined reference to `_itoa'
archive.o(.text+0x273): undefined reference to `_itoa'

So let'g go to add this function to the file archive.cpp like Donald Burr
made for the v69.02.

void _itoa(char* dest, int num, int maxlen)
{
        char buf[80];

        sprintf(buf, "%d", num);
        strncpy(dest, buf, maxlen);
}

It compile and seems to work. But it's not true... it crashes after a few
seconds (technically when spawn some NPC :-)

UOX3: Startup Complete.
UOX3: Client 0 connected [Total:1].
UOX3: Client 1 connected [Total:2].
UOX3: Client 0 disconnected. [Total:1]
Floating exception (core dumped)


So I tried to change in this way:

#define _itoa(dest, num, maxlen) snprintf(dest, maxlen, "%d", num)

or 

void _itoa(char *dest, int num, int maxlen)
{
	snprintf(dest, maxlen, "%d", num);
}

But the result are the same...

Any hints ?



Best Regards,
Gianmarco Giovannelli ,  "Unix expert since yesterday"
http://www.giovannelli.it/~gmarco  
http://www2.masternet.it 





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.1.19990422133009.00b95d10>