From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roland Roberts Newsgroups: gmane.emacs.bugs Subject: Building 21.2 on HP-UX 11 Date: 08 Nov 2002 17:14:09 -0500 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: Reply-To: rroberts@xyzzy.intdata.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1036800364 20462 80.91.224.249 (9 Nov 2002 00:06:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 9 Nov 2002 00:06:04 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18AJ8S-0005Je-00 for ; Sat, 09 Nov 2002 01:06:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18AJ9H-0002xr-00; Fri, 08 Nov 2002 19:06:51 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18AHOJ-0003tL-00 for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2002 17:14:15 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18AHOG-0003pF-00 for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2002 17:14:14 -0500 Original-Received: from [63.89.65.67] (helo=mailgate1.intdata.com) by monty-python.gnu.org with esmtp (Exim 4.10) id 18AHOF-0003nn-00 for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2002 17:14:11 -0500 Original-Received: from xyzzy.intdata.com (localhost [127.0.0.1]) by mailgate1.intdata.com (8.9.3+Sun/8.9.1) with ESMTP id RAA22788 for ; Fri, 8 Nov 2002 17:14:10 -0500 (EST) Original-Received: (from rroberts@localhost) by xyzzy.intdata.com (8.11.6/8.8.7) id gA8MEA517911; Fri, 8 Nov 2002 17:14:10 -0500 Original-To: bug-gnu-emacs@gnu.org Original-Lines: 63 Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:3852 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3852 --=-=-= 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 --=-=-= Content-Disposition: attachment; filename=emacs-21.2-src-s-hpux11.h-diff Content-Description: Emacs 21.2 src/s/hpux11.h unified diff --- 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 + --=-=-=--