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

AIX
===

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 ...



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 2.3, 2.4, 2.5
=================

    Lots and lots of warnings; nearly all of them 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'.

    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
=======

    When linking with LessTif instead of OSF/Motif, the following
    problems occur.  Unless otherwise noted, all problems refer to DDD
    2.1.1 compiled against LessTif 0.79 on a sparc-sunos-4.1.4.

    006. `Preferences' buttons (Options|Preferences) stick out.
         There should be no 3d-border around the four preferences
         buttons.  [visual]
 
    011. The `F1' menu accelerator (Help|On Context) has no effect.
         [behavioral]
    
    012. Moving `Up' or `Down' in the `Backtrace' window
         (Status|Backtrace) does not clear the last selection.  Only
         one line should be selected.  Same applies to other List
         Widgets (e.g. Commands|Command History).  [visual]
 
    017. It is not possible to change values of the OptionButton in the 
         `Print' panel (File|Print Graph).  [behavioral]
 
    018. In the `Settings' panel, the scrolled window border is etched
         out instead of etched in.  [visual]
 
    020. 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]
 
    024. Let A be a child of a PanedWindow.  In LessTif, if A is
         unmanaged, its space is occupied by the last child of the
         PanedWindow (regardless of paneMaximum settings - this is a
         bug).  In Motif, the space is occupied by A's predecessor.
         [behavioral]
 
    027. Several warnings about invalid scrollbar values.
         [behavioral]
 
    028. Menu items are not made insensitive as they ought to be.
         [behavioral]
 


LINUX
=====

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

     The most recent release of the GNU C library does not work with
     DDD: the GDB prompt does not appear.  This seems to be a bug in
     the GNU C library; please let us know about any work-arounds.

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.

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

     Some Motif versions cause DDD to crash when dragging and dropping
     pixmaps (for example, breakpoint symbols).  Being written for
     Motif 1.1, there is no special drag-and-drop handling in DDD; if
     DDD crashes upon drag-and-drop, this is a bug in your Motif library.


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.


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'.


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'.


$Id: PROBLEMS,v 1.38 1997/05/30 09:16:01 zeller Exp $
