Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262270 - gnome-base/gnome-desktop-2.26.3 and gnome-power-manager-2.26.0 fail to compile without libXrandr-1.3.0
Summary: gnome-base/gnome-desktop-2.26.3 and gnome-power-manager-2.26.0 fail to compil...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: Highest major (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 267087 274208 280462 286958 287296 (view as bug list)
Depends on:
Blocks: gnome2.26 281427
  Show dependency tree
 
Reported: 2009-03-12 14:09 UTC by Kobboi
Modified: 2010-07-28 19:51 UTC (History)
9 users (show)

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


Attachments
build.log for gnome-desktop-2.26.1 (build.log,39.53 KB, text/plain)
2009-04-27 20:24 UTC, Marcel Jaeschke
Details
build.log for gnome-power-manager-2.26.1 (build.log,269.25 KB, text/plain)
2009-04-27 20:25 UTC, Marcel Jaeschke
Details
emerge --info (emerge_info,3.53 KB, text/plain)
2009-06-16 18:04 UTC, niogic
Details
patch for gnome-desktop (0001-Check-for-XRR-functions-using-library-version-instea.patch,2.01 KB, patch)
2009-09-11 19:19 UTC, Rémi Cardona (RETIRED)
Details | Diff
patch for gnome-power-manager (0001-Check-for-XRR-functions-using-library-version-instea.patch,2.81 KB, patch)
2009-09-11 19:35 UTC, Rémi Cardona (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kobboi 2009-03-12 14:09:24 UTC
Trying to move to 2.25.* packages and updating, I bump into the following

x86_64-pc-linux-gnu-gcc -O2 -march=nocona -fomit-frame-pointer -pipe -Wl,-O1 -o .libs/test-ditem test-ditem.o  ./.libs/libgnome-desktop-2.so -L/usr/lib64 /usr/lib64/libXrandr.so /usr/lib64/libgtk-x11-2.0.so /usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpangoft2-1.0.so /usr/lib64/libcairo.so /usr/lib64/libpixman-1.so /usr/lib64/libdirectfb.so /usr/lib64/libfusion.so /usr/lib64/libdirect.so /usr/lib64/libglitz-glx.so /usr/lib64/libGL.so /usr/lib64/libXmu.so /usr/lib64/libXt.so /usr/lib64/libXi.so /usr/lib64/libXext.so /usr/lib64/libglitz.so /usr/lib64/libpng12.so /usr/lib64/libXrender.so /usr/lib64/libxcb-xlib.so /usr/lib64/libxcb.so /usr/lib64/libpango-1.0.so -lm /usr/lib64/libfontconfig.so /usr/lib64/libfreetype.so -lz /usr/lib64/libexpat.so /usr/lib64/libgio-2.0.so /usr/lib64/libgconf-2.so /usr/lib64/libORBit-2.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libgthread-2.0.so -lpthread -lrt /usr/lib64/libdbus-glib-1.so -lnsl /usr/lib64/libdbus-1.so /usr/lib64/libgobject-2.0.so /usr/lib64/libglib-2.0.so /usr/lib64/libstartup-notification-1.so /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl 
./.libs/libgnome-desktop-2.so: undefined reference to `XRRGetScreenResourcesCurrent'
collect2: ld returned 1 exit status
make[3]: *** [test-ditem] Error 1
make[3]: Leaving directory `/var/tmp/portage/gnome-base/gnome-desktop-2.25.91/work/gnome-desktop-2.25.91/libgnome-desktop'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/gnome-base/gnome-desktop-2.25.91/work/gnome-desktop-2.25.91/libgnome-desktop'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gnome-base/gnome-desktop-2.25.91/work/gnome-desktop-2.25.91'
make: *** [all] Error 2
 * 
 * ERROR: gnome-base/gnome-desktop-2.25.91 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2730:  Called gnome2_src_compile
 *             environment, line 2088:  Called die
 * The specific snippet of code:
 *       emake || die "compile failure"
 *  The die message:
 *   compile failure
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/gnome-base/gnome-desktop-2.25.91/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/gnome-base/gnome-desktop-2.25.91/temp/environment'.
 * This ebuild is from a repository named 'gnome'





Reproducible: Always

Steps to Reproduce:
Comment 1 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-03-13 15:54:56 UTC
This should be fixed in 2.25.92
Comment 2 Kobboi 2009-04-17 22:52:22 UTC
> This should be fixed in 2.25.92

But reappears in 2.26.1... 

Comment 3 Xitij Ritesh Patel 2009-04-21 20:40:50 UTC
I ran into this issue as well. I traced it down to line 339 in libgnome-desktop/gnome-rr.c. It's trying to use a new function, XRRGetScreenResourcesCurrent, which is only available in Xrandr 1.3 and higher. Now, it supposedly performs a runtime check to use this function only when Xrandr 1.3 is installed, but it seems like this doesn't seem to work. A proper solution would be to patch this. I'll leave that in someone's more capable hands.

For a more immediate solution, unmask x11-libs/libXrandr-1.3.0 and install it. Try emerging gnome-desktop again, and it should compile. Version 1.3.0 is in the gnome-overlay. Another solution? Modify the gnome-desktop ebuild to include libXrandr as a dependency, or require at least version 1.3.0.
Comment 4 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-04-22 12:48:25 UTC
*** Bug 267087 has been marked as a duplicate of this bug. ***
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-04-22 22:20:11 UTC
there's something wrong in what you say, I only have xrandr-1.2.3 on my machines and both still builds just fine.
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2009-04-27 12:12:32 UTC
Please attach a full build.log as portage strongly suggests.

Thanks
Comment 7 Helmut Eberharter 2009-04-27 12:23:03 UTC
(In reply to comment #3)
> For a more immediate solution, unmask x11-libs/libXrandr-1.3.0 and install it.

This fixed it here.
Comment 8 Rémi Cardona (RETIRED) gentoo-dev 2009-04-27 12:38:14 UTC
libXrandr 1.3.0 is not in the gnome overlay, but only in the X11 one...

Please, either of you, attach the full build.log so we can actually figure out what is going on.

Thanks
Comment 9 Marcel Jaeschke 2009-04-27 20:24:10 UTC
Created attachment 189641 [details]
build.log for gnome-desktop-2.26.1
Comment 10 Marcel Jaeschke 2009-04-27 20:25:49 UTC
Created attachment 189644 [details]
build.log for gnome-power-manager-2.26.1
Comment 11 Rémi Cardona (RETIRED) gentoo-dev 2009-04-28 13:07:13 UTC
I think there's something weird on your system. In the first build.log, that function should only be built if you have libXrandr 1.3 or newer.

Please try to either upgrade fully to the x11 overlay or drop it completely, and then rebuild gtk+, gnome-desktop and gnome-power-manager.

If you have stuff in /usr/local, get rid of it too.

That should work. If it doesn't, please don't hesitate to reopen this bug.

Thanks
Comment 12 niogic 2009-06-16 18:02:41 UTC
I' can't compile gnome-desktop-2.6.26.2 without >=x11-libs/libXrandr-1.3.0

Fresh install following handbook on stable x86 (apart for gnome-light and deps).
Nothing weird on my system.

checking for python script directory... ${prefix}/lib/python2.5/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.5/site-packages
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... yes
checking for dgettext in libc... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... (cached) /usr/bin/msgfmt
checking for dcgettext... yes
checking if msgfmt accepts -c... yes
checking for gmsgfmt... (cached) /usr/bin/gmsgfmt
checking for xgettext... (cached) /usr/bin/xgettext
checking for mawk... no
checking for gawk... /bin/gawk
checking for perl5... no
checking for perl... /usr/bin/perl
checking for gtkdoc-check... no
checking for gtkdoc-rebase... no
checking for gtkdoc-mkpdf... no
checking whether to build gtk-doc documentation... no
checking for sed... /bin/sed
configure: creating ./config.status
config.status: creating Makefile
config.status: creating shave
config.status: creating shave-libtool
config.status: creating gnome-about/Makefile
config.status: creating gnome-about/gnome-about.desktop.in
config.status: creating gnome-about/headers/Makefile
config.status: creating libgnome-desktop/Makefile
config.status: creating libgnome-desktop/libgnome/Makefile
config.status: creating libgnome-desktop/libgnomeui/Makefile
config.status: creating libgnome-desktop/gnome-desktop-2.0.pc
config.status: creating libgnome-desktop/gnome-desktop-2.0-uninstalled.pc
config.status: creating docs/Makefile
config.status: creating docs/reference/Makefile
config.status: creating docs/reference/gnome-desktop/Makefile
config.status: creating gnome-version.xml.in
config.status: creating po/Makefile.in
config.status: creating pixmaps/Makefile
config.status: creating desktop-docs/Makefile
config.status: creating desktop-docs/fdl/Makefile
config.status: creating desktop-docs/gpl/Makefile
config.status: creating desktop-docs/lgpl/Makefile
config.status: creating man/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default-1 commands
config.status: executing po/stamp-it commands
# INTLTOOL_MAKEFILE
make -j4 
Making all in po
Making all in libgnome-desktop
Making all in libgnome
Making all in libgnomeui
  CC    gnome-desktop-item.o
  CC    gnome-desktop-utils.o
  CC    gnome-desktop-thumbnail.o
  CC    gnome-thumbnail-pixbuf-utils.o
  CC    gnome-bg.o
  CC    gnome-bg-crossfade.o
  CC    display-name.o
  CC    gnome-rr.o
  CC    gnome-rr-config.o
  CC    gnome-rr-labeler.o
  CC    edid-parse.o
  CC    test-ditem.o
gnome-rr.c: In function ‘fill_out_screen_info’:
gnome-rr.c:344: warning: implicit declaration of function ‘XRRGetScreenResourcesCurrent’
gnome-rr.c:344: warning: nested extern declaration of ‘XRRGetScreenResourcesCurrent’
gnome-rr.c:344: warning: assignment makes pointer from integer without a cast
  LINK  libgnome-desktop-2.la
  LINK  test-ditem
./.libs/libgnome-desktop-2.so: undefined reference to `XRRGetScreenResourcesCurrent'
collect2: ld returned 1 exit status
distcc[1300] ERROR: compile (null) on localhost failed
make[3]: *** [test-ditem] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Please reopen this bug: seems gnome 2.26 depends on >=x11-libs/libXrandr-1.3.0
Comment 13 niogic 2009-06-16 18:04:21 UTC
Created attachment 194910 [details]
emerge --info

My emerge --info, just in case. I have USE="xcb" if it matters.
Comment 14 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-06-17 06:29:16 UTC
*** Bug 274208 has been marked as a duplicate of this bug. ***
Comment 15 Rémi Cardona (RETIRED) gentoo-dev 2009-06-17 06:38:50 UTC
Like always, please provide a _full_ build.log like portage suggests.

Thanks
Comment 16 Mart Raudsepp gentoo-dev 2009-06-25 08:38:14 UTC
The problem in gnome-desktop happens for me when I have randrproto-1.3 but libXrandr-1.2.x.
The code in gnome-desktop goes like this:

        /* XRRGetScreenResourcesCurrent is less expensive than
         * XRRGetScreenResources, however it is available only
         * in RandR 1.3 or higher
         */
#if (RANDR_MAJOR > 1 || (RANDR_MAJOR == 1 && RANDR_MINOR >= 3))
        /* Runtime check for RandR 1.3 or higher */
        if (info->screen->rr_major_version == 1 && info->screen->rr_minor_version >= 3)
            resources = XRRGetScreenResourcesCurrent (xdisplay, xroot);
        else
            resources = XRRGetScreenResources (xdisplay, xroot);
#else
        resources = XRRGetScreenResources (xdisplay, xroot);
#endif


As the header is for 1.3, it happily uses XRRGetScreenResourcesCurrent, but as the library doesn't have it - and I suspect -Wl,--no-undefined is passed to linker - it fails linking, regardless of rr_minor_version being 2 (for RANDR version 1.2).

I'm not sure how to handle such version differences. Maybe gnome-desktop should have a configure check for 1.3 library version. Or maybe some packaging tricks should tie the versions together.
Comment 17 Rémi Cardona (RETIRED) gentoo-dev 2009-06-25 13:10:18 UTC
IMHO this is going to be hard to fix. Here's the problem :

RANDR_{MAJOR,MINOR} defines the protocol includes version, ie x11-proto/randrproto, not the X extension library x11-libs/libXrandr.

So basically, gnome-desktop is testing for the wrong variable.

Possible solutions include, in no particular order :

1) make gnome-desktop's configure test the version of xrandr.pc and use AC_DEFINE to propagate the version down into the C code

2) put blockers in all X libs' ebuilds

3) have ranged deps in a new EAPI

I'm not exactly fond of any of those solutions because they are either gross (#1 and #2) or they will likely never happen in my lifetime (#3).

Actually, there's another solution :

4) stabilize randrproto and libXrandr 1.3 on all arches

I think I'll work on that last option :)
Comment 18 Ioannis Aslanidis (RETIRED) gentoo-dev 2009-07-10 22:17:09 UTC
Just FYI, I experience the same issue.
Comment 19 Evgeniy a.k.a Scolzyashii Semenov 2009-08-08 22:22:05 UTC
Faced with similar situations. The decision follows:
- Emerge libXrandr-1.3.0
- Lafilefixer - justfixit
- Emerge gnome
Comment 20 Luis Díaz 2009-08-16 22:23:47 UTC
Same problem. With libXrandr 1.2.3 and randrproto 1.3 gnome-desktop 2.26.3 fails with 

./.libs/libgnome-desktop-2.so: undefined reference to `XRRGetScreenResourcesCurrent'

After update libXrandr to 1.3.0, the compilations is performed correctly.
Comment 21 Rémi Cardona (RETIRED) gentoo-dev 2009-08-19 17:25:41 UTC
*** Bug 280462 has been marked as a duplicate of this bug. ***
Comment 22 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-08-23 01:50:55 UTC
still waiting on a step by step solution from remi for inclusion in migration guide, since this is likely that main tree user will hit this problem sooner than later.
Comment 23 Rémi Cardona (RETIRED) gentoo-dev 2009-08-23 07:23:52 UTC
The correct solution is #1 I presented back in comment 17. If this is really urgent, please let me know and I'll try to cook up a patch ASAP.

Cheers
Comment 24 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-09-06 14:09:17 UTC
It might be worth it to test against gnome-desktop-2.27.91 and gnome-power-manager-2.27.91 from the gnome-overlay. The former has some GnomeRR bugfixes.
Comment 25 Rémi Cardona (RETIRED) gentoo-dev 2009-09-11 19:19:52 UTC
Created attachment 203823 [details, diff]
patch for gnome-desktop
Comment 26 Rémi Cardona (RETIRED) gentoo-dev 2009-09-11 19:35:01 UTC
Created attachment 203829 [details, diff]
patch for gnome-power-manager
Comment 27 Romain Perier (RETIRED) gentoo-dev 2009-09-22 09:32:03 UTC
Someone could test these patches ?
Comment 28 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-09-22 12:14:24 UTC
I'm supposed to do that, but this was low-priority compared to bluez-4 etc. I'll take a look at it.
Comment 29 Rémi Cardona (RETIRED) gentoo-dev 2009-09-29 18:24:03 UTC
*** Bug 286958 has been marked as a duplicate of this bug. ***
Comment 30 Justin Lecher (RETIRED) gentoo-dev 2009-10-02 06:41:14 UTC
*** Bug 287296 has been marked as a duplicate of this bug. ***
Comment 31 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-10-26 23:15:19 UTC
remi applied the patches earlier today to g-p-m-2.26.4-rsomething.
Comment 32 Kobboi 2009-12-07 23:07:49 UTC
(In reply to comment #31)
> remi applied the patches earlier today to g-p-m-2.26.4-rsomething.
> 

Still having the problem on gnome-desktop-2.26.3. Manually upgraded libXrandr solved it.
Comment 33 CJ Kucera 2010-07-28 19:51:11 UTC
This affected me when emerging gnome-desktop-2.28.2-r1 just now.  A manual xrandr upgrade took care of it.

Perhaps just add it into DEPENDS?