unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* emacs fails to build -- XRenderQueryExtension undefined
@ 2010-01-12  3:12 Miles Bader
  2010-01-12  7:39 ` Jan Djärv
  0 siblings, 1 reply; 9+ messages in thread
From: Miles Bader @ 2010-01-12  3:12 UTC (permalink / raw)
  To: emacs-devel

I worked around it with the following patch, though it's probably not
exactly the right fix...

-Miles

diff --git a/configure.in b/configure.in
index c36c6b2..0b53c77 100644
--- a/configure.in
+++ b/configure.in
@@ -1990,6 +1990,7 @@ if test "${HAVE_X11}" = "yes"; then
 	OLD_LIBS="$LIBS"
 	CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
 	CFLAGS="$CFLAGS $XFT_CFLAGS"
+	XFT_LIBS="$XFT_LIBS -lXrender"
 	LIBS="$XFT_LIBS $LIBS"
 	AC_CHECK_HEADER(X11/Xft/Xft.h,
 	  AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS))


-- 
Consult, v.i. To seek another's disapproval of a course already decided on.




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: emacs fails to build -- XRenderQueryExtension undefined
  2010-01-12  3:12 emacs fails to build -- XRenderQueryExtension undefined Miles Bader
@ 2010-01-12  7:39 ` Jan Djärv
  2010-01-12  7:54   ` Miles Bader
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Djärv @ 2010-01-12  7:39 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

Miles Bader skrev:
> I worked around it with the following patch, though it's probably not
> exactly the right fix...

What system are you on?  How did you configure Emacs?
If Xft requires Xrender at link time it should say so in the pkg-config 
output.  Normally on GNU/Linux, -Xrender is a private dependency, meaning it 
is needed to compile Xft, but linking is done implicitly by the rune time 
linker (do ldd /usr/lib/libXft.so and you can see that there is a dependecy 
there already).

	Jan D.

> 
> -Miles
> 
> diff --git a/configure.in b/configure.in
> index c36c6b2..0b53c77 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -1990,6 +1990,7 @@ if test "${HAVE_X11}" = "yes"; then
>  	OLD_LIBS="$LIBS"
>  	CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
>  	CFLAGS="$CFLAGS $XFT_CFLAGS"
> +	XFT_LIBS="$XFT_LIBS -lXrender"
>  	LIBS="$XFT_LIBS $LIBS"
>  	AC_CHECK_HEADER(X11/Xft/Xft.h,
>  	  AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS))
> 
> 





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs fails to build -- XRenderQueryExtension undefined
  2010-01-12  7:39 ` Jan Djärv
@ 2010-01-12  7:54   ` Miles Bader
  2010-01-12  8:06     ` Miles Bader
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Miles Bader @ 2010-01-12  7:54 UTC (permalink / raw)
  To: Jan Djärv; +Cc: emacs-devel

Jan Djärv <jan.h.d@swipnet.se> writes:
>> I worked around it with the following patch, though it's probably not
>> exactly the right fix...
>
> What system are you on?  How did you configure Emacs?
> If Xft requires Xrender at link time it should say so in the pkg-config
> output.  Normally on GNU/Linux, -Xrender is a private dependency,

It only says so in the pkg-config output if you specify --static
(otherwise, I think that since it's a "private" dependency of libxft.so,
it uses libxft.so's dependencies to load the library at runtime, but the
linker won't see it):

   $ pkg-config --libs xft
   -lXft  
   $ pkg-config --libs --static xft
   -lXft -lXrender -lfontconfig -lexpat -lfreetype -lz -lX11 -lpthread -lxcb -lXau -lXdmcp  

The problem, as far as I can tell, seems to be that there's an explicit
reference to XRenderQueryExtension in src/xftfont.c (src/xftfont.c:365),
so Emacs itself needs to link against -lXrender, it can't rely on the
the fact that libxft uses it.

I dunno if there's some system change that exposed this issue recently;
the relevant Emacs change seems to be a bit old -- vc annotate says:

f602b732 src/xftfont.c (YAMAMOTO Mitsuharu 2009-05-11 09:29:49 +0000 365)     XRenderQueryExtension (display, &event_base, &error_base);

[Note, I don't know the details of how this stuff works really, but I
think the above is roughly correct.]

-Miles

-- 
Monday, n. In Christian countries, the day after the baseball game.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs fails to build -- XRenderQueryExtension undefined
  2010-01-12  7:54   ` Miles Bader
@ 2010-01-12  8:06     ` Miles Bader
  2010-01-12  8:23     ` Jan Djärv
  2010-01-12  9:22     ` YAMAMOTO Mitsuharu
  2 siblings, 0 replies; 9+ messages in thread
From: Miles Bader @ 2010-01-12  8:06 UTC (permalink / raw)
  To: Jan Djärv; +Cc: emacs-devel

p.s. system is debian (unstable), no special flags to configure
(though I use a separate build-dir).

-Miles

-- 
Do not taunt Happy Fun Ball.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs fails to build -- XRenderQueryExtension undefined
  2010-01-12  7:54   ` Miles Bader
  2010-01-12  8:06     ` Miles Bader
@ 2010-01-12  8:23     ` Jan Djärv
  2010-01-12 16:25       ` Chong Yidong
  2010-01-12  9:22     ` YAMAMOTO Mitsuharu
  2 siblings, 1 reply; 9+ messages in thread
From: Jan Djärv @ 2010-01-12  8:23 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

Miles Bader skrev:
> Jan Djärv <jan.h.d@swipnet.se> writes:
>>> I worked around it with the following patch, though it's probably not
>>> exactly the right fix...
>> What system are you on?  How did you configure Emacs?
>> If Xft requires Xrender at link time it should say so in the pkg-config
>> output.  Normally on GNU/Linux, -Xrender is a private dependency,
> 
> It only says so in the pkg-config output if you specify --static
> (otherwise, I think that since it's a "private" dependency of libxft.so,
> it uses libxft.so's dependencies to load the library at runtime, but the
> linker won't see it):
> 
>    $ pkg-config --libs xft
>    -lXft  
>    $ pkg-config --libs --static xft
>    -lXft -lXrender -lfontconfig -lexpat -lfreetype -lz -lX11 -lpthread -lxcb -lXau -lXdmcp  
> 
> The problem, as far as I can tell, seems to be that there's an explicit
> reference to XRenderQueryExtension in src/xftfont.c (src/xftfont.c:365),
> so Emacs itself needs to link against -lXrender, it can't rely on the
> the fact that libxft uses it.

Ah, I didn't see that.

> 
> I dunno if there's some system change that exposed this issue recently;
> the relevant Emacs change seems to be a bit old -- vc annotate says:
> 
> f602b732 src/xftfont.c (YAMAMOTO Mitsuharu 2009-05-11 09:29:49 +0000 365)     XRenderQueryExtension (display, &event_base, &error_base);
> 
> [Note, I don't know the details of how this stuff works really, but I
> think the above is roughly correct.]
> 

Strange that it worked earlier then.  It can't hurt to add -lXrender.  To be 
on the safe side, AC_CHECK_LIB for Xrender should be made before adding 
-lXrender to libs.

	Jan D.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs fails to build -- XRenderQueryExtension undefined
  2010-01-12  7:54   ` Miles Bader
  2010-01-12  8:06     ` Miles Bader
  2010-01-12  8:23     ` Jan Djärv
@ 2010-01-12  9:22     ` YAMAMOTO Mitsuharu
  2010-01-12  9:44       ` Miles Bader
  2 siblings, 1 reply; 9+ messages in thread
From: YAMAMOTO Mitsuharu @ 2010-01-12  9:22 UTC (permalink / raw)
  To: Miles Bader; +Cc: Jan Djärv, emacs-devel

>>>>> On Tue, 12 Jan 2010 16:54:21 +0900, Miles Bader <miles@gnu.org> said:

>> What system are you on?  How did you configure Emacs?
>> If Xft requires Xrender at link time it should say so in the pkg-config
>> output.  Normally on GNU/Linux, -Xrender is a private dependency,

> It only says so in the pkg-config output if you specify --static
> (otherwise, I think that since it's a "private" dependency of libxft.so,
> it uses libxft.so's dependencies to load the library at runtime, but the
> linker won't see it):

>    $ pkg-config --libs xft
>    -lXft  
>    $ pkg-config --libs --static xft
>    -lXft -lXrender -lfontconfig -lexpat -lfreetype -lz -lX11 -lpthread -lxcb -lXau -lXdmcp  

The results on Ubuntu 9.10 are similar, and there is no -lXrender in
src/Makefile in my build dir.  But the linker does not complain, and
ldd shows libXrender.so.1 for me.

$ ldd /usr/lib/libXft.so
	linux-gate.so.1 =>  (0x00320000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0076b000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00d5c000)
	libz.so.1 => /lib/libz.so.1 (0x00cc9000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00a82000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00124000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x008aa000)
	libexpat.so.1 => /lib/libexpat.so.1 (0x0033f000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00253000)
	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00fc2000)
	/lib/ld-linux.so.2 (0x00ee7000)
	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x003da000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x00ead000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00af5000)

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs fails to build -- XRenderQueryExtension undefined
  2010-01-12  9:22     ` YAMAMOTO Mitsuharu
@ 2010-01-12  9:44       ` Miles Bader
  2010-01-12 10:01         ` Sven Joachim
  0 siblings, 1 reply; 9+ messages in thread
From: Miles Bader @ 2010-01-12  9:44 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: Jan Djärv, emacs-devel

YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> The results on Ubuntu 9.10 are similar, and there is no -lXrender in
> src/Makefile in my build dir.  But the linker does not complain, and

It may be that I have a newer version of some tool or something --
e.g. it occurs to me that I'm currently using binutils' new "gold"
linker.

Anyway, it seems pretty clear that the right thing to do is for Emacs to
explicitly link against libraries which it explicitly uses.

-Miles

-- 
Somebody has to do something, and it's just incredibly pathetic that it
has to be us.  -- Jerry Garcia




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs fails to build -- XRenderQueryExtension undefined
  2010-01-12  9:44       ` Miles Bader
@ 2010-01-12 10:01         ` Sven Joachim
  0 siblings, 0 replies; 9+ messages in thread
From: Sven Joachim @ 2010-01-12 10:01 UTC (permalink / raw)
  To: Miles Bader; +Cc: Djärv, YAMAMOTO Mitsuharu, emacs-devel

On 2010-01-12 10:44 +0100, Miles Bader wrote:

> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
>> The results on Ubuntu 9.10 are similar, and there is no -lXrender in
>> src/Makefile in my build dir.  But the linker does not complain, and
>
> It may be that I have a newer version of some tool or something --
> e.g. it occurs to me that I'm currently using binutils' new "gold"
> linker.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554324

Sven




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: emacs fails to build -- XRenderQueryExtension undefined
  2010-01-12  8:23     ` Jan Djärv
@ 2010-01-12 16:25       ` Chong Yidong
  0 siblings, 0 replies; 9+ messages in thread
From: Chong Yidong @ 2010-01-12 16:25 UTC (permalink / raw)
  To: Jan Djärv; +Cc: emacs-devel, Miles Bader

Jan Djärv <jan.h.d@swipnet.se> writes:

>> I dunno if there's some system change that exposed this issue recently;
>> the relevant Emacs change seems to be a bit old -- vc annotate says:
>>
>> f602b732 src/xftfont.c (YAMAMOTO Mitsuharu 2009-05-11 09:29:49 +0000 365)     XRenderQueryExtension (display, &event_base, &error_base);
>>
>> [Note, I don't know the details of how this stuff works really, but I
>> think the above is roughly correct.]
>>
>
> Strange that it worked earlier then.  It can't hurt to add -lXrender.
> To be on the safe side, AC_CHECK_LIB for Xrender should be made before
> adding -lXrender to libs.

I've checked such a fix into the repository.




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-01-12 16:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12  3:12 emacs fails to build -- XRenderQueryExtension undefined Miles Bader
2010-01-12  7:39 ` Jan Djärv
2010-01-12  7:54   ` Miles Bader
2010-01-12  8:06     ` Miles Bader
2010-01-12  8:23     ` Jan Djärv
2010-01-12 16:25       ` Chong Yidong
2010-01-12  9:22     ` YAMAMOTO Mitsuharu
2010-01-12  9:44       ` Miles Bader
2010-01-12 10:01         ` Sven Joachim

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).