Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 283339 - cross-compiling gpe-base/libgpewidget-0.117-r1 fails due to missing '-lGL' linker flag
Summary: cross-compiling gpe-base/libgpewidget-0.117-r1 fails due to missing '-lGL' li...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: GPE Desktop Herd
Depends on:
Blocks: 283348
  Show dependency tree
Reported: 2009-08-31 16:01 UTC by Christopher Friedt
Modified: 2009-09-22 21:18 UTC (History)
0 users

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

build.log (build.log,173.25 KB, text/plain)
2009-08-31 16:02 UTC, Christopher Friedt

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Friedt 2009-08-31 16:01:50 UTC
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.


Reproducible: Always

Steps to Reproduce:
1.cross-compile libgpewidget-0.117-r1
Comment 1 Christopher Friedt 2009-08-31 16:02:10 UTC
Created attachment 202812 [details]
Comment 2 Christopher Friedt 2009-08-31 16:31:40 UTC
for the mean time, I've just manually set LDFLAGS="..." before calling emerge, and that also works. 
Comment 3 Christopher Friedt 2009-08-31 17:51:29 UTC
Another potential solution is to just add -lGL to cairo.pc when it is built with USE=opengl . 
Comment 4 Angelo Arrifano (RETIRED) gentoo-dev 2009-09-04 15:25:50 UTC
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"

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.

Comment 5 Christopher Friedt 2009-09-04 16:17:50 UTC
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. 
Comment 6 Angelo Arrifano (RETIRED) gentoo-dev 2009-09-22 21:18:42 UTC
Sorry, I can't reproduce it. Since the problem isn't on gpe-ownerinfo, I'm
going to close as cantfix.