Author Topic: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)  (Read 10478 times)

Offline paven

  • Acquaintance
  • *
  • Posts: 20
    • View Profile
Hello all,

I was wondering if I could get some help on a project.
I'd like to get a modified 3.1.2 mudlib running on FluffOS-3 and need to know where to start.

I am running Ubuntu 10.04 LTS with all (I believe) of the packages needed (gcc-4.6 g++-4.6 libevent2.0)

I can run ./build-FluffOS and make, and make install - but I'm at a loss on what to do next?

I need to know where to unpack my mudlib, what port to connect to, etc...

Also, if anyone has done this, what things I should look for when trying to get it up and running.  I know some things won't work and will need to be recoded, or at least have a simul_efun coded for them, but anything that you can help with that is majorly different (like security or something) would be appreciated.

Thanks!

Paven

Offline FallenTree

  • BFF
  • ***
  • Posts: 484
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #1 on: August 22, 2013, 11:46:35 AM »
1. start with this: cp local_options.testrelease local_options.

2. after ./build.FluffOS and make, You should notice there is a binary called "driver" built.   Copy that to anywhere you like.

3. Then you need to create a config file, you can use the example from src/testsuite/etc/config.test,  the options in that file are self-expliantory,  just change the mudlib directory, port , and log directory etc.

4. Then try running your lib through  ./driver config -d, and observe what is going on. 

5. From there, read carefully the output,  it will likely complain master_ob is not loadable, then go through the mudlib log directory to see what errors they are, and try to fix them.  wipe the log directory and start again.

6. If you are stuck with any particular syntax error, post here and people can help you if you need to tweak any of the local_options.

Offline paven

  • Acquaintance
  • *
  • Posts: 20
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #2 on: August 22, 2013, 03:12:57 PM »
When I get to the .build-FluffOS part, it errors on ....

...
checking for library containing gzread... -lz
checking for library containing pthread_create... -lpthread
checking for library containing timer_create... -lrt
checking for library containing iconv_open... none required
checking for library containing libiconv_open... no
checking for mysql_config... /usr/bin/mysql_config
checking for pg_config... no
configure: error:  does not exist or it is not an exectuable file


Offline FallenTree

  • BFF
  • ***
  • Posts: 484
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #3 on: August 22, 2013, 03:19:46 PM »
my fault, default test local_options needs several sql library to compile, try use this as your local_options

#include "options.h"

#define NONINTERACTIVE_STDERR_WRITE
#define NO_LIGHT
#undef NO_ADD_ACTION
#undef NO_SNOOP
#undef NO_ENVIRONMENT
#undef NO_WIZARDS
#define POSIX_TIMERS

Offline paven

  • Acquaintance
  • *
  • Posts: 20
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #4 on: August 22, 2013, 04:41:49 PM »
Okay, getting much further now, at least I'm into troubleshooting master and simul_efuns  :)

Now it's erroring on a simul_efun that is using the following....

syntax error before ) {

...
varargs string <function> ( string str, string st2) {
...

Offline FallenTree

  • BFF
  • ***
  • Posts: 484
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #5 on: August 22, 2013, 05:04:43 PM »
why is it <function> ? that is how it is written in the code?   You could try set #define COMPAT_32 first. If not, please paste full file so I can tell you how it is suppose to be written.

You can also look similar file in src/testsuite/

Offline paven

  • Acquaintance
  • *
  • Posts: 20
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #6 on: August 22, 2013, 05:52:56 PM »
No, it's not <function> in the code, I just left out the function name.  Full code is as follows - #define COMPAT_32 didn't seem to make a difference..

Code: [Select]
string user_path(string name);
static string eliminate_ellipsis(string path);

#pragma strict_types
#pragma save_types

/*
// eliminate_ellipsis removes any occurences of .. from a path.
*/
static string
eliminate_ellipsis(string path) {
  int i;
  string *tmp;

  if(!path) return 0;
  tmp = explode(path,"/");
  if (!tmp)
    return "/";
  for (i = 0; i < sizeof(tmp); i++) {
    if (tmp[i] == "..") {
      if (sizeof(tmp) > 2) {
        tmp = tmp[0..(i-2)] + tmp[(i+1)..(sizeof(tmp)-1)];
        i -= 2;
      } else {
        tmp = tmp[2 ..(sizeof(tmp)-1)];
        i = 0;
      }
    }
    if (tmp[i] == ".") {
      tmp = tmp[0..(i - 1)] + tmp[(i + 1)..(sizeof(tmp) - 1)];
      i -= 1;
    }
  }
  path = "/" + implode(tmp, "/");
  if (path == "//")
    path = "/";

  if(path) {
    string haldo;
    if (sscanf(path, "//%s", haldo) == 1)
       path = "/"+haldo;
  }
  return path;
}
string
user_path(string name) {
  if (!name)
    return "";
  return eliminate_ellipsis("/players/" + name);
}

varargs string
resolv_path(string curr, string new) {
  string t1;

  if(!stringp(curr)) return "";
  if(this_player() && (int)this_player()->query_level() < 21)
  {
    write("curr: "+curr+"\n");
    return curr;
 }
  if (curr[strlen(curr) - 1] == '/')
    curr = curr[0..strlen(curr) - 2];
  if (!new || new == ".")
    return eliminate_ellipsis(curr);
  if (new == "here") {
#ifndef __LDMUD__
    return "/" + file_name(environment(this_player())) + ".c";
#else
    return "/" + object_name(environment(this_player())) + ".c";
#endif
  }
  if (new == "~" || new == "~/" )
    return user_path((string)this_player()->query_real_name());
  if (sscanf(new,"~/%s",t1))
    return user_path((string)this_player()->query_real_name() +
      "/" + t1);
  else if (sscanf(new,"~%s",t1))
    return user_path(t1);
  else if (new[0] != '/')
    new = curr + "/" + new;
  return eliminate_ellipsis(new);
}
« Last Edit: August 22, 2013, 05:56:20 PM by paven »

Offline FallenTree

  • BFF
  • ***
  • Posts: 484
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #7 on: August 22, 2013, 05:55:10 PM »
have you tried make it
Code: [Select]
varargs string resolv_path(string curr, string new) {
  string t1;
...
...
}
?

Offline paven

  • Acquaintance
  • *
  • Posts: 20
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #8 on: August 22, 2013, 06:23:14 PM »
Yeah, I did a 'make clean' - then ./build.FluffOS - then make - then copied driver executable out again and used it.

And yes, I did try and change it to a single line.

Here's my local_options file so far as well

Code: [Select]
#include "options.h"

#define NONINTERACTIVE_STDERR_WRITE
#define NO_LIGHT
#undef NO_ADD_ACTION
#undef NO_SNOOP
#undef NO_ENVIRONMENT
#undef NO_WIZARDS
#define POSIX_TIMERS
#undef SENSIBLE_MODIFIERS
#define COMPAT_32
« Last Edit: August 22, 2013, 06:24:46 PM by paven »

Offline FallenTree

  • BFF
  • ***
  • Posts: 484
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #9 on: August 22, 2013, 06:34:17 PM »
you misunderstood, i am saying, have you tried to make your function definition online?

Also, is that the *only* error you get? 

Offline FallenTree

  • BFF
  • ***
  • Posts: 484
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #10 on: August 22, 2013, 06:34:56 PM »
it should be "one line"

varargs string resolv_path(string curr, string new) {

Offline paven

  • Acquaintance
  • *
  • Posts: 20
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #11 on: August 22, 2013, 06:46:32 PM »
Yeah, it's one line.  Here's the output

Code: [Select]
root@loafy:/home/fluffos/mud/bin# ./driver config -d
WARNING: rlimit for core dump is 0, you will not get core on crash.
using config file: config
Initializing internal tables....
----------------------------------------------------------------------------
Mud (FluffOS v3.0-alpha7.3) starting up on Linux - Thu Aug 22 19:45:12 2013


Event backend in use: epoll
/obj/simul_efun/resolv_path.c line 63: syntax error before ) {
No error handler for error: *Error in loading object '/obj/simul_efun/resolv_path'
program: (none), object: (none), file: (none)
The simul_efun (/obj/simul_efun) and master (/obj/master) objects must be loadable.


Offline FallenTree

  • BFF
  • ***
  • Posts: 484
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #12 on: August 22, 2013, 08:57:38 PM »
Hehe, i figured it out.  "new" is a keyword in fluffos apparently, just name it something else and you would be fine.

Offline paven

  • Acquaintance
  • *
  • Posts: 20
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #13 on: August 22, 2013, 09:02:53 PM »
Heh, great.  I wonder how often 'new' is used in the mudlib code.....

Thanks!

Offline FallenTree

  • BFF
  • ***
  • Posts: 484
    • View Profile
Re: Amylaar/LPmud 3.1.2 modified mudlib on FluffOS3.0 (latest build alpha)
« Reply #14 on: August 22, 2013, 09:03:53 PM »
you should #undef COMPAT_32 if you lib can run without it.