From: Roland Roberts <rroberts@xyzzy.intdata.com>
Subject: Building 21.2 on HP-UX 11
Date: 08 Nov 2002 17:14:09 -0500 [thread overview]
Message-ID: <m3y983emku.fsf@xyzzy.intdata.com> (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
+
reply other threads:[~2002-11-08 22:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3y983emku.fsf@xyzzy.intdata.com \
--to=rroberts@xyzzy.intdata.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.