From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Vin Shelton Newsgroups: gmane.emacs.devel Subject: Build failure in xterm.c Date: Thu, 26 Jun 2003 00:00:38 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1056600371 1782 80.91.224.249 (26 Jun 2003 04:06:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2003 04:06:11 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jun 26 06:06:09 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19VO1R-0000Sc-00 for ; Thu, 26 Jun 2003 06:06:09 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19VO5m-0005Z6-00 for ; Thu, 26 Jun 2003 06:10:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19VO0N-0002fI-KC for emacs-devel@quimby.gnus.org; Thu, 26 Jun 2003 00:05:03 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19VNzl-0001so-6s for emacs-devel@gnu.org; Thu, 26 Jun 2003 00:04:25 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19VNzi-0001s7-Ax for emacs-devel@gnu.org; Thu, 26 Jun 2003 00:04:23 -0400 Original-Received: from smtp03.mrf.mail.rcn.net ([207.172.4.62]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19VNzg-0001iK-80 for emacs-devel@gnu.org; Thu, 26 Jun 2003 00:04:20 -0400 Original-Received: from 65-78-17-226.c3-0.nwt-ubr2.sbo-nwt.ma.cable.rcn.com ([65.78.17.226] helo=zion.rcn.com) by smtp03.mrf.mail.rcn.net with esmtp (Exim 3.35 #4) id 19VNze-0002zV-00 for emacs-devel@gnu.org; Thu, 26 Jun 2003 00:04:18 -0400 Original-Received: by zion.rcn.com (Postfix, from userid 501) id B2FA81C024; Thu, 26 Jun 2003 00:00:38 -0400 (EDT) Original-To: emacs-devel@gnu.org Original-Lines: 85 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15264 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15264 Sorry if this has already been discussed, but I couldn't find any reference to it in the archive of the mailinglist. Using the latest CVS sources, xterm.c will not build for me. I'm getting the following error: gcc -c -D_BSD_SOURCE -I/usr/local/include -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I. -I/opt/src/emacs-2003-06-25/src -D_BSD_SOURCE -g -O2 /opt/src/emacs-2003-06-25/src/xterm.c /opt/src/emacs-2003-06-25/src/xterm.c: In function `xim_initialize': /opt/src/emacs-2003-06-25/src/xterm.c:8126: error: `XRegisterIMInstantiateCallback_arg6' undeclared (first use in this function) /opt/src/emacs-2003-06-25/src/xterm.c:8126: error: (Each undeclared identifier is reported only once /opt/src/emacs-2003-06-25/src/xterm.c:8126: error: for each function it appears in.) /opt/src/emacs-2003-06-25/src/xterm.c:8126: error: parse error before "xim_inst" make: *** [xterm.o] Error 1 This is because the necessary definition was not added to src/config.in when configure.in was modified to generate the appropriate type for XRegisterIMInstantiateCallback_arg6. I've attached a patch for this problem. However, the configure test itself is wrong. It purports to differentiate between systems which require XPointer as the final argument to XRegisterIMInstantiateCallback and those which require XPointer*. My system requires an XPointer (witness these lines from /usr/include/X11/Xlib.h: extern Bool XRegisterIMInstantiateCallback( #if NeedFunctionPrototypes Display* /* dpy */, struct _XrmHashBucketRec* /* rdb */, char* /* res_name */, char* /* res_class */, XIDProc /* callback */, XPointer /* client_data */ #endif ); yet the configure test reports that I need XPointer*. The reason for this is that gcc only generates a warning on the incorrect argument type, but still compiles the conftest code and generates an object file. Here is the relevant output from my config.log file: configure:8917: gcc -c -O2 -D_BSD_SOURCE -I/usr/local/include conftest.c >&5 configure: In function `main': configure:8978: warning: passing arg 5 of `XRegisterIMInstantiateCallback' from incompatible pointer type configure:8978: warning: passing arg 6 of `XRegisterIMInstantiateCallback' from incompatible pointer type configure:8920: $? = 0 configure:8923: test -s conftest.o configure:8926: $? = 0 and if you look at the definitions at the end of config.log you'll see: #define XRegisterIMInstantiateCallback_arg6 XPointer* Here is the patch for src/config.in: ChangeLog entry for src/ChangeLog: 2003-06-25 Vin Shelton * config.in: Add definition for XRegisterIMInstantiateCallback_arg6. Index: src/config.in =================================================================== RCS file: /cvsroot/emacs/emacs/src/config.in,v retrieving revision 1.187 diff -a -u -r1.187 config.in --- src/config.in 6 Jun 2003 10:16:42 -0000 1.187 +++ src/config.in 26 Jun 2003 03:52:27 -0000 @@ -615,6 +615,10 @@ /* Define to 1 if you have the XkbGetKeyboard function. */ #undef HAVE_XKBGETKEYBOARD +/* Define the appropriate type for the 6th argument + to the XRegisterIMInstantiateCallback function */ +#undef XRegisterIMInstantiateCallback_arg6 + /* Define to 1 if you have the Xpm libary (-lXpm). */ #undef HAVE_XPM Regards, Vin Shelton