Check out the attached log. After the build failed, I went into the source directory, ran the last command, appending -lGL, and it worked without a problem. I believe that somehow the pkg-config settings or dependent library settings are not being pulled in properly when linking to libcairo. libcairo itself does not depend on GL, but libcairo-glx does. In this case, however, the linker was complaining about the GL reference made by libglitz, which is a dependency of libcairo. The only thing I can really suggest, without hacking too much at the libgpewidget code itself, is to use some sort of package_has_use cairo opengl check, and use append-ldflags "-lGL" in that case. C Reproducible: Always Steps to Reproduce: 1.cross-compile libgpewidget-0.117-r1 2. 3.
Created attachment 202812 [details] build.log
for the mean time, I've just manually set LDFLAGS="..." before calling emerge, and that also works.
Another potential solution is to just add -lGL to cairo.pc when it is built with USE=opengl .
Sorry, I nearly missed this one. Which version and use flags are you using for cairo, glitz and gtk+ ? Native compiling of USE="cairo" libgpewidget is fine. x11-libs/gtk+-2.14.7-r2 USE="X cups jpeg jpeg2k tiff vim-syntax -debug -doc -xinerama" x11-libs/cairo-1.8.8 USE="X cleartype glitz opengl svg xcb -debug -directfb -doc" media-libs/glitz-0.5.6 Afaik, libGL should not be linked into gtk+ much less into libgpewidget. Also, -lGL is present on my glitz-glx.pc so either pkgconfig is failing on cross-compilations or (I bet) your gtk+ is broken.
media-libs/glitz-0.5.6 x11-libs/cairo-1.8.8 X cleartype directfb glitz opengl svg xcb x11-libs/gtk+-2.16.5 X jpeg jpeg2k tiff xinerama -cups -debug -doc -test -vim-syntax It seems like the only difference in our versions is gtk+ - it could be the problem, I suppose.
Sorry, I can't reproduce it. Since the problem isn't on gpe-ownerinfo, I'm going to close as cantfix.