home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / CONTRIB / MBASE / MBASE50.TAR / mbase / dox / trouble.dox < prev    next >
Encoding:
Text File  |  1992-10-28  |  7.5 KB  |  146 lines

  1. Troubleshooting Hints                                             MetalBase 5.0
  2. -------------------------------------------------------------------------------
  3.  
  4. Can't compile
  5.  - There are several options you can add to or remove from CFLAGS= in your
  6.    makefile.  stdinc.h will look at several compiler-generated settings to
  7.    determine your system type and choose defaults, but they may need to be
  8.    modified... standard machine definitions are:
  9.          -DAMIGA      - Amiga
  10.          -DNeXT       - NeXT
  11.          -DCOHERENT   - COHERENT
  12.          -DMSDOS      - Any MS-DOS compiler
  13.          -Dapplec     - Mac Programmer's Workshop
  14.          -Dsgi        - SGI
  15.          -DM_SYS3     - Xenix
  16.          -DM_SYS5     - Xenix
  17.          -DM_7        - Xenix
  18.    If you have a machine on the right, try adding the thing on the left to
  19.    CFLAGS and recompiling.  If that doesn't help, read on:
  20.  
  21.    There are several definitions which define how the code will be set up...
  22.    of them, -DSTRUCT_# isn't necessary unless you're compiling the library
  23.    itself:
  24.  
  25.       -STRUCT_#........MetalBase uses this to determine which structure-packing
  26.                        algorithm you're using; run STRUCT or STRUCT.EXE to find
  27.                        out.  It'll tell you what to do with this.
  28.  
  29.       -DLONGARGS.......If your machine screams about your prototypes, this may
  30.                        be the problem.  If you don't define this, odds are the
  31.                        prototypes MBASE will define will look like
  32.                              void main ();
  33.                        Define it, and you'll get
  34.                              void main (int, char **);
  35.  
  36.       -DSYS_FCNTL......If <fcntl.h> can't be found, try defining this--it'll
  37.                        move the search to <sys/fcntl.h>
  38.  
  39.       -DCHAR_IS_UNS....Most compilers define this if the default character type
  40.                        is unsigned; some may not.  Try this if you suspect a
  41.                        problem.
  42.  
  43.       -DNEED_ULONG.....Most machines don't have the type "ulong"; some do.  Try
  44.                        adding this if your compile freaks because of ulongs.
  45.  
  46.       -DNEED_USHORT....Parallel to "ulong"; this makes a typedef for ushort.
  47.  
  48.       -DNOVOIDPTR......Many older compilers still don't recognize "void *x;" as
  49.                        a valid instruction--define this to change those kind of
  50.                        declaration to "char *x;".
  51.  
  52.       -DNON_ANSI.......If you're not using VT emulation (ANSI.SYS counts as VT
  53.                        emulation; Amiga users have it built in to AmigaDOS),
  54.                        define this.  Just makes Build a little prettier.
  55.  
  56.       -DNOSYNC.........A few machines don't have fsync() or sync()--if you get
  57.                        either as an unresolved external, add this.  MS-DOS
  58.                        users: By default, stdinc.h tries some inline assembly.
  59.                        If you're not running MB programs under windows, just
  60.                        define this and it won't... otherwise, you may want to
  61.                        try to get that translated to whatever works for you.
  62.  
  63. MB_BUSY (Relation is too busy--if returned by a call other than mb_inc())
  64.  - Only thirty operations may be processed simultaneously--and this was
  65.    number thirty one.  Try again in a second or two.
  66.  
  67. MB_BUSY (Relation is too busy--if returned by mb_inc()) or
  68. MB_LOCKED (Relation is locked by another user)
  69.  - If you're stuck by one of these, try the utility blast -- it erases the
  70.    record of the number of users on a relation.  But the cause is still there:
  71.    you may want to check your programs to make sure each terminates with
  72.    mb_die() [ MBCloseAllRelations() ] or mb_exit(), or just mb_rmv()'ing all
  73.    the relations you've used... if a relation isn't closed properly, its count
  74.    will increase each time you use the thing, until it's got 255 users and won't
  75.    let you add any more.  Then, you've gotta blast it.
  76.  
  77. MB_NO_OPEN (Cannot open given filename) or
  78. MB_NO_READ (Cannot read given filename)
  79.  - MetalBase does not use any evironment variables to check for possible
  80.    directories for relations; it expects a full pathname if one is required.
  81.    MB_NO_OPEN usually means the file can't be found; while MB_NO_READ means
  82.    mb_inc() can't read the initial signature at all from the relation--possibly
  83.    permissions, or a 0-length file.
  84.  
  85. MB_FORMAT (Relation is not in MetalBase 4.0+ format)
  86.  - Gods.  Good luck.  This is caused if
  87.     a) the initial signature (see format.dox) isn't (char)40 or (char)41, or
  88.     b) the fields in the relation don't make sense, or
  89.     c) the indices....
  90.    basically, this is your generic "THIS SHOULDN'T HAVE HAPPENED!!!" error.
  91.    If you get it, make _sure_ you're opening the right file, for starters:
  92.    always pass mb_inc() the name of the file WITHOUT the extension.  I don't
  93.    trust the extension bit...
  94.  
  95. MB_TIMEOUT (Temporary lock has not been removed)
  96.  - MetalBase sets temporary locks on relations during add/delete/update/search
  97.    operations--when a temporary lock has been placed on a relation, other
  98.    commands wait for a set amount of time for the relation to be unlocked--
  99.    this process is normally transparent to the user.  Though these waiting
  100.    periods are kept as small as possible (obviously), under very peculiar
  101.    situations, a program may be interrupted while a lock is still in place.
  102.    On other occasions, two commands may have been issued nearly simultaneously,
  103.    and the lock will be almost ready to remove when the second command gives
  104.    up.  If you receive this error, you should try your command again--failing
  105.    that, execute mb_rst(1) or use blast to remove the temporary lock.
  106.  
  107. MB_DISKFULL (Not enough disk space left)
  108.  - mbconv requires again as much free space as the size of the relatation being
  109.    converted; if you don't have that much, it'll stop the conversion.  Note
  110.    that no check is made for enough free space before conversion so make sure
  111.    yourself before you start, or 10 minutes into its work it may stop with this
  112.    error.
  113.  
  114. MB_TMPDIR (You must define a TMP directory)
  115.  - On some systems, MetalBase requires that you have the environment variable
  116.    TMP set to an appropriate directory for temporary files; for example,
  117.       TMP=/tmp; export TMP
  118.    or
  119.       set TMP=C:\TMP
  120.    If you prefer, you can use the variable "TEMP" instead.
  121.  
  122. MB_TMPERR (Cannot work with TMP directory)
  123.  - In order to control concurrency problems, MetalBase 5.0 uses a rather
  124.    complex system of locking, which involves many busy loops of ReadByte,
  125.    CheckByte, ReadByte and so on.  That kind of work really, really slows
  126.    down access to a relation, so the locking mechanism has been moved off
  127.    to a separate file.  This file is named after the relation, with the
  128.    extension replaced with ".LCK", and is placed in the temporary directory
  129.    given as per MB_TMPDIR (explained right above this).  This file is
  130.    created every time mb_inc() is called, if it does not already exist...
  131.    if it cannot be created, or opened for read/write access, this error
  132.    is returned.  Try moving the temporary directory to another location.
  133.  
  134. Too many relations--see trouble.dox
  135. Too many fields--see trouble.dox
  136.  - Form has two manifest constants, MAXnREL and MAXnFLD.  These are defined
  137.    for 5.0 to be 20 and 40 respectively; if you have more than 20 relations
  138.    in a given data-entry template, add -DMAXnREL=30, etc, to CFLAGS in the
  139.    Makefile and recompile.
  140.  
  141. Report doesn't quite look like the template
  142.  - Check your semicolons.  Every print statement, every skip statement;
  143.    hell, most statements, will freak if they don't end in a semicolon, and
  144.    different systems freak in different ways.  :)
  145.  
  146.