bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building 21.2 on HP-UX 11


From: Roland Roberts
Subject: Building 21.2 on HP-UX 11
Date: 08 Nov 2002 17:14:09 -0500

I am trying to build Emacs 21.2 on HP-UX 11 and was puzzling over why
the test for sys/wait.h was failing.  It would appear that src/s/hpux9.h
addes -D_BSD to C_SWITCH_SYSTEM with a ChangeLog.5 entry that says this
is required to get the correct definitions for sys/wait.h.  It would
appear that this actually inhibits that correct definitions.

C_SWITCH_SYSTEM should be set to -D_HPUX_SOURCE or undef'd as it appears
gcc sets this internally (as seem via gcc -dumpspecs)

    C_SWITCH_SYSTEM -D_HPUX_SOURCE

And when using the HP-UX cc, it should be

    C_SWITCH_SYSTEM -Ae -Wp,H200000 -D_HPUX_SOURCE

Additionally, neither gcc nor cc can correctly find the X headers and
libraries due to HPs quirkiness.  The locations seem to be set via
src/s/hpux9.h which is out-of-date.  I've tried adding correct versions
of C_SWITCH_X_SYSTEM and LD_SWITH_X_DEFAULT to no avail; i.e., these are
not picked up by the tests when testing for libXaw3d (which is
installed).  For C_SWITCH_X_SYSTEM I have to include the following

    -I/usr/local/include
    -I/usr/include/X11R6
    -I/usr/contrib/X11R6/include
    -I/usr/include/Motif2.1

For LD_SWITCH_X_DEFAULT I have to include the following

    -L/usr/local/lib/X11
    -L/usr/lib/X11R6
    -L/usr/contrib/X11R6/lib
    -L/usr/lib/Motif2.1

Then I have to define C_SWITCH_SYSTEM like so:

    #ifndef __GNUC__
    #define C_SWITCH_SYSTEM -Ae -Wp,-H200000 C_SWITCH_X_SYSTEM 
LD_SWITCH_X_DEFAULT
    #else
    #define C_SWITCH_SYSTEM -D_HPUX_SOURCE C_SWITCH_X_SYSTEM LD_SWITCH_X_DEFAULT
    #endif

At this point Emacs 21.2 *will* build with HPUX cc, but it generates a
ton of warnings of the form

    cc: "keyboard.c", line 5594: warning 604: Pointers are not 
assignment-compatible.
    cc: "keyboard.c", line 5594: warning 563: Argument #1 is not the correct 
type.

temacs does successfully run and dump, so I *think* everything is okay.

The build with gcc goes smoothly, installs and seems to run fine.

Attached is a unified diff of src/s/hpux11.h

roland
--
              Roland B Roberts, PhD; rroberts@xyzzy.intdata.com
                         Interactive Data Corp
            100 William Street, 9th Floor, New York, NY 10038 USA
                 Tel: 212 771-6994; Fax: 212 771-7394

Attachment: emacs-21.2-src-s-hpux11.h-diff
Description: Emacs 21.2 src/s/hpux11.h unified diff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]