[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  SimpleMud/BetterMud

SimpleMud/BetterMud

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Trask   Australia  (23 posts)  [Biography] bio
Date Sun 23 Aug 2009 10:47 AM (UTC)
Message
Hi all,

Out of curiosity, did anyone manage to compile either SimpleMud or BetterMud after all those compile errors?

Although I'm happy with using Nicks TinyMud Server, which I'm having a lot of fun with, I thought it might be easier to read through the book and follow examples, if I could actually get it to compile.

Thanks very much
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 24 Aug 2009 09:55 PM (UTC)
Message
I had a look at my copy, and under Ubuntu 8.10 it seems to give a lot of compile errors. I think it used to work under earlier versions of g++, they must have tightened up the template code.

My comments from the previous thread mentioned spending "most of the day" trying to fix them, without success, so I am not all that enthusiastic about trying again.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Trask   Australia  (23 posts)  [Biography] bio
Date Reply #2 on Tue 25 Aug 2009 02:02 AM (UTC)
Message
Completely understandable Nick,

At the end of that discussion Robert Powell mentioned fixing the source code, and re-releasing it. This thread was to see if he, or anyone else had undertaken that task successfully.

Thanks for the reply
[Go to top] top

Posted by Robert Powell   Australia  (367 posts)  [Biography] bio
Date Reply #3 on Sun 30 Aug 2009 04:49 AM (UTC)
Message
At one point i did have both working using newer compilers and newer python, however, over the intervening years i have lost or misplaced the disks that contained that code.

About the only thing i could recommend is installing gcc 2.96 and python 2.2, its about the only way to make it work with minimal hair pulling.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
[Go to top] top

Posted by Spartacus   (3 posts)  [Biography] bio
Date Reply #4 on Tue 01 Sep 2009 01:15 AM (UTC)
Message
Hey,

As luck would have it I was googling for information on Simple and Better mud when I came across this post.

I've currently been trying to bug fix the Better Mud and (I think!) am almost there.

At the moment I am trying to make it work with Python 2.6 but get the error messages below when running "make link"

If I get assistance to get it working I would be more then willing to share the results with members of the forum.

Many thanks.


make link
g++ -I/usr/include/python2.6 -I../Libraries -Xlinker -export-dynamic *.o /usr/lib/python2.6/config/libpython2.6.a -lpthread -ldl -lutil
/usr/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_tmpnam':
(.text+0x7ca): warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function `posix_tempnam':
(.text+0x8cf): warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_decompressobj':
(.text+0x322): undefined reference to `inflateInit2_'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_decompress':
(.text+0x4e8): undefined reference to `inflateInit2_'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_decompress':
(.text+0x4ff): undefined reference to `inflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_decompress':
(.text+0x573): undefined reference to `inflate'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_decompress':
(.text+0x5a9): undefined reference to `inflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_decompress':
(.text+0x626): undefined reference to `inflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_decompress':
(.text+0x6ba): undefined reference to `inflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_decompress':
(.text+0x72d): undefined reference to `inflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_crc32':
(.text+0x7c0): undefined reference to `crc32'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_compressobj':
(.text+0x8b6): undefined reference to `deflateInit2_'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_compress':
(.text+0xa83): undefined reference to `deflateInit_'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_compress':
(.text+0xab1): undefined reference to `deflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_compress':
(.text+0xb0b): undefined reference to `deflate'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_compress':
(.text+0xb58): undefined reference to `deflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_compress':
(.text+0xba4): undefined reference to `deflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_adler32':
(.text+0xcc0): undefined reference to `adler32'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_unflush':
(.text+0xe74): undefined reference to `inflate'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_unflush':
(.text+0xf4f): undefined reference to `inflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_objdecompress':
(.text+0x10c5): undefined reference to `inflate'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_objdecompress':
(.text+0x1155): undefined reference to `inflate'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_flush':
(.text+0x1465): undefined reference to `deflate'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_flush':
(.text+0x14c5): undefined reference to `deflate'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_flush':
(.text+0x15f7): undefined reference to `deflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_objcompress':
(.text+0x172b): undefined reference to `deflate'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_objcompress':
(.text+0x178e): undefined reference to `deflate'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `Decomp_dealloc':
(.text+0x18d7): undefined reference to `inflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `Comp_dealloc':
(.text+0x1957): undefined reference to `deflateEnd'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_copy':
(.text+0x1a09): undefined reference to `deflateCopy'
/usr/lib/python2.6/config/libpython2.6.a(zlibmodule.o): In function `PyZlib_uncopy':
(.text+0x1bf9): undefined reference to `inflateCopy'
collect2: ld returned 1 exit status
make: *** [link] Error 1
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Tue 01 Sep 2009 02:48 AM (UTC)
Message
Looks like it isn't linking against the zlib library.

Check the makefile, you may need to add -lz on the line that does the linking. Also make sure you installed the zlib library.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Spartacus   (3 posts)  [Biography] bio
Date Reply #6 on Tue 01 Sep 2009 09:36 AM (UTC)
Message
Thanks for the help!

I needed to install zlibg1-dev and use the -lz flag. Once I'd done that (and made the slight edit for socket connections you added in the post from ages ago) it worked fine.

If Trask or anyone else wants a copy of the code just say.
[Go to top] top

Posted by Robert Powell   Australia  (367 posts)  [Biography] bio
Date Reply #7 on Wed 02 Sep 2009 12:26 AM (UTC)
Message
Yeah toss a copy up somewhere so we can dl it, it would be fun to play with it again from time to time when i am bored of other things, if you dont have a webserver, email it to me and i will put it on mine with a link from this thread.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
[Go to top] top

Posted by Spartacus   (3 posts)  [Biography] bio
Date Reply #8 on Mon 07 Sep 2009 09:53 AM (UTC)
Message
I'll email it to you.

There is also one other bug in the code that I haven't had a chance to find yet, where randomly it will stop you from walking.
[Go to top] top

Posted by Robert Powell   Australia  (367 posts)  [Biography] bio
Date Reply #9 on Tue 08 Sep 2009 10:48 PM (UTC)
Message
eldhamud at gmail dot com i will be a way for a few days on a field trip, when i get back i will put this on my webserver and link to it from where just incase someone wanders in here in another 2 years looking for it LOL>

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
[Go to top] top

Posted by Mikewolfgkd   (1 post)  [Biography] bio
Date Reply #10 on Wed 02 Dec 2009 08:25 AM (UTC)
Message
simpleMud:
modify file, entitydatabase.h

typedef std::map<entityid, datatype> container;

to:

typedef typename std::map<entityid, datatype> container;


iterator( const container::iterator& p_itr ) // copy constructor
{
container::iterator& itr = *this; // also needed because VC6 sucks
itr = p_itr;
}

to:
iterator( const typename container::iterator& p_itr ) // copy constructor
{
container::iterator& itr = *this; // also needed because VC6 sucks
itr = p_itr;
}
[Go to top] top

Posted by Dr_who   (5 posts)  [Biography] bio
Date Reply #11 on Sat 26 Mar 2011 03:33 AM (UTC)
Message
I have a copy of the book, and I am trying to compile simplemud. I made the typename changes listed in the above post. However, I had to add an additional typename:


// internal iterator
typedef std::vector<datatype>::iterator iterator;

to 

// internal iterator
typedef typename std::vector<datatype>::iterator iterator;



to get it to compile, although it does compile with warnings.

Simplemud runs fine up until the gameloop::PerformRegen() is called which calls the following routine in enemydatabase.cpp


void EnemyDatabase::Create( entityid p_template, room p_room )
{
    entityid id = FindOpenID();
    Enemy& e = m_map[id];

    e.ID() = id;
    e.LoadTemplate( p_template );
    e.CurrentRoom() = p_room;

    p_room->AddEnemy( id );
}


When the first line of Create() tries to set the value of id by calling FindOpenID() the server crashes. According to c++.net 2008 it appears to be trying to set the value of id to 3435973836 and it finally says something about map/set being undereferanceable.

entityid is defined as an unsigned int. So, I'm guessing that the variable simply isn't large enough for the value trying to be assigned to it. I'm still not very fluent in c++ but that's my guess.

If anyone can help, I would appreciate it.

I've been trying to stick to simplemud since I haven't even begun learning python yet.

On a side note: I did find a copy of bettermud that someone got to compile at...

https://briandamaged.org/blog/?p=412
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #12 on Sat 26 Mar 2011 05:31 AM (UTC)
Message
No, that would truncate it, not crash.

I can't even get it to compile. I suspect that his use of templates isn't supported by gcc, which is what I am trying to use.

If I could compile it, I would use gdb. You could still try that:

http://www.gammon.com.au/gdb

Run it under gdb and see what various variables are when it crashes.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


38,321 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]