From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: need to unbreak Emacs build on AIX Date: Sun, 3 Jan 2021 12:56:54 -0800 Organization: UCLA Computer Science Department Message-ID: <07c30857-1d1f-4c9d-d2f1-915f16bb91ee@cs.ucla.edu> References: <2387f0f2-2b61-da56-4a52-345bd8aaee36@cs.ucla.edu> <83eej3g7io.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------B13AE07C7C94B708CBC83B3F" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4814"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 Cc: Emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 03 22:22:27 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwApW-00019U-P7 for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Jan 2021 22:22:26 +0100 Original-Received: from localhost ([::1]:40698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwApV-0006QD-QR for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Jan 2021 16:22:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwAQz-0001dl-EH for Emacs-devel@gnu.org; Sun, 03 Jan 2021 15:57:05 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwAQu-0007fE-UT; Sun, 03 Jan 2021 15:57:04 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8FC04160054; Sun, 3 Jan 2021 12:56:56 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id yVSkyW6j2-mq; Sun, 3 Jan 2021 12:56:55 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A8E5C1600B2; Sun, 3 Jan 2021 12:56:55 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id K1ouk1_jhQuP; Sun, 3 Jan 2021 12:56:55 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-243-218-95.socal.res.rr.com [23.243.218.95]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 80DED160054; Sun, 3 Jan 2021 12:56:55 -0800 (PST) In-Reply-To: <83eej3g7io.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.262, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262380 Archived-At: This is a multi-part message in MIME format. --------------B13AE07C7C94B708CBC83B3F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 1/1/21 10:47 PM, Eli Zaretskii wrote: > On the emacs-27 > branch, please just countermand the problematic condition with > AIX-specific condition, as I don't want to change the configure script > there. I doubt whether the problem occurs only on AIX. As I understand it now,=20 the problem can happen on any platform that uses the curses library from=20 BSD via SVR4 and X/Open. I now see that I misspoke when I wrote that Emacs uses libncurses on=20 AIX. Emacs uses libcurses, because XLC-generated executables cannot link=20 to libncurses, as libncurses requires libgcc_s.a which is a GCC-ism. I don't offhand see how to fix this with a condition in the C code, so=20 on the emacs-27 branch I merely documented the issue via the attached pat= ch. My guess is that the issue is rare, as the original curses library has=20 been obsolete for quite some time. And given that curses does not work=20 in Emacs 27 and this is the first bug report about it and I found it=20 only by doing some extensive portability checking, perhaps we should=20 instead drop support for curses, and insist on ncurses or tinfo or=20 terminfo. I wouldn't be surprised if the Emacs curses code has other=20 issues that we don't know about because nobody uses it. --------------B13AE07C7C94B708CBC83B3F Content-Type: text/x-patch; charset=UTF-8; name="0001-Mention-lcurses-problem-on-AIX.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Mention-lcurses-problem-on-AIX.patch" =46rom 32c960bdc61e26521507f2d629ba4da8a4db842e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 3 Jan 2021 12:32:27 -0800 Subject: [PATCH] Mention -lcurses problem on AIX * etc/PROBLEMS: Describe problem with Emacs 27 and -lcurses. Do not merge to master. --- etc/PROBLEMS | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 2ab76e50bd..7499726678 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2879,6 +2879,19 @@ A solution is to link with GCC, like this: Since the .o object files already exist, this will not recompile Emacs with GCC, but just restart by trying again to link temacs. =20 +*** Building Emacs with -lcurses fails with undefined symbols like BC. + +The 'configure' script attempts to use several terminal libraries, +including tinfo, ncurses, and terminfo, and curses (in that order). +If it happens to choose the long-obsolete curses library, Emacs will +not link correctly. Emacs 28 is expected to work around this problem; +in the meantime you can work around it by installing tinfo, ncurses or +terminfo instead. + +This problem can happen on AIX 7.2 if you build with IBM's compiler XLC,= +as AIX's ncurses library suffers from the libgcc problem mentioned above= =2E +To work around this, configure and build with GCC. + *** Sun with acc: Link failure when using acc on a Sun. =20 To use acc, you need additional options just before the libraries, such = as --=20 2.27.0 --------------B13AE07C7C94B708CBC83B3F--