bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45611: 28.0.50; xterm.c compile anomaly and link failure


From: William C Doughty III
Subject: bug#45611: 28.0.50; xterm.c compile anomaly and link failure
Date: Sat, 02 Jan 2021 11:49:08 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> [Please use Reply All to keep the bug address on the CC list.]
>
>> From: William C Doughty III <n2ocm@optonline.net>
>> Date: Sat, 02 Jan 2021 10:03:15 -0500
>> 
>> >> Needed to manually set HAVE_XRENDER and add -lXrender
>> >> to src/Makefile, after this the make compiles xterm.c
>> >> cleanly and the link for temacs succeeds.
>> >
>> > Please show the part of config.log where it tests for Xrender
>> > availability.
>> >
>> > Thanks.
>> 
>> >From the config.log , at least I think that's the section.
>> 
>> | #define USE_XIM 1
>> | #define XRegisterIMInstantiateCallback_arg6 XPointer
>> | /* end confdefs.h.  */
>> | #include <X11/Intrinsic.h>
>> |     #include <X11/extensions/Xrender.h>
>> | 
>> | int
>> | main ()
>> | {
>> | return !XRenderQueryExtension;
>> |   ;
>> |   return 0;
>> | }
>
> Yes, but please show all the rest, starting with "checking for
> XRenderQueryExtension in -lXrender" and ending with "$? = ..." after
> the test.  The test program is printed _after_ the stuff I want to
> see, in particular the error messages that failed the compilation of
> the test program.
>
>> configure:14699: checking for cairo >= 1.8.0
>> configure:14706: $PKG_CONFIG --exists --print-errors "$CAIRO_MODULE"
>> configure:14709: $? = 0
>> configure:14723: $PKG_CONFIG --exists --print-errors "$CAIRO_MODULE"
>> configure:14726: $? = 0
>> configure:14764: result
>
> This the next test, so it is not relevant.
>
>> The below if from the last time I tried a a compile from
>> master. This is on a Fedora 32 system after :
>
> Strange, it looks like the test for XRender was not done at all...
> On my system that test is between these two:
>
>> checking for inotify_init1... yes
>> checking for cairo >= 1.8.0... yes
>
> It says:
>
>   checking for XRenderQueryExtension in -lXrender... yes
>
> Why isn't that test being run on your system?

Your guess is as good ( or better ) than mine. I'm not too
familiar with how these scripts work. And as far as config.log
the check for XRenderQueryExyension in -lXrender it's not there
at all.

I just checked the version of autoconf. It's 2.69. So either
This commit borked the config setup. Or somthing else is going
on. As I said backing out this commit make the config and
compile happy. BTW. this commit was the last I saw that
affected configure.ac

Commit follows:

Author:     Paul Eggert <eggert@cs.ucla.edu>
AuthorDate: Fri Jan 1 12:52:55 2021 -0800
Commit:     Paul Eggert <eggert@cs.ucla.edu>
CommitDate: Fri Jan 1 12:58:17 2021 -0800

Parent:     ac8875173a New file scratch_buffer_dupfree.c
Merged:     emacs-27
Contained:  master
Follows:    emacs-27.1 (4105)

Port to Solaris 10

* configure.ac: Instead of AC_CHECK_HEADER, use AC_COMPILE_IFELSE
with X11/Intrinsic.h when checking for X11/extensions/Xrender.h.
This suppresses a bogus "report a bug to bug-gnu-emacs" diagnostic
from 'configure' in Solaris 10.
(SETUP_SLAVE_PTY): Adjust to recent renaming of forkin to
std_in in callproc.c.  Needed on Solaris and Unixware.
* lib-src/Makefile.in (LIB_GETRANDOM, LIBS_ETAGS): New vars,
needed because on Solaris 10 the Gnulib tempname module now needs
the -lrt library for clock_gettime.  Throw in the LIB_GETRANDOM
stuff too while we’re at it; from getrandom.m4 it seems to be
needed for MingW.
(LIBS_MOVE, etags_libs): Use them.
* src/callproc.c [SETUP_SLAVE_PTY]: Include sys/stream.h
and sys/stropts.h, for SETUP_SLAVE_PTY’s definiens.
* src/process.c [NEED_BSDTTY]: Don’t include bsdtty.h; hasn’t been
needed in years.
[USG5_4]: Don’t include sys/stream.h or sys/stropts.h; these
directives havbe been moved to callproc.c because the only use of
SETUP_SLAVE_PTY is there now.

4 files changed, 19 insertions(+), 13 deletions(-)
configure.ac        | 9 +++++++--
lib-src/Makefile.in | 9 +++++++--
src/callproc.c      | 5 +++++
src/process.c       | 9 ---------

modified   configure.ac
@@ -3291,7 +3291,12 @@ AC_DEFUN
 # Check for XRender
 HAVE_XRENDER=no
 if test "${HAVE_X11}" = "yes"; then
-  AC_CHECK_HEADER([X11/extensions/Xrender.h],
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM(
+       [[#include <X11/Intrinsic.h>
+        #include <X11/extensions/Xrender.h>
+       ]],
+       [[return !XRenderQueryExtension;]])],
     [AC_CHECK_LIB([Xrender], [XRenderQueryExtension], [HAVE_XRENDER=yes])])
   if test $HAVE_XRENDER = yes; then
     XRENDER_LIBS="-lXrender"
@@ -4926,7 +4931,7 @@ AC_DEFUN
     AC_DEFINE(FIRST_PTY_LETTER, ['z'])
     AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");])
     dnl Push various streams modules onto a PTY channel.  Used in process.c.
-    AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (forkin, I_PUSH, "ptem") == -1) 
fatal ("ioctl I_PUSH ptem"); if (ioctl (forkin, I_PUSH, "ldterm") == -1) fatal 
("ioctl I_PUSH ldterm"); if (ioctl (forkin, I_PUSH, "ttcompat") == -1) fatal 
("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
+    AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (std_in, I_PUSH, "ptem") == -1) 
fatal ("ioctl I_PUSH ptem"); if (ioctl (std_in, I_PUSH, "ldterm") == -1) fatal 
("ioctl I_PUSH ldterm"); if (ioctl (std_in, I_PUSH, "ttcompat") == -1) fatal 
("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
     ;;
 esac
 



<#secure method=pgpmime mode=sign>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]