Problems in building and installing DDD                          -*- text -*-
***************************************

This file lists problems encountered when building and installing DDD
in various environments.

Table of Contents
=================

    * Ada
    * AIX
    * DEC
    * FreeBSD
    * GCC
      + GCC 2.8.0 on SunOS
      + Early GCC versions
      + GCC and libg++
    * HP-UX
    * LessTif
    * Linux
    * SCO
    * SGI
    * Solaris 2.x
    * SunOS
      + SunOS 4.1 and X11R6
      + SunOS 4.1 and Sun C++
    * Unixware
    * X11R4

ADA
===

Reported by: ralph@ifr.luftfahrt.uni-stuttgart.de (Ralph Paul)

    Debugging Ada programs requires a special GDB version, for
    instance the one at `ftp://helen.cs.berkeley.edu/pub/gdb'.

AIX
===

    [Mike Bond <mike.bond@template.com> says that as of DDD-1997-12-16
     (that is, DDD 2.1.1 and later): `compiling with C Set++ on AIX 4.2
     all works fine.  I had no problems with the data display as
     mentioned, and all else seemed to work.  I use xlC/xlc to compile
     my apps to be debugged as well, and use dbx, and all works without
     problems right out of the tar file, straight compile.'  So the
     messages below might no more apply.]


Reported by:  Jonathan Edwards <edwards@intranet.com>,
              L. Scott Emmons >scott_emmons@uscs.com>

    Do not use xlC for compiling DDD; use GCC instead.  If you use
    xlC, the data display does not work correctly (only the very first
    variable displayed is shown).


Reported by:  bas@phys.uva.nl (Bas V. de Bakker),
              smueller@dbis1.informatik.uni-hamburg.de (Stefan Mueller)

    `ddd.C' won't compile on rs6000-ibm-aix3 and powerpc-ibm-aix3, due
    to an error message from the assembler.  According to Stefan
    Mueller and Bas V. de Bakker, the problem disappears when DDD is
    compiled without `-O'.  Stefan Mueller also states that GCC chokes
    on `BreakPoint.C'; it can only be compiled without
    `-felide-constructors' flag.

    [David C. Snyder <dsnyder@mindspring.com> states that he did not
    encounter any such problems using GNU binutils-2.6, gcc-2.7.2,
    libg++-2.7.1, and gdb-4.15.1 on his AIX 3.2.5 system.]

    We recommend the following simple way to build DDD on AIX:
    
    1. Enter `make -k'.  This builds all except erroneous files.

    2. In the `ddd' subdirectory, enter 
       `make CXXOPT= CXXSTUFF=-fexternal-templates'.  This builds
       the remainder of DDD without `-O' and `-felide-constructors'
       flags.

Reported by:	Jacek M. Holeczek <holeczek@clri6f.gsi.de>

    This "howto" describes the way one can get ddd-2.0 compiled on AIX 3.2
    using standard AIX utilities: C Set ++ for AIX Compiler (xlC), lex
    and yacc. The same procedure should be valid on AIX 4.1.

    First unpack the source distribution and go to the ddd-2.0
    subdirectory.  Then (an error in the configure script) make
    a copy of ./ddd/dummy.c:
            cp ./ddd/dummy.c ./ddd/dummy.c.orig

    Then set some environment variables:
            export CC=xlC
            export CXX=xlC
            export CFLAGS=-O
            export CXXFLAGS=-O
            export LDFLAGS=-O

    If you decide NOT to use gnu gcc, flex, and bison you may also
    need to remove the /usr/local/bin (or any other subdirectory where
    you keep gnu executables) from the PATH environment variable (so
    that the ./configure script will not find them, and it will find
    standard AIX xlC, lex, and yacc).

    Then run configure:
            ./configure -v

    Then restore the ddd/dummy.c:
            cp ./ddd/dummy.c.orig ./ddd/dummy.c

    Then in ./libiberty/Makefile and ./termcap/Makefile change the
    CFLAGS from "-g" into "-O".

    Then in ./ddd/config.h add a line in form:
            #define HAVE_GETHOSTNAME_DECL 1
    (On AIX 4.1 you should have it already defined by ./configure.)

    If you decide NOT to use gnu flex and gnu bison and use
    standard AIX lex and yacc instead, you have to remove some
    files:
            rm ./ddd/vsl-gramma.C ./ddd/vsl-gramma.h ./ddd/vsl-lex.C

    Now run "make clean" and then "make".

    If you decided to use standard AIX lex and yacc the make will
    crash while compiling ddd/VSLRead.C. You have to edit
    ./ddd/vsl-gramma.C (after the ./ddd/vsl-gramma.C is newly
    created by yacc) and modify the declaration of yyerror:
            extern "C" void yyerror(char *s);       // added "C"

    and the definition of yyparse:
            #ifdef __cplusplus
            // extern "C"                           // commented extern "C"
            #endif /* __cplusplus */
            int
            yyparse()

    then run "make" again.  You should get no other warnings/errors.
    Finally run "make strip" and "make install".  Have fun ...

DEC
===

Reported by: Pascal Quesseveur <abak@hol.fr>

    I have encountered some problems when compiling ddd on DEC Alpha 
    station running Digital UNIX 4.0 with gcc version 2.7.2.2 :

    ddd/config.h created by configure is wrong : symbol 
    HAVE_GETHOSTNAME_DECL must be defined in config.h since include file 
    /usr/include/unistd.h contains a prototype for gethostname. This 
    prototype is
        int gethostname(char *, size_t)
    when symbol _XOPEN_SOURCE_EXTENDED is defined and
        int gethostname (char *, int)
    in the other cases. There is a conflict with the prototype defined in
    ddd/hostname.C.

    ddd/Makefile created by configure is wrong : variables LIBNSL,
    NON_XLIBS and LIBGEN have incorrect values : the values must be null 
    to link ddd correctly.

FreeBSD
=======

Reported by:  taob@gate.sinica.edu.tw (Brian Tao)

    Use `gmake' (GNU make) instead of `make' for building DDD.

Reported by: Vincenzo Capuano <vcapuano@esoc.esa.de>

    Add `-lmytinfo' as additional library to build DDD.

GCC
===

GCC 2.8.0 on SunOS
------------------

    When using GCC 2.8.0 (or EGCS 1.0) on a sparc-sun-sunos4.1.4
    system, the file `VSLRead.o' must be generated without `-O' flag.
    Just type `rm VSLRead.o; make CXXOPT=-DNDEBUG VSLRead.o' and
    re-build DDD.


Early GCC versions
------------------

    GCC 2.5 and earlier produce lots and lots of warnings; all of them
    are insignificant.


GCC and LIBG++
--------------

    If you have multiple copies of gcc and/or libg++ installed, be
    sure that the referenced versions match each other.  This is a
    common source for various problems.

HP-UX
=====

Reported by:  (various)

    On HP-UX 10.01, if you cannot link DDD or get an illegal
    instruction at start-up, this is due to some bugs in the X11 and
    Motif libraries as shipped by HP.  Mark Harig <markh@landmark.com>
    says that some patches to X11 and Motif libraries are required to
    build DDD on HP-UX 10.01.  You can find these patches at:
    `ftp://us-support.external.hp.com/hp-ux_patches/'; he found the
    patches he needed in the directory `s700_800/10.X'.

    In that directory are the files:

       PHSS_10789  (the patch for S700/S800, HP-UX 10.20)
       PHSS_10789.txt (description of the patch and instructions)  

    You might also need patch PHSS_10688, PHSS_9810, PHSS_9811,
    PHSS_9813, and PHSS_9815.  Because the patch file names change as
    new patches are created, you should look in this directory for the
    file 'catalog', which lists the patch file names along with brief
    descriptions.

    According to some DDD users, linking problems on HP-UX can be
    solved by using patched versions of the GNU binutils (such as ld
    and ar) instead of the HP-UX binutils.  For more information on
    HP-PA versions of the GNU tools, see
    `ftp://jaguar.cs.utah.edu/dist/pagnutools.html'.

    Frank Hofmann <hofmann@wpax01.physik.uni-wuerzburg.de> fixed an
    `Invalid loader fixup for symbol _XtInheritTranslations,
    xmPrimitiveClassRec' by replacing `XtInheritTranslations' by
    `NULL' in `GraphEdit.C' and `ScrolledGE.C' and replacing
    `xmPrimitiveClassRec' with `XmPrimitiveWidgetClass' in
    `GraphEdit.C'.

    Roy Dragseth <royd@math.uit.no> says that you must link against
    the X11R6 version of Xmu, the X11R4 version gave an error on
    _XEditResCheckMessages being undefined at the link stage.

    Ivar Ruyter <ivarr@troll.hz.kfa-juelich.de> states: Build
    everything statically and add `-l:libdld.sl' to the LIBS line in
    the Makefile, voila you have a nice new Christmas Present.
    This also worked for Hal Manuel <hemanuel@esy.com>.

    Roy Dragseth <royd@math.uit.no> adds:
    Statically link as stated above. Actually it is only
    neccessary to statically link libXm, so if you exchange 
            -L/usr/lib/Motif1.2 -lXm
    with
            /usr/lib/Motif1.2/libXm.a
    in the link step DDD works fine. This might be useful for people
    who don't have the gnu linker. It also makes the executable ~1Mb
    smaller than when you add -l:libdld.sl to the link step.

    Lassi A. Tuura <Lassi.Tuura@cern.ch> suggests to use the option
    `-mmillicode-long-calls' when compiling.  It should permit fixes
    into shared library calls (these errors only occur with shared
    libraries).

LessTif
=======
    
    To use DDD with LessTif, get a recent LessTif release from
    `http://www.lesstif.org' and apply the patches found in the
    `patches/' subdirectory.

    When linking with LessTif instead of OSF/Motif, the following
    problems remain:
 
    001. The `F1' menu accelerator (Help | On Context) has no effect.
         [behavioral]

    002. Some of the dialog shells behave like top-level shells
         (e.g. they are decorated and placed by the user), for
         instance the display editor (Data|Edit Displays) and the
         breakpoint editor (Source|Edit Breakpoints).  [behavioral]

    003. Menu items are not made insensitive as they ought to be.
         [behavioral]

    004. Dragging a line in the `Backtrace' window causes DDD to
         crash.

Linux
=====

Reported by: Jim Van Zandt <jrv@vanzandt.mv.com>

     Under slackware 3.1, the file permissions in `/dev/ptyp?' do not
     allow for DDD <-> GDB interaction.  I did "cd /dev; rm pty*;
     MAKEDEV ptyp ptyq ptys ptyt", the former permissions and device
     numbers were restored, and DDD worked.
     [Can anyone tell me how to circumvent this within DDD?  - AZ]

Reported by:  Bernie Borenstein <c372321@hc1056.mdc.com>

     Make sure you use libc version 4.6.27 or later.  Otherwise some
     Motif versions will cause DDD to crash as soon as `Open
     Program...' is selected (or any other file selection dialog is
     opened).  Linux Motif's are very sensitive about this.

     As an intermediate workaround, use the GDB `file' and `core'
     commands; to open a specific source, use the GDB `info file
     FUNCTION' command, where FUNCTION is a function defined in that
     source file.

SCO
===

Reported by:  Guillaume Proux <Guillaume.Proux@aar.alcatel-alsthom.fr>

    DDD does not run correctly under SCO.  The DDD virtual TTY
    interface (see TTYAgent.C) has not been ported to SCO systems yet.
    With GDB, this results in GDB echoing every command, which DDD
    cannot handle properly.

    [Some SCO expert willing to fix this?  -AZ]

SGI
===

Reported by:  Andreas Zeller <zeller@acm.org>

    Don't use SGI CC for compiling DDD; use GCC instead.

    I compiled DDD on a mips-sgi-irix5.3 using SGI's CC; the resulting
    executable fails with segmentation faults.  I could not find the
    cause for this problem and suspect a CC bug; using GCC instead
    seems a better alternative.

Solaris 2.x
===========

Reported by:  Blair Zajac <blair@olympia.gps.caltech.edu>

    When using Sun cc to compile `libiberty' as shipped with DDD, change
    `extern char *__builtin_alloca();' to `extern void
    *__builtin_alloca();' in `alloca-norm.h' to get the code to compile.
    This does not happen with GCC.

Reported by:  Andreas Zeller <zeller@acm.org>

    Solaris CC (SC4.0 18 Oct 1995 C++ 4.1) is safe for compiling DDD.
    Executables are larger compared to those compiled with GCC.

SunOS
=====

SunOS 4.1 and X11R6
-------------------

Reported by:  dmitzel@everest.hitc.com (Danny J. Mitzel) and
    doko@cs.tu-berlin.de (Matthias Klose)

    Using certain Motif and Athena libraries may cause
    `_vendorShellWidgetClass' to be defined twice.  A possible
    workaround is to configure DDD to run without Athena widgets
    (i.e. in `config.h', undefine `HAVE_ATHENA_WIDGETS' and remove the
    -lXaw flag from the `Makefile' linking command).


SunOS 4.1 and Sun C++
---------------------

Reported by:	Franklin Chen <chen@adi.com>

    On SunOS 4.1.x, with Sun C++ 4.0.1, `config.h' needs to end up with
        #define SIGHANDLERARGS int, ...
    rather than
        #define SIGHANDLERARGS int
    to avoid compile errors in a number of source files.

UNIXWARE
========

Reported by: Vinnie Shelton  <shelton@icd.teradyne.com>

    For Unixware, I have to set up `ddd/Makefile' as follows 
    after configuration:

    LINK.cc = env LD_RUN_PATH=/usr/X11R6/lib $(CXX) $(CXXBINDING) $(LDFLAGS)

X11R4
=====

Reported by:  mlj@gensym.com (Magnus Ljungberg)

    You may need to prohibit the use of the _XEditResCheckMessages()
    function by entering a line saying '#undef HAVE_X11_XMU_EDITRES_H' in
    `ddd.C'.



$Id: PROBLEMS,v 1.50 1998/01/27 16:37:37 zeller Exp $
