This file contains a list of problems which have been encountered and which
require you to make changes if you want things to work properly. Other
problems have been encountered but we tend to work around them if we can so
as to avoid what changes you may have to make.


Compiler: AT&T C++ 2.1, CenterLine 1.1
Platform: SunOS 4.1.X
Problem: Missing toupper() and tolower() definitions in ctype.h

  If you obtained these compilers while you were running SunOS 4.1 but have
  since upgraded to SunOS 4.1. You may be missing definitions for toupper()
  and tolower() in the C++ <ctype.h> header file. The problem results from
  Sun changing these from being macros to real functions between the two
  releases. If the compiler complains that it cannot find these when
  compiling lib/OTC/text/otcstring.cc you should add the following to your
  C++ <ctype.h> header file.

    extern "C" {
    #ifndef toupper
	    int toupper(int);
    #endif
    #ifndef tolower
	    int tolower(int);
    #endif
    }


Compiler: AT&T C++ 2.1, CenterLine 1.1
Platform: SunOS 4.1.X
Problem: Missing strstr() prototype.

  Similar case to above, ie. only added in SunOS 4.1.X. You should simply
  add the following prototype to the C++ <string.h>

    char *strstr(const char*, const char*);


Compiler: AT&T C++ 2.1, AT&T C++ 3.0, AT&T C++ 3.0.1
Problem: C++ compiler does not accept files with '.cc' extension

  These compilers as shipped do not accept files with a .cc extension
  and so the CC script must be modified to accept that extension.

  In the 2.1 compiler only one change is required. What you should do
  is look for a section in the shell script which looks like

        *.[Cc]) if test -f $A
                then
                        case $A in
                                *.c) B=`basename $A .c` ;;
                                *.C) B=`basename $A .C` ;;
                        esac

  and change it to

        *.[Cc]|*.cc) if test -f $A
                then
                        case $A in
                                *.c) B=`basename $A .c` ;;
                                *.C) B=`basename $A .C` ;;
                                *.cc) B=`basename $A .cc` ;;
                        esac

  As well as the above change, in the version 3 compilers you should
  look for a section of code which looks like

	*.[Cc])    if [ $ptscnt -eq 0 ]

  and change it to.

	*.[Cc]|*.cc)    if [ $ptscnt -eq 0 ]


Compiler: ODE Front end
Problem: Does does not accept files with '.cc' extension

  Similar problem to that above. Search for the check of the filename
  extension and change the code to:

        *.[Cc]|*.cc)
                if test ! -f $A
                then    echo "$A not found"
                else    echo $A:
                        case $A in
                        *.c)    B=`basename $A .c`
                                F=`basename $A`;;
                        *.C)    B=`basename $A .C`
                                F=`basename $A`;;
                        *.cc)   B=`basename $A .cc`
                                F=`basename $A`;;
                        esac


Compiler: AT&T C++
Platform: SunOS 4.1.X
Problem: /lib/cpp dumps core on really large files when run from C compiler

  Using the library and the template preprocessor can result in output
  files containing a large number of #line statements. If the number
  of #line statements is excessive it can exercise a bug in /lib/cpp
  when it is run from the C compiler, resulting a core dump.

  The best fix for this is to make the C compiler use a dummy cpp which
  doesn't actually do anything. Such a script is can be found in the misc
  directory as misc/cpp.sun.

  You should call this "cpp" and stick it in a directory where nothing else
  will find it. Then after the line

    ccC=${ccC-"cc"}

  add

    ccC="${ccC} -Qpath ${CPPLIBDIR}"

  Just before this line set CPPLIBDIR to the name of the directory where
  you put the cpp script.

  Note that with the AT&T 2.1 compiler you may have to remove the +L
  option from where cfront is called in the shell script.

  Alternatively to the above fix, you can get a new version of /lib/cpp
  from Sun. The Sun patch number for this is 100151-01.


Compiler: AT&T C++ 2.1, AT&T C++ 3.0.1, CenterLine 1.1
Platform: SunOS
Problem: Profiler information not being output.

  The standard AT&T compiler provides its own exit routine. This means
  that the on_exit() routine is not called and so when using profiling
  the mon.out or gmon.out files are not output.

  If you have AT&T src code then you can change libC.a such that no
  exit() routine is provided and have static destructors called by the
  same on_exit() routine which we wish to have called.

  The changes required are to #ifdef out the exit() routine in
  lib/static/exit.c of the AT&T source. ie.

    #ifndef sun
    extern void exit(int i)
    {
	    __dtors();
	    _cleanup();
	    _exit(i);
    }
    #endif

  and then in _main.c in either the Patch or Munch directory add

    #ifdef sun
    extern "C" int on_exit(...);
    #endif

  just before the _main() routine and at the end of the _main() routine
  add

    #ifdef sun
	    on_exit(__dtors);
    #endif

  A similar thing could be done on machines which have atexit() instead
  of on_exit().


Platform: SCO UNIX
Problem: Shouldn't use ranlib even though it exists.

  The ranlib on SCO UNIX only exists for backward compatability with
  SCO XENIX and shouldn't be used. The fact that it exists in the standard
  path though means that the configure' script finds it. Thus after the
  script has been run you should manually edit include/makeit/system.mk and
  change the RANLIB definition to

    RANLIB := : ranlib

  Alternatively you can add this definition at the end of the host file.
  Adding the change here will ensure that `configure' doesn't wipe out your
  change the next time it is run.


Compiler: SUN C++ 3.0.1
Problem: Compiler generates incorrect stabs information.

  Sun C++ 3.0.1 generate incorrect debugger stabs information for user
  template override classes. The incorrect stabs information causes the
  debugger to throw away all information thus making debugging impossible.
  The OSE libraries use a work around to avoid this problem although the
  work around doesn't prevent the same problem in the C++ compiler
  resulting in the compiler dying if you try to use the -sb option. Sun
  does provide a patch for both problems.

  The latest known patch numbers are:

    SunOS 4.x - 100967-05
    SunOS 5.x - 100962-05

  Later revisions of the patches may exist.


Compilers: Sun C++ 3.0.1, AT&T 3.0.1, HP C++ 3.0
Problem: Compilers do not search libraries linked using -l for templates.

  When libraries are linked using the -l option. These versions of the
  compiler do not search the library for any expanded templates which
  may exist in the library. As they are not found the compiler will
  incorrectly try to expand templates which have already been expanded.

  The Sun patches above fix this problem. A patch for the AT&T 3.0.1 CC
  script is included with OSE in the file misc/ATT3.0.1.patch. This is not
  an official AT&T patch so make sure you save a copy of your CC before
  patching it, and please let us know of any problems you have so we can
  change the patch if necessary. There is a patch for HP C++ available,
  but it doesn't fix the problem where the library is actually a shared
  library.


Product: ObjectStore 2.0.1
Compilers: SUN C++ 3.0.?, AT&T 3.0.?.
Problem: Empty object file in libos.a causes AT&T 3.0 based compilers to fail.

  In ObjectStore 2.0.1, the library libos.a contains an empty object file
  called "ip_tli.o". When AT&T 3.0 based compilers are doing template
  expansion, they run nm on the library to work out the symbols which
  exist. The problem is that as this object file is empty, nm fails,
  causing the compiler to discard all symbol information about the library.
  The result of this is that it tries to expand templates which are already
  expanded in libos.a. Because there is no template code file available for
  the template in question, the compiler fails.

  What you should do is remove the empty object file from the library
  by doing the following:

    cd $OS_ROOTDIR/lib
    mv libos.a libos.a.safe
    cp libos.a.safe libos.a
    ar d libos.a ip_tli.o
    ranlib libos.a

  This problem should be fixed in ObjectStore 2.1.


Product: ObjectStore
Compilers: AT&T C++ (Any with static libC.a)
Platforms: SunOS 4.1.x
Problem: vec_delete from libos.a not being linked in, copy in libC.a used.

  When libC.a is linked statically, vec_delete from libC.a is sometimes
  being used instead of that in the shared version of libos.a. Although
  this results in destructors for classes still being called, the memory
  is not reclaimed from the database. Easiest solution is to link with
  the static version of libos.a by specifying -Bstatic option in LDFLAGS.
  Better solution is to extract from libos.a the object file vnewdel.o
  and archive this into the libos.sa file. Ie.:

    cd $OS_ROOTDIR/lib
    mv libos.sa.2.155 libos-safe.sa.2.155
    cp libos-safe.sa.2.155 libos.sa.2.155
    ar x libos.a vnewdel.o
    chmod 0664 libos.sa.2.155
    ar r libos.sa.2.155 vnewdel.o
    ranlib libos.sa.2.155

  You should also ensure that you have at least one class type on which
  you are calling vec delete, which has a destructor.

  Note that versions numbers may be different for the version of
  ObjectStore you have.

  Late news. This problem still has not been fixed in version 3.0.
  Commands to run in this version are:

    cd $OS_ROOTDIR/lib
    mv libos.sa.4.30 libos-safe.sa.4.30
    cp libos-safe.sa.4.30 libos.sa.4.30
    ar x libos.a vnewdel.o opdel.o opnews.o
    chmod 0664 libos.sa.4.30
    ar r libos.sa.4.30 vnewdel.o opdel.o opnews.o
    ranlib libos.sa.4.30

  I copied over opdel.o and opnews.o this time as well as it was leaking
  stuff besides vectors.


Compilers: SUN C++ 3.0.1
Platform: Solaris 2.X, SunOS 4.1.X
Problem: If GNU ar/ranlib are used, the compiler fails on template expansion.

  If you are using  SUN C++ 3.0.1, you must make sure that GNU ar/ranlib
  are not being used. The problem is that the GNU tools put a special
  file in the library which causes the standard nm command to return a bad
  status. The C++ compiler, seeing the bad status, throws away all symbol
  information about the library. If there are templates already expanded
  in the library, the compiler will not detect this and will attempt to
  expand them a second time. This may result in multiply defined symbols.


Compilers: AT&T C++ 3.0.1
Platform: Solaris 2.X, System V R4
Problem: Incorrect prototype for gettimeofday().

  The gettimeofday() function under System V R4 machines takes only a single
  argument of a "timeval*". The AT&T source though, will generate a two
  argument BSD style prototype for System V R4 machines. This definition
  is in the file <sys/time.h> and should be changed such that it takes only
  a single argument.


Program: GNU AWK 2.15
Problem: Gives incorrect results for info2man.awk.

  Version 2.15 gives incorrect results for info2man.awk. This awk file
  is used in info2man and class2man. Version 2.13 of GNU AWK is known
  to work, as does the nawk program supplied with some UNIX. If you have
  GNU AWK 2.15 and also have nawk, change the AWK variable in the file
  include/makeit/system.mk to nawk after running configure. Note that
  version 2.15.5 of GNU awk now seems to work okay. This newest version
  may actually be needed when using info2mml. Version 2.15.6 of GNU awk
  seems to break things again though.


Package: Versant
Problem: Compiler front ends generate bad file names.

  Versant generates files with a '__PClass_' prefix. The remainder of
  the name is generated from the value of the -o option when linking
  a program. The compiler front end however, doesn't remove the directory
  portion of the value to -o. Therefore, if the -o option specifies
  a file in a different directory, the code file name will not work.

  To fix this problem, the line:

    Tfile=__PClass_$TARGET

  in the Versant compiler front end should be changed to:

    Tfile=__PClass_`basename $TARGET`


Platform: HPUX
Problem: Standard HP awk doesn't work well with classinfo tools.

  The standard awk program on HP platforms seem to have many problems.
  The best solution is to use GNU awk.


Platform: NeXTSTEP
Problem: The date program provided doesn't understand Posix options.

  Best solution is to install GNU date and use it. The date program is
  used by the mksrc scripts.


Compiler: CenterLine C++ 2.0.4
Problem: Incorrect prototype in include files.

  Centerline C++ 2.0.4 has the following prototype in <sys/signal.h>.

    int sigprocmask(int, sigset_t *, sigset_t *);

  Their prototype is incorrect. It should read:

    int sigprocmask(int, sigset_t const*, sigset_t *);

  This is one of a number of incorrect prototypes in their header files.
  Attempts are made to workaround these problems, but you may have to
  change either there header files or the OSE code.


Package: ObjectStore 3.0
Problem: make_application_schema gives internal error

  The C++ libraries in OSE cause the make_application_schema program of
  ObjectStore version 3.0 generate an internal exception or type
  "err_rep_descriptor_api". This is a problem with the ObjectStore program
  You should contact Object Design and ask them for the patched version of
  the program.


Compiler: Sun C++ 4.0
Problem: -pta option is broken

  Preferably, do not use Sun C++ 4.0 at all, instead use version 4.0.1,
  but make sure you get the available patches from Sun. Known patches at
  this time for version 4.0.1 is:
  
    Solaris 5.X - 101910-05 101242-08
    SunOS 4.1.X - 101914-06
    
  If you must use version 4.0, comment out the lines:

    ifeq "$(filter minimal_expansion,$(MAKEIT_OPTIONS))" ""
    PTRFLAGS.cc += -pta
    endif

  in the section for Sun C++ 4.0, in the include/makeit/cc.mk file. If
  you do not do this, OSE most likely will not compile unless you happen
  to have some patch applied to the compiler which fixed the problem.

  Note that these patches are for Sun C++ 4.0 and not Sun C++ 4.0.1, the
  latter has its own patches, for which if you are using ObjectStore, you
  must have at least:

    Solaris 1/SunOS 4.1.3  :
    C++ 4.0.1 Jumbo patch  : 101914-11
			   :
			   :
    Solaris 2.4/SunOS 5    : 101242-09
    (with Sun C++ 4.0.1    : libC patch
    compiler)              : for 5.x
    Jumbo patch for kernel : 101945-27
    libthread jumbo patch  : 102224-06


Platform: Linux / GNU C++
Problem: sigaction() prototype is incorrect

  On some distributions of Linux, the sigaction() prototype in the header fle
  /usr/include/signal.h is incorrect. The prototype should read:

    int sigaction(int, const struct sigaction *, struct sigaction *);

  That is, the second argument should be a pointer to a const struct.


Platform: SCO
Problem: Multiple definitions of timeval struct in system header files

  SCO has multiple definitions of timeval struct in system header files.
  They are in <sys/time.h> and <sys/select.h>. It may be necessary to
  hide the one in <sys/select.h>.


Platform: HPUX
Problem: Non HP compiler may required -D_HPUX_SOURCE as a compiler option

  HP C++ defines _HPUX_SOURCE by default. For a non HP compiler you may have
  to define this manually so that all necessary C++ prototypes are seen.
  For example, for OS3.0 compiler, add to HPPA_HPUX9.mk:

    OS3.0_CPPFLAGS := -D_HPUX_SOURCE


Platform: Solaris 2.4+
Compiler: CenterLine C++

  CenterLine provides a version of <sys/time.h> which defines a prototype
  for gettimeofday(). This function prototypes was missing until Solaris
  2.4. When finally added, the prototype took two arguments, the second
  being "void*". The CenterLine prototype only takes one argument, so there
  is a conflict. The CenterLine <sys/time.h> file should be removed.
