[cairo] libXext missing?
Stephen Sinclair
radarsat1 at gmail.com
Wed Nov 15 07:28:24 PST 2006
Hi,
> Oh! Didn't know cairo can be compiled without pkg-config on some
> systems. I made it err at configure time if pkg-conif gis not
> available. Is it too much to expect pkg-config? In this case though it
> doesn't seem to solve the problem since you don't have a xrender.pc
> file. If pkg-config xrender fails, cairo falls back to using -lxrender
> to link to xrender, which seems not enough in your case.
Yes, that seems to be right.
In fact I built pkg-config myself, because it's required for libpng
support. As I said, I compiled all dependancies of cairo, so you are
right that it could be some other library creating an indirect
dependancy.
The other packages that I compiled are:
fontconfig-2.4.1.tar.gz
freetype-2.2.1.tar.bz2
libpng-1.2.12.tar.bz2
libxml2-2.6.27.tar.gz
pkg-config-0.21.tar.gz
Which I downloaded fresh and ./configure/make/make installed.
I usually use a --prefix for this sort of testing, so in my prefix's
lib/pkgconfig folder, there were only the following files:
fontconfig.pc
freetype2.pc
libpng.pc
libpng12.pc
libxml-2.0.pc
Anyways, I used "otool -L", which is similar to Linux's "ldd" command,
to see if there were any X dependancies in these libraries, but there
were none.
I then checked why cairo was depending on X, because I didn't actually
expect it to, but of course the system I was compiling on had the
X11SDK.pkg installed, so it was automatically detected.
In short:
./configure --enable-atsui=auto --enable-quartz=auto
resulted in:
ld: Undefined symbols:
_XMissingExtension
_XextAddDisplay
_XextFindDisplay
_XextRemoveDisplay
/usr/bin/libtool: internal link edit command failed
I then tried:
./configure --enable-atsui=auto --enable-quartz=auto --disable-xlib-xrender
which gave:
ld: Undefined symbols:
_XRenderAddGlyphs
_XRenderChangePicture
_XRenderComposite
_XRenderCompositeText16
_XRenderCompositeText32
_XRenderCompositeText8
_XRenderCompositeTrapezoids
_XRenderCreateGlyphSet
_XRenderCreatePicture
_XRenderFillRectangle
_XRenderFillRectangles
_XRenderFindStandardFormat
_XRenderFindVisualFormat
_XRenderFreeGlyphSet
_XRenderFreeGlyphs
_XRenderFreePicture
_XRenderQueryVersion
_XRenderSetPictureClipRectangles
_XRenderSetPictureFilter
_XRenderSetPictureTransform
_XRenderQueryExtension
_XRenderQuerySubpixelOrder
/usr/bin/libtool: internal link edit command failed
However,
./configure --enable-atsui=auto --enable-quartz=auto --disable-xlib
compiled with no errors.
In other words, since OS X users will be using an X11 that doesn't
have a working pkg-config, it may be impossible to depend on it. But,
as you said, it may be pointless anyways, since it's weird to require
X11 on OS X. The only cases where I can imagine this would be
necessary is when porting older applications, but these won't be
likely to be using cairo anyways.
So I guess it's a non-issue, but I thought I may as well report it.
I suppose some GTK applications might be likely to require cairo and X
at the same time. That's the only relevant case I can think of.
I probably wouldn't have bothered reporting this if I'd realized it
was an unnecessary dependancy.
However, the upshot is that in the configure script there is obviously
a fallback for X when pkg-config fails, so this fallback should
probably include a -lXext.
Steve
More information about the cairo
mailing list