From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Build --without-x broken Date: Sun, 08 Jun 2008 11:39:40 +0300 Message-ID: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1212914427 8805 80.91.229.12 (8 Jun 2008 08:40:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2008 08:40:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 08 10:41:09 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K5GSa-0004V8-Tk for ged-emacs-devel@m.gmane.org; Sun, 08 Jun 2008 10:41:09 +0200 Original-Received: from localhost ([127.0.0.1]:53312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5GRn-0008CL-Qu for ged-emacs-devel@m.gmane.org; Sun, 08 Jun 2008 04:40:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K5GRf-00089l-D6 for emacs-devel@gnu.org; Sun, 08 Jun 2008 04:40:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K5GRd-00088W-HK for emacs-devel@gnu.org; Sun, 08 Jun 2008 04:40:10 -0400 Original-Received: from [199.232.76.173] (port=54656 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5GRd-00088L-4k for emacs-devel@gnu.org; Sun, 08 Jun 2008 04:40:09 -0400 Original-Received: from mtaout5.012.net.il ([84.95.2.13]:12969) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K5GRc-00083C-Ge for emacs-devel@gnu.org; Sun, 08 Jun 2008 04:40:08 -0400 Original-Received: from HOME-C4E4A596F7 ([80.230.28.131]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K24001KPZF3MA60@i_mtaout5.012.net.il> for emacs-devel@gnu.org; Sun, 08 Jun 2008 11:54:39 +0300 (IDT) X-012-Sender: halo1@inter.net.il X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:98681 Archived-At: Today's CVS cannot be build --without-x, it fails thusly: gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I/home/e/eliz/emacs.cvs/emacs/src -D_BSD_SOURCE -g -O2 -Wno-pointer-sign xmenu.c xmenu.c: In function 'Fx_popup_menu': xmenu.c:409: error: 'unuse_menu_items' undeclared (first use in this function) xmenu.c:409: error: (Each undeclared identifier is reported only once xmenu.c:409: error: for each function it appears in.) xmenu.c:431: error: 'menu_items_n_panes' undeclared (first use in this function) xmenu.c:432: error: 'menu_items' undeclared (first use in this function) xmenu.c:432: error: invalid type argument of '->' xmenu.c:432: error: 'MENU_ITEMS_PANE_NAME' undeclared (first use in this function) xmenu.c:464: error: invalid type argument of '->' make[1]: *** [xmenu.o] Error 1 make[1]: Leaving directory `/srv/data/home/e/eliz/emacs.cvs/emacs/src' make: *** [src] Error 2 This happens because of the latest changes intended to move platform-independent portions of C-level menu support to a separate file menu.c. (In the archives, I found only a single email message that suggests such a change, and no discussions. Did I overlook something?) Unfortunately, in their current form, the modified files have quite a few problems. For starters, they seem to assume that menus are only supported under HAVE_X_WINDOWS. For example, src/Makefile.in only compiles menu.c on that condition: #ifdef HAVE_X_WINDOWS MENU_OBJ = menu.o #endif and the menu definitions moved from xmenu.c to keyboard.h are also conditioned on HAVE_X_WINDOWS. The right symbol is HAVE_MENUS, because even platforms without HAVE_X_WINDOWS (--without-x build included) support menus. There are other problems as well, for example with the semantics of HAVE_NTGUI. However, simply replacing HAVE_X_WINDOWS with HAVE_MENUS will break other platforms, since some of them, like the Mac and MS-Windows, define HAVE_MENUS, but have their own, slightly different definitions for menu support macros, which apparently weren't yet incorporated into menu.c. Which brings me to the question: Yidong, is this still work in progress, or are you done, and consider it to be the job of the non-GNU platform maintainers to do whatever is necessary to get their platforms in line with these changes? Since neither macmenu.c/w32menu.c nor src/makefile.w32-in were modified along the same lines as xmenu.c and src/Makefile.in, it sounds like this work is not yet done, but then why was it committed without any word of warning? If you don't intend to work on other platforms, please at least get the --without-x case right. In general, such cross-platform changes should be discussed first, and maybe the patches posted here for review before committing them. Such changes are notoriously hard to get right, because of the myriad of subtle considerations and platform-specific knowledge that hardly any single person can get a hold on. Discussing this before committing would avoid most, if not all, of these pitfalls.