Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247206 - x11-libs/cairo with USE="glitz" causes problems with forced --as-needed
Summary: x11-libs/cairo with USE="glitz" causes problems with forced --as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2008-11-17 14:14 UTC by Hanno Böck
Modified: 2008-12-30 16:01 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Böck gentoo-dev 2008-11-17 14:14:12 UTC
Building cairo with glitz support causes pretty much all apps that link against cairo to fail with forced as-needed.

Example gtk+:

sr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libglib-2.0.so -lm
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_set_transform'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_attach'
/usr/lib64/libcairo.so: undefined reference to `glitz_create_drawable'
/usr/lib64/libcairo.so: undefined reference to `glitz_find_standard_format'
/usr/lib64/libcairo.so: undefined reference to `glitz_drawable_get_features'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_set_filter'
/usr/lib64/libcairo.so: undefined reference to `glitz_set_array'
/usr/lib64/libcairo.so: undefined reference to `glitz_set_geometry'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_destroy'
/usr/lib64/libcairo.so: undefined reference to `glitz_set_rectangle'
/usr/lib64/libcairo.so: undefined reference to `glitz_set_rectangles'
/usr/lib64/libcairo.so: undefined reference to `glitz_buffer_create_for_data'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_get_height'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_flush'
/usr/lib64/libcairo.so: undefined reference to `glitz_composite'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_get_width'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_get_drawable'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_set_clip_region'
/usr/lib64/libcairo.so: undefined reference to `glitz_set_pixels'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_get_status'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_reference'
/usr/lib64/libcairo.so: undefined reference to `glitz_drawable_destroy'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_get_attached_drawable'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_get_format'
/usr/lib64/libcairo.so: undefined reference to `glitz_buffer_destroy'
/usr/lib64/libcairo.so: undefined reference to `glitz_add_trapezoids'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_set_component_alpha'
/usr/lib64/libcairo.so: undefined reference to `glitz_get_pixels'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_create'
/usr/lib64/libcairo.so: undefined reference to `glitz_find_drawable_format'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_set_fill'
/usr/lib64/libcairo.so: undefined reference to `glitz_surface_translate_point'
collect2: ld returned 1 exit status
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-17 14:20:26 UTC
This is still a problem of cairo, libcairo should link against libglitz I guess.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2008-11-17 15:57:06 UTC
ldd /usr/lib/libcairo.so
<snip>
	libglitz-glx.so.1 => /usr/lib/libglitz-glx.so.1 (0x00007f5fd348b000)
<snip>
	libglitz.so.1 => /usr/lib/libglitz.so.1 (0x00007f5fd1ce7000)
<snip>

It does and I build my system with as-needed..

LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=gnu"
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2008-11-17 16:06:35 UTC
$ scanelf -n /usr/lib64/libcairo.so
 TYPE   NEEDED FILE 
ET_DYN libpixman-1.so.0,libfreetype.so.6,libfontconfig.so.1,libglitz-glx.so.1,libpng12.so.0,libxcb-render-util.so.0,libxcb-render.so.0,libxcb.so.1,libXrender.so.1,libX11.so.6,libz.so.1,libm.so.6,libc.so.6 /usr/lib64/libcairo.so

libglitz-glx.so is the Glitz implementation we use on Linux and it's in there for me.
Comment 4 Hanno Böck gentoo-dev 2008-11-17 16:45:18 UTC
cardoe, this is with a system with forced as-needed in the gcc profile, see:
http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed
Comment 5 Peter Alfredsen (RETIRED) gentoo-dev 2008-11-29 00:31:46 UTC
Runnning eautoreconf on an ~amd64 system solves this, FWIW.
Comment 6 Christoph Mende (RETIRED) gentoo-dev 2008-12-07 14:14:48 UTC
this is also on a system with forced as-needed:
angelos@odin ~ % scanelf -n /usr/lib64/libcairo.so
 TYPE   NEEDED FILE 
ET_DYN libpixman-1.so.0,libfreetype.so.6,libfontconfig.so.1,libpng12.so.0,libXrender.so.1,libX11.so.6,libz.so.1,libm.so.6,libc.so.6 /usr/lib64/libcairo.so 
angelos@odin ~ % ldd /usr/lib/libcairo.so|grep glitz
angelos@odin ~ % 
no glitz in there, same result as comment #0
Comment 7 Christoph Mende (RETIRED) gentoo-dev 2008-12-08 00:35:00 UTC
also solved by removing export glitz_LIBS=-lglitz-glx from the ebuild (line 71, cairo-1.8.4)
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2008-12-08 22:41:28 UTC
That was added when James Cloos, who's involved in upstream filed bug #166343. I'd have to evaluate the impact of removal.
Comment 9 Peter Alfredsen (RETIRED) gentoo-dev 2008-12-13 17:07:41 UTC
(In reply to comment #8)
> That was added when James Cloos, who's involved in upstream filed bug #166343.
> I'd have to evaluate the impact of removal.

Just change it to:
glitz_LIBS="$(pkg-config --libs glitz-glx)"
The only thing glitz_LIBS contains is, AFAICT, the output of
pkg-config --libs glitz
but that's a subset of the above.
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2008-12-30 16:01:18 UTC
This is fixed with cairo 1.8.6