unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Building 21.2 on HP-UX 11
@ 2002-11-08 22:14 Roland Roberts
  0 siblings, 0 replies; only message in thread
From: Roland Roberts @ 2002-11-08 22:14 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2212 bytes --]

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 #2: Emacs 21.2 src/s/hpux11.h unified diff --]
[-- Type: text/plain, Size: 1157 bytes --]

--- hpux11.h.~1~	Wed Oct 31 12:32:45 2001
+++ hpux11.h	Fri Nov  8 17:10:48 2002
@@ -6,3 +6,30 @@
 #undef POSIX_SIGNALS
 #endif
 #define POSIX_SIGNALS 1
+
+#ifdef C_SWITCH_SYSTEM
+#undef C_SWITCH_SYSTEM
+#endif
+
+/* HPUX 11 inherits all the quirkiness of the older version as far as where it
+   installs various libraries and headers, plus it adds some new twists.
+   libXmu is in /usr/contrib, libXaw3d (if installed, it is optional) is in
+   /usr/local, and Motif is in it's own tree outside the X11 tree (as
+   before). */
+
+#undef C_SWITCH_X_SYSTEM
+#define C_SWITCH_X_SYSTEM -I/usr/local/include -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -I/usr/include/Motif2.1
+
+#undef LD_SWITCH_X_DEFAULT
+#define LD_SWITCH_X_DEFAULT -L/usr/local/lib/X11 -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -L/usr/lib/Motif2.1
+
+#undef  LD_SWITCH_SYSTEM
+#define LD_SWITCH_SYSTEM LD_SWITCH_X_DEFAULT
+
+#ifndef __GNUC__
+/* Make room for enough symbols, so dispnew.c does not fail.  */
+#define C_SWITCH_SYSTEM -Ae -Wp,-H200000 -D_HPUX_SOURCE C_SWITCH_X_SYSTEM LD_SWITCH_X_DEFAULT
+#else
+#define C_SWITCH_SYSTEM C_SWITCH_X_SYSTEM LD_SWITCH_X_DEFAULT
+#endif
+

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-11-08 22:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-08 22:14 Building 21.2 on HP-UX 11 Roland Roberts

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).