03 Feb, 2010, erpelchen wrote in the 1st comment:
Votes: 0
Hi all, I've spent many years as a player in a mud derived from dalemud. My knowledges in UNIX environment and C programming are instead very limited… actually almost all I know is what I discovered searching the web in the last 3 days.

Having downloaded dalemud-3.0-cygwin available in this website, I've tried to compile it in a new cygwin 1.7.1 environment.
After creating a new directory called "dalemud", and using tar (tar -zxvf dalemud-3.0-cygwin.gz), I moved to src directory and launched make. Immediately it stopped saying
cc1: error: unrecognized line option "-m486"
make: *** [comm.o] Error 1

After searching the web, I replaced in the makefile (using nano editor) -m486 with -mtune=i486.
I launched make again. This time it went on a little bit longer, then stopped again with 2 errors:

actact.off.c: In function 'do_fire':
act.off.c:1841: error: lvalue required as left operand of assignment
act.off.c: In function 'do_throw':
act.off.c:1907: error: lvalue required as left operand of assignment
make: *** [act.off.o] Error 1

Then, reading the forum, and in particular the topic "help running sillymuyd" I came up with the idea of using gcc-3 instead of gcc-4.
So, I made a new installation, and replaced (using nano) in the makefile, CC=gcc with CC=gcc-3.
Then, I launched make and it compiled.
Then I launched ./dmserver to run the server, and it gave me the following error:

$ ./dmserver
Wed Feb 3 11:27:04 2010 :: Running game on port 4000.
chdir: No such file or directory
assertion "0" failed: file "comm.c", line 327, function: main
Aborted (core dumped)

"chdir" is an empty directory initially created when using tar, at the same level as "src", "lib" and "doc" directory.

line 327 in comm.c is:

sprintf(buf, "Running game on port %d.", mud_port);
log_string(buf);

if (chdir(dir) < 0) {
perror("chdir");
assert(0); <—- line 327
}

I'll be obliged for any help you'll be able to provide me with.

Erpelchen
03 Feb, 2010, Kjwah wrote in the 2nd comment:
Votes: 0
You might want to look at what DFLT_DIR is pointing to. Depending on where your lib directory is you should just need to change DFLT_DIR in db.h from:

#define DFLT_DIR          "lib"           /* default data directory     */


to

#define DFLT_DIR          "../lib"           /* default data directory     */


The only problem with this is if you start using a startup script from the MUDs root directory, you may need to change it back to what it is now or to "./lib"
03 Feb, 2010, erpelchen wrote in the 3rd comment:
Votes: 0
Dear Kjwah,

I've changed the DFLT_DIR as suggested and it worked!

Many thanks for your help!

Erpelchen
13 Feb, 2010, erpelchen wrote in the 4th comment:
Votes: 0
Hello,

after a couple of weeks of use, I'd like to report the main issues I've found with dalemud-3.0-cygwin.
Just as a remind, to run under a new cygwin 1.7.1. environment, the file available in the code repository has needed only two modifications:
1. in the makefile replace CC=gcc with CC=gcc-3
2. in db.h change DFLT_DIR from "lib" into "../lib"

Unfortunately the mud crashes often with a segmentation fault. Very often, it happens after a kill. For example, when one inizializes Moria zone, it crushes after some time when an NPC kills another NPC. But it may happens killing different mobs in different zones.

Second issue is that the equipment is never saved after renting in the reception. Moreover the mud crushes whenever one, after renting, chooses the option 0:
0) Exit from Shadowdale Mud.
1) Enter the game at Shadowdale
With option 1 (so, re-entering the game after renting) the mud doesn't crash, but the character has no equip.
Thanks in advance for any help and idea you'll be able to provide.

Erpelchen
14 Feb, 2010, jurdendurden wrote in the 5th comment:
Votes: 0
On issue one, I suggest running the mud under GDB, this is a very powerful debugger and the info for running/using it can be found here.

As for issue #2, could you dig through and post your function for saving rented eq? (Not sure how it works right off hand, but any function regarding saving rented eq I believe would be a good start).
14 Feb, 2010, erpelchen wrote in the 6th comment:
Votes: 0
many thanks for the suggestion and for the link!

jurdendurden said:
On issue one, I suggest running the mud under GDB, this is a very powerful debugger and the info for running/using it can be found here.

As for issue #2, could you dig through and post your function for saving rented eq? (Not sure how it works right off hand, but any function regarding saving rented eq I believe would be a good start).
15 Feb, 2010, erpelchen wrote in the 7th comment:
Votes: 0
Hello, unfortunately adapting GDB to run properly with dalemud is a task beyond my current knowledges…. but I'm learning :)

With regard to the crash when trying to rent objects (I've got the impression - or the hope - that solving this issue can make me understand also all the other sources of crashes), I think all the related functions are in the file "reception.c" in the "src" directory.
It'd be too long to copy it all here, but it's available in the Code Repository section.
I've noticed that the file "pcobjs.obj" is an empty file in the "lib" directory. It's always been empty, since the mud crashes each time I try to rent.

Mon Feb 15 12:19:39 2010 :: [3014] Erpel:kill gua
Mon Feb 15 12:19:44 2010 :: [3014] Erpel:ge all cor
Mon Feb 15 12:19:50 2010 :: [3014] Erpel:wea all
Mon Feb 15 12:19:52 2010 :: [3014] Erpel:eq
Mon Feb 15 12:19:54 2010 :: [3014] Erpel:n
Mon Feb 15 12:19:55 2010 :: [3005] Erpel:e
Mon Feb 15 12:19:56 2010 :: [3006] Erpel:u
(now I've used the command "offer", that works fine, but for some reason it's not logged)
Mon Feb 15 12:20:26 2010 :: [3008] Erpel:score
(now I type "rent", obtainig –>) Mon Feb 15 12:20:41 2010 :: Saving Erpel:100100
(now I type "0" - it's the option for exiting - causing the mud to crush)
Mon Feb 15 12:20:58 2010 :: Losing player: Erpel.
Segmentation fault (core dumped)

Maybe it has something to do with the fact of having modified the DFLT_DIR in db.h… but it's just a hypothesis.
Kind regards,
Erpelchen

jurdendurden said:
On issue one, I suggest running the mud under GDB, this is a very powerful debugger and the info for running/using it can be found here.

As for issue #2, could you dig through and post your function for saving rented eq? (Not sure how it works right off hand, but any function regarding saving rented eq I believe would be a good start).
15 Feb, 2010, Tyche wrote in the 8th comment:
Votes: 0
erpelchen said:
I've noticed that the file "pcobjs.obj" is an empty file in the "lib" directory. It's always been empty, since the mud crashes each time I try to rent.


The only thing I can think of to suggest is making sure that "pcobjs.obj" includes write permissions.

$ ls -la pcobjs.obj
-rw-r–r–+ 1 Guest None 0 1996-12-26 13:29 pcobjs.obj

If there isn't a 'w' flag there, set it with:
$ chmod u+w pcobjs.obj

I'm pretty sure DaleMud is chock full bugs, so you're going to have to become familiar with gdb anyway.
15 Feb, 2010, erpelchen wrote in the 9th comment:
Votes: 0
Yes, I'm following your suggestions and trying to get familiar with both C programming and UNIX environment.

Unfortunately the mud in which I played was a derivative from dalemud, so I 'm afraid I'll have to become very familiar with debug programs :)

I think that the permission with pcobjs.obj were already ok:
$ ls -la pcobjs.obj
-rwxr-x— 1 Tierchen None 1 1994-01-04 00:30 pcobjs.obj

Thanks, kind regards,
Erpelchen



Tyche said:
erpelchen said:
I've noticed that the file "pcobjs.obj" is an empty file in the "lib" directory. It's always been empty, since the mud crashes each time I try to rent.


The only thing I can think of to suggest is making sure that "pcobjs.obj" includes write permissions.

$ ls -la pcobjs.obj
-rw-r–r–+ 1 Guest None 0 1996-12-26 13:29 pcobjs.obj

If there isn't a 'w' flag there, set it with:
$ chmod u+w pcobjs.obj

I'm pretty sure DaleMud is chock full bugs, so you're going to have to become familiar with gdb anyway.
0.0/9