Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 10-20-2012, 11:10 PM   #1
SelfCoded
New Member
 
Join Date: Oct 2012
Posts: 11
SelfCoded is on a distinguished road
Need help with RPI-Engine

https://github.com/Shadows-of-Isildur/RPI-Engine
Trying the readme on that site.

I'm not sure if I edited the makefile or zone_files.sh correctly. Up to this point the instructions seemed fairly specific, but "look over the makefile in /src and make any changes as needed for your system. Also, make certain that the location of bash is correct in generic/regions/zone_files.sh" was a lot more vague.

I'm ssh'ing to a remote hostmonster server running a 64 linux, if that makes a difference. Hopefully hosting a mud is something that I can do on it if I try hard enough.

This is what happens when I type make

g++ -c -DLINUX -ggdb -w -m64 account.cpp
(etc etc etc etc)
g++ -c -DLINUX -ggdb -w -m64 server.cpp
if test -f ../bin || install -v -d ../bin; then \
g++ -I/usr/local/mysql/include/ -I/usr/include/mysql/ -I/usr/include/openssl/ -I /usr/local/mysql/ -L/Library/ -L/usr/lib/ -L/usr/local/mysql/lib/ -L/usr/lib/ - L/usr/local/mysql/lib/ -o ../bin/server -lz -lmysqlclient -DLINUX -ggdb -w -m64 account.o act.comm.o act.informative.o act.movement.o act.offensive.o act.other .o arena.o auctions.o clan.o comm.o commands.o commerce.o constants.o control.o crafts.o create_mobile.o creation.o db.o destruction.o dwellings.o edit.o employ ment.o fight.o group.o guest.o guides.o handler.o hash.o item_card.o item_tossab le.o limits.o magic.o mobact.o mobprogs.o mysql.o nanny.o net_link.o object_dama ge.o objects.o olc.o perception.o psionics.o roles.o roomprogs.o save.o somatics .o staff.o transformation.o utility.o weather.o wounds.o server.o ; fi
/usr/bin/ld: skipping incompatible /usr/lib//libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib//libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib//libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib//libc.so when searching for -lc
make[1]: Leaving directory `/home2/name/public_html/mud/development/name/rpi-server/pp/src'

I'm not sure if those skipping messages are critical or not. I have a server under the bin folder now, so at least that partially worked.

I ran ./start-server pp, it had issues, asking if I've ran make install yet. So...
Make install yields this
echo "Installing MySQL Databases\nPlease enter your root password:\n"
Installing MySQL Databases\nPlease enter your root password:\n
/usr/local/mysql/bin/mysql --user=root mysql -p < init.sql
/bin/sh: /usr/local/mysql/bin/mysql: No such file or directory
make[1]: *** [install-mysql] Error 127
make[1]: Leaving directory `/home2/name/public_html/mud/development/name/rpi-server/pp/generic/sql'
make: *** [install-mysql] Error 2

That directory doesn't exist, it's true.
In the file Makefile located in the src directory, there are two lines which I'm not sure what to do with.

INCLUDE = -I/usr/local/mysql/include/ -I/usr/include/mysql/ -I/usr/include/openssl/ -I/usr/local/mysql/

LIBDIRS = -L/Library/ -L/usr/lib/ -L/usr/local/mysql/lib/ -L/usr/lib/ -L/usr/local/mysql/lib/

The only directory under /usr/local/ is bin.

Here is everything under /usr/
X11R6@ bin@ include@ java@ kerberos@ lib@ lib64@ libexec@ local/ man@ php@ sbin@ share@ tmp@

... and /
bin@ dev@ etc/ home@ home2/ lib@ lib64@ opt@ proc/ ramdisk/ root/ sbin@ tmp@ usr/ var/

So far I've seen mysql scattered about in various places, but I'm really not sure which ones are the ones I want to point that makefile towards. Since the mySQL databases were created using Cpanel, I'm not really sure what their deal is. Please help this C/C++ linux noob =(

Edit: Just found this. "create the database's tables either via phpMyAdmin, MySQL software or use an online PHP or Perl script." Actually, maybe I didn't get the database stuff done with MySQL after all.

Last edited by SelfCoded : 10-21-2012 at 02:09 AM.
SelfCoded is offline   Reply With Quote
Old 10-21-2012, 02:34 PM   #2
dentin
Member
 
Join Date: Apr 2008
Home MUD: Alter Aeon
Posts: 245
dentin is on a distinguished road
Re: Need help with RPI-Engine

There's also the question of whether or not you've got mysql installed and running on the system, or if it's installed in the same place that your scripts are looking for it. On my system for example, mysql doesn't live in /usr/local, and apparently it doesn't on yours either:

/bin/sh: /usr/local/mysql/bin/mysql: No such file or directory

Good luck.

-dentin

Alter Aeon MUD
http://www.alteraeon.com
dentin is offline   Reply With Quote
Old 10-21-2012, 03:49 PM   #3
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Need help with RPI-Engine

Well, here's the thing:

Make any changes as needed for your system means just that. They don't know what your system is, so you have to make the required changes for them. There's a few things around with autoconfigure scripts and such, but it sounds like yours doesn't have one. Those are most common in the lpmud scene, and I've not seen them outside that much.

Unfortunately, make any changes as needed for your system also assumes you know enough linux to figure out what needs changing.

For errors you don't understand, I'd google them. .so file related errors are important, or so I should think; a .so file is kind of like a .dll on windows. I'd find out which .so files are being skipped. You may or may not be fine, but I'd still make sure I know what they're for.
camlorn is offline   Reply With Quote
Old 10-21-2012, 06:04 PM   #4
SelfCoded
New Member
 
Join Date: Oct 2012
Posts: 11
SelfCoded is on a distinguished road
Re: Need help with RPI-Engine

Thanks for the replies. I'll look into those .so files. When I tried compiling the makefile for the very first time, it wouldn't compile at all because I had an incompatible 32 lib file. So I altered a file so it would compile using -m64 instead of -m32. I'm betting that it doesn't like that it's still being pointed towards some 32 libs (anything under /usr/lib would be 32, right?) since it's compiling for 64? I'll try changing that later and I'll post the results.
While I do have enough experience with Linux to use it as a normal desktop or something, I'm still kind of noob, so that combined with working with a remote server which doesn't follow the typical user layouts described in the guide leaves me pretty confused. Also, I have no experience with MySQL whatsoever. The good news is that I'm stubborn and willing to learn

As I said, I have setup the databases and user stuff for MySQL in Cpanel at least. I've looked into it a bit more and I think that bit I posted about making tables and PHP is about accessing the server remotely, which isn't something I need to do. And I've seen MySQL in different directories, I'm just not sure which are the equivalent to the ones in the makefile.

Take this line in the makefile for example.
INCLUDE = -I/usr/local/mysql/include/ -I/usr/include/mysql/ -I/usr/include/openssl/ -I/usr/local/mysql/

The only thing under local is bin (which does have a MySQL file in it, but not a MySQL directory).

/usr/include does have a MySQL directory, so hopefully that's fine. I wouldn't know what to point -I/usr/local/mysql/include/ too, however. Since /usr/include is already being pointed to, I would think that it must provide something different from what -I/usr/local/mysql/include wants.

All directories under /usr/ that either have a MySQL file or MySQL directory
/usr/bin/
/usr/local/bin
/usr/sbin/
/usr/include/mysql
/usr/lib64/mysql/
/usr/share/mysql/


And there's still this line to worry about, too.
LIBDIRS = -L/Library/ -L/usr/lib/ -L/usr/local/mysql/lib/ -L/usr/lib/ -L/usr/local/mysql/lib/

I have no idea what to do about -L/Library/

Last edited by SelfCoded : 10-21-2012 at 06:53 PM. Reason: /usr/include/ should have been /usr/include/mysql
SelfCoded is offline   Reply With Quote
Old 10-21-2012, 06:46 PM   #5
SelfCoded
New Member
 
Join Date: Oct 2012
Posts: 11
SelfCoded is on a distinguished road
Re: Need help with RPI-Engine

Changing the /usr/lib to /usr/lib64 in both places fixed the .so stuff.

This,
if test -f ../bin || install -v -d ../bin; then \
g++ -I/usr/local/mysql/include/ -I/usr/include/mysql/ -I/usr/include/openssl/ -I /usr/local/mysql/ -L/Library/ -L/usr/lib/ -L/usr/local/mysql/lib/ -L/usr/lib/ - L/usr/local/mysql/lib/ -o ../bin/server -lz -lmysqlclient -DLINUX -ggdb -w -m64 account.o act.comm.o act.informative.o act.movement.o act.offensive.o act.other .o arena.o auctions.o clan.o comm.o commands.o commerce.o constants.o control.o crafts.o create_mobile.o creation.o db.o destruction.o dwellings.o edit.o employ ment.o fight.o group.o guest.o guides.o handler.o hash.o item_card.o item_tossab le.o limits.o magic.o mobact.o mobprogs.o mysql.o nanny.o net_link.o object_dama ge.o objects.o olc.o perception.o psionics.o roles.o roomprogs.o save.o somatics .o staff.o transformation.o utility.o weather.o wounds.o server.o ; fi
/usr/bin/ld: skipping incompatible /usr/lib//libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib//libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib//libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib//libc.so when searching for -lc

is now this:
if test -f ../bin || install -v -d ../bin; then \
g++ -I/usr/local/mysql/include/ -I/usr/include/mysql/ -I/usr/include/openssl/ -I/usr/local/mysql/ -L/Library/ -L/usr/lib64/ -L/usr/local/mysql/lib/ -L/usr/lib64/ -L/usr/local/mysql/lib/ -o ../bin/server -lz -lmysqlclient -DLINUX -ggdb -w -m64 account.o act.comm.o act.informative.o act.movement.o act.offensive.o act.other.o arena.o auctions.o clan.o comm.o commands.o commerce.o constants.o control.o crafts.o create_mobile.o creation.o db.o destruction.o dwellings.o edit.o employment.o fight.o group.o guest.o guides.o handler.o hash.o item_card.o item_tossable.o limits.o magic.o mobact.o mobprogs.o mysql.o nanny.o net_link.o object_damage.o objects.o olc.o perception.o psionics.o roles.o roomprogs.o save.o somatics.o staff.o transformation.o utility.o weather.o wounds.o server.o ; fi
install: creating directory `../bin'
make[1]: Leaving directory `/home2/name/public_html/mud/development/name/rpi-server/pp/src'

Woot! Progress. Naturally, I got the same errors when trying to start the server, though. Need to figure those two lines out. I'm pretty sure the server is using Red Hat linux, if that makes things easier to assess.

Last edited by SelfCoded : 10-21-2012 at 07:26 PM. Reason: Needed to hide personal info
SelfCoded is offline   Reply With Quote
Old 10-21-2012, 08:53 PM   #6
SelfCoded
New Member
 
Join Date: Oct 2012
Posts: 11
SelfCoded is on a distinguished road
Re: Need help with RPI-Engine

... Figured that out. Maybe.
I get this after entering a MySQL password.
"ERROR 1067 (42000) at line 1021: Invalid default value for 'role_pop'"

No google luck yet, so I'm assuming that role_pop is a value for something specific to the rpi-engine for some reason somewhere. *eye twitch*


I'm bugging this on Git. At least I think I'm on the verge of getting this working. Just need to grep for role_pop and figure it out

I'm definitely going to post a guide on how to get this to work for Red Hat if I get it to.

Edit: I keep on running into error after error in init.sql. It's pretty weird, I'm not sure why. Others have been using this file, after all, so I don't know why others wouldn't have addressed all of the syntax errors I keep running into. Not all are syntax problems, like role_pop, but a lot of them are.

Last edited by SelfCoded : 10-21-2012 at 10:41 PM.
SelfCoded is offline   Reply With Quote
Old 10-22-2012, 09:05 PM   #7
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Need help with RPI-Engine

Well, it's like this:

Are you absolutely sure in every way absolutely that you are using the exact same version of mysql absolutely as the software is intended to use? Do note how much emphasis I've put on this...you might have multiple mysql installs, or maybe it wants a different sql implementation...etc. The problem with codebases that use a lot of technology is more spots for things to go wrong.

Also, if this is the engine from atonement, this is the first time I've heard of anyone using it; I'm not sure if we're talking about atonement's version or SoI's version.

Is your server a vps? Is it shared? If it's not a vps, you may need one, depending on a lot of things. You want sudo access if you don't know linux, as some mistakes are much easier to undo if you have it (chmod and chown I'm looking at you).

The thing is this: we can't really help without access to your system. The software may or may not be bugged, it's hard to tell from this end.

I believe different linux distros have slightly different path setups--that is, the defaul include/library paths for things are different. The thing about linux is this: it's a lot less standard than windows. Sure, some parts are standard, but there's at least 3 desktop environments and anyone who wants can make a distro. With package managers thrown in the mix, it's quite possible that it won't resemble those directions at all.

Compiling things for 64-bit that are written as 32-bit, depending on programming language, may cause problem. A lot of older mud software makes asumptions about bitfield widths and such that don't hold true for 64-bit. If the rpi-engine has any code like this in it, it'll crash and burn at some point because you're running it as 64-bit.

Good luck with this; if this is the engine I think it is, however, I don't think many people are using it. If the setup is this complicated, I'm not really sure why someone hasn't written an autoconfigure script of some sort. We are talking about the SoI engine?
camlorn is offline   Reply With Quote
Old 10-22-2012, 11:15 PM   #8
SelfCoded
New Member
 
Join Date: Oct 2012
Posts: 11
SelfCoded is on a distinguished road
Re: Need help with RPI-Engine

It's the SOI++ codebase (https://github.com/Shadows-of-Isildur/RPI-Engine). I got all of the path stuff figured out. I'm not 100% sure about MySQL compatibility, but there are a lot of syntax and bad tables in there that would give anyone trouble regardless of their version. Here's what someone told me on a different forum.

"Oh boy, way back to the original RPI++ engine from 2007. Unfortunately, the package available from github was not the best version. A snapshot was taken, and several coders put in 3 months of work on a branch to make it easier to install and run. But there was an issue with copyrights and credit notices, so those files were removed completely and a different snapshot was put up instead. You will notice that many files only have copyright notices from 2005, and some files have no notices at all.

End result is you are looking at a lot of work. The init.sql file you have is missing at least one table (for special roles), and there are a bunch of tables you don't need (related to setting up a phpbb 2.0 forum). You may find that some tables in other sql files, don't match the tables used by the code... Good luck. After you get this sql file working, then there are 2 or 3 more. "

So I guess the codebase I'm working on is a buggy version... Since I don't know SQL, I doubt that I'll be able to fix the bugs in them. I'll try getting my hands on the Atonement codebase. I guess I'll be able to figure out the config/makefile/directory/MySQL stuff quicker the second time around, eh?

The server is one I'm renting remotely from hostmonster. It's running Red Hat. I can't get sudo access on it, but I can do pretty much whatever I want within my server directory (like chmod) and I can still browse through the main server files via ssh.

Yeah, you're right about that 32 64 stuff. I got it to use 64-bit libs and compiled it for a 64 bit system, so hopefully as long as I remember to do that I think I'll be alright. I'll just be in trouble if it calls for a 32-lib that I can't substitute with a 64 one for some reason.

=D I'm not sure why someone hasn't wrote an autoconfigure script either.

Last edited by SelfCoded : 10-22-2012 at 11:20 PM.
SelfCoded is offline   Reply With Quote
Old 10-23-2012, 05:47 PM   #9
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Need help with RPI-Engine

Well, uh, no.

I'm not talking about libs. I'm talking about things like pointer addition. take the following.
int a[5];
int *x = a;
x = x + 4;
Depending on a whole bunch of things, x may now be pointing to a[1], or halfway between: if the compiler decides that int needs to be 64-bit, bad things happen. This may work, depending on compiler: you may now be pointing to the second half of a[0] and the first half of a[1].

My point is, if the original coders assumed that it would always only run on 32-bit, i.e. because there's code from before 64-bit was even an idea, bad things *may* happen. Have a look at older versions of ldmud for an example: they had to make a whole separate branch for 64-bit, and it still isn't done. *properly written* c++ will work, but since when are mud codebases properly written. Basically, who knows, but if it has any old code from diku, it probably will have an obscure bug related to this at some point.

Atonement rpi has a working distant descendant of the SoI codebase, but I think it's tuned for sci-fi. I don't know anything about it, at all.

Get a vps. Bhost.net has them for like $5 a month, and I know of at least one mud using them (epitaph, btw, by someone who worked on discworld for 10 years, and it'll be awsum when it opens). If you're going to go all out and try to get this working, get a vps and save yourself the headaches. If you know where to look, you can get them fairly cheaply; I know bhost is cheap and dentin likes either linode or bluemile, I can't remember which. Nowadays, it's easy to set this up; select linux distro and click go.
camlorn is offline   Reply With Quote
Old 10-24-2012, 01:09 PM   #10
dentin
Member
 
Join Date: Apr 2008
Home MUD: Alter Aeon
Posts: 245
dentin is on a distinguished road
Re: Need help with RPI-Engine

Actually Camlorn, the pointer rules are pretty strict on that one: x will always point at a[4] (pointer addition uses structure sizes.)

Did you mean instead:

char *y = (char *)a
y = y+4
int *x = (int *)y

That could put you in the middle of an integer on a 64 bit machine, and dereferencing x could give you an alignment exception depending on architecture type.

Regardless, I think your original point is made even more clear by this: pointers in C can be complicated and are poorly understood, often leading to catastrophic yet unobvious mistakes.

-dentin

Alter Aeon MUD
http://www.alteraeon.com
dentin is offline   Reply With Quote
Old 10-24-2012, 04:56 PM   #11
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: Need help with RPI-Engine

Well, yeah. or something like it. One of these days I'll read the official spec, but no one really needs to do that anymore (discounting for the moment the people who do). I mean, nowadays, the performance hit of using malloc/new is basically nothing.

But if you look back at diku and such, there's a lot of "hey, I know, let's grab a huge block of memory and implement our own because it's better/faster/whatever" going on. And then everything based off diku carries that forward, because no one wants to replace it. So yes, you have basically made my point for me, and I learned something new in the process.

But that code may be lying around, waiting to bite you when you least expect it. Be aware.
camlorn is offline   Reply With Quote
Old 10-25-2012, 07:27 PM   #12
realmsofvalor
New Member
 
realmsofvalor's Avatar
 
Join Date: Jul 2011
Posts: 22
realmsofvalor is on a distinguished road
Re: Need help with RPI-Engine

You can always use the mysql --version command to check the version number of the one running on your system - though I'd say your friend from another forum is correct about the code being a mess with database screwups and such.

For mysql work, I highly suggest you have phpmyadmin installed. It's a simple php that allows you to control the guts of your mysql databases & permissions on the fly, and has been a HUGE time-saver for me.

My suggestion is try to find a different distro of the code in question, attempt an install, and then compare and contrast files if you need to.
realmsofvalor is offline   Reply With Quote
Old 12-16-2012, 12:40 PM   #13
Black_Sands_MUD
New Member
 
Join Date: Jun 2008
Posts: 2
Black_Sands_MUD is on a distinguished road
Re: Need help with RPI-Engine

We run Argilla which is a verson from the shadows of isildur database and you should just know that a lot of things were fixed in it before SOI released their codebase - however, This codebase is a pain in the butt to get free of memory leaks and other things. I know, I've spent 5 years working on it and it's just now gotten to a stable point.
Black_Sands_MUD is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 06:31 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014