From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emacs-devel@gnu.org
Subject: Re: need to unbreak Emacs build on AIX
Date: Sun, 3 Jan 2021 12:56:54 -0800 [thread overview]
Message-ID: <07c30857-1d1f-4c9d-d2f1-915f16bb91ee@cs.ucla.edu> (raw)
In-Reply-To: <83eej3g7io.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]
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,
the problem can happen on any platform that uses the curses library from
BSD via SVR4 and X/Open.
I now see that I misspoke when I wrote that Emacs uses libncurses on
AIX. Emacs uses libcurses, because XLC-generated executables cannot link
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
on the emacs-27 branch I merely documented the issue via the attached patch.
My guess is that the issue is rare, as the original curses library has
been obsolete for quite some time. And given that curses does not work
in Emacs 27 and this is the first bug report about it and I found it
only by doing some extensive portability checking, perhaps we should
instead drop support for curses, and insist on ncurses or tinfo or
terminfo. I wouldn't be surprised if the Emacs curses code has other
issues that we don't know about because nobody uses it.
[-- Attachment #2: 0001-Mention-lcurses-problem-on-AIX.patch --]
[-- Type: text/x-patch, Size: 1503 bytes --]
From 32c960bdc61e26521507f2d629ba4da8a4db842e Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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.
+*** 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.
+To work around this, configure and build with GCC.
+
*** Sun with acc: Link failure when using acc on a Sun.
To use acc, you need additional options just before the libraries, such as
--
2.27.0
next prev parent reply other threads:[~2021-01-03 20:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-01 23:17 need to unbreak Emacs build on AIX Paul Eggert
2021-01-02 6:47 ` Eli Zaretskii
2021-01-03 20:56 ` Paul Eggert [this message]
2021-01-04 3:25 ` Eli Zaretskii
2021-01-06 15:28 ` Stefan Kangas
2021-01-06 19:29 ` Paul Eggert
2021-01-06 19:38 ` Eli Zaretskii
2021-01-07 6:20 ` Paul Eggert
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07c30857-1d1f-4c9d-d2f1-915f16bb91ee@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=Emacs-devel@gnu.org \
--cc=eliz@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).