From: Steve Downey <sdowney@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 55294@debbugs.gnu.org
Subject: bug#55294: Configure failure on Solaris 11.4
Date: Mon, 9 May 2022 20:15:56 -0400 [thread overview]
Message-ID: <CAJEGDKoYXOOCdkP2VzDgvFSoj83u_so6fXOKvprNxshf-7pafA@mail.gmail.com> (raw)
In-Reply-To: <00636951-94bc-f63e-1b7f-734647b2d992@cs.ucla.edu>
[-- Attachment #1: Type: text/plain, Size: 2575 bytes --]
I don't have the full configure logs at hand. The build was with the Sun
Studio suite 12.6, and it builds successfully on Solaris 11.3, and fails
linking on 11.4.
Failure was:
CCLD temacs
Undefined first referenced
symbol in file
cos floatfns.o
exp floatfns.o
log floatfns.o
pow xfns.o
sin floatfns.o
tan floatfns.o
acos floatfns.o
asin floatfns.o
atan floatfns.o
ceil floatfns.o
fmod floatfns.o
powf pdumper.o
atan2 floatfns.o
floor xterm.o
ilogb floatfns.o
log10 xdisp.o
lround hbfont.o
scalbn floatfns.o
ld: fatal: symbol referencing errors
In 11.4, sqrt is defined in libc.so as an absolute symbol, so the test for
if -lm is necessary succeeds without it. I haven't disassembled the new
libc, but I suspect that you're right and they have a sqrt that is fast
enough either depends on a sqrt instruction or is otherwise "simple" for
some value of simple.
Was able to reproduce the build failure with SS12.4 on 11.4 as well.
This is the actual patch we're using:
--- emacs-27.2.orig/configure.ac
+++ emacs-27.2/configure.ac
@@ -1634,14 +1634,14 @@ AC_DEFUN([AC_TYPE_SIZE_T])
# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
AC_DEFUN([AC_TYPE_UID_T])
-# sqrt and other floating-point functions such as fmod and frexp
+# atan and other floating-point functions such as fmod and frexp
# are found in -lm on many systems.
OLD_LIBS=$LIBS
-AC_SEARCH_LIBS([sqrt], [m])
+AC_SEARCH_LIBS([atan], [m])
if test "X$LIBS" = "X$OLD_LIBS"; then
LIB_MATH=
else
- LIB_MATH=$ac_cv_search_sqrt
+ LIB_MATH=$ac_cv_search_atan
fi
LIBS=$OLD_LIBS
Reading elsethread, I totally understand Eli Zaretskii's concern about this
being fragile, but as near as I can tell this is still the unfortunate
state of the art in figuring out if libm is needed using autoconf, although
testing with trig functions does seem to be the mode these days.
On Mon, May 9, 2022 at 3:07 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
> Thanks for the bug report. The patch looks safe, since Emacs calls atan
> as well as sqrt. And it looks like an improvement, since I can imagine
> all sorts of reasons why sqrt would not need libm whereas atan would,
> starting with the fact that typical hardware nowadays has sqrt
> instructions but not atan instructions. (The 'configure' test itself
> relies on undefined behavior, so it's not strictly portable anyway.)
>
> Although it would be helpful to know how to reproduce the problem (which
> compiler? how configured? etc.) and which symbols were not found in
> temacs on Solaris 11.4, we don't need to know that to install the patch.
>
[-- Attachment #2: Type: text/html, Size: 4267 bytes --]
next prev parent reply other threads:[~2022-05-10 0:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 19:58 bug#55294: Configure failure on Solaris 11.4 Steve Downey
2022-05-07 5:40 ` Eli Zaretskii
2022-05-09 19:07 ` Paul Eggert
2022-05-09 19:21 ` Eli Zaretskii
2022-05-09 19:34 ` Paul Eggert
2022-05-10 0:15 ` Steve Downey [this message]
2022-05-10 2:35 ` Eli Zaretskii
2022-05-10 4:46 ` Steve Downey
2022-05-10 12:07 ` Eli Zaretskii
2022-05-10 21:49 ` 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=CAJEGDKoYXOOCdkP2VzDgvFSoj83u_so6fXOKvprNxshf-7pafA@mail.gmail.com \
--to=sdowney@gmail.com \
--cc=55294@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/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).