Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81183 - gaim fails to detect Session Management due to changes in xorg
Summary: gaim fails to detect Session Management due to changes in xorg
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Gaim Bugs Crew
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-07 17:36 UTC by Ginsu
Modified: 2005-02-17 10:55 UTC (History)
1 user (show)

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


Attachments
Fixes gaim's configure when X libs are in /usr/lib (gaim.patch,937 bytes, patch)
2005-02-07 18:05 UTC, Ginsu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ginsu 2005-02-07 17:36:51 UTC
Due to the recent changes in the way xorg gets installed directly into /usr instead of /usr/X11R6, gaim's configure script and I'm sure others fail.  Part of gaim's detection of Session Management includes a check which uses -I$x_includes.  Because the X libs are in /usr/lib the $x_includes variable is empty so the gcc command includes an empty -I:
     configure:31161: gcc -c -g -O2 -Wall -g3  -I conftest.c >&5

This fails so gaim disables Session Management as well as XScreenSaver support.  

A proposed solution would be to put an if statement on line 382 in the configure.ac to check if the $x_includes is not empty before appending to CPPFLAGS,

Reproducible: Always
Steps to Reproduce:
1. Install the xorg snapshots that put X libs in /usr/lib
2. Compile gaim

Actual Results:  
Session Management and XScreenSaver support gets disabled.

Expected Results:  
They should be enabled.
Comment 1 Ginsu 2005-02-07 17:37:31 UTC
Also a simliar if statement would be needed on line 354.
Comment 2 Ginsu 2005-02-07 17:40:36 UTC
Actually, after looking through the configure script, the 2 lines should jsut be changed to be CPPFLAGS="$CPPFLAGS $x_incpath_add" instead of CPPFLAGS="$CPPFLAGS -I$x_includes".

Early on in the configure script $x_incpath_add gets set to either "" or -I$x_includes based on if $x_includes is empty or not.
Comment 3 Ginsu 2005-02-07 18:05:56 UTC
Created attachment 50689 [details, diff]
Fixes gaim's configure when X libs are in /usr/lib
Comment 4 Don Seiler (RETIRED) gentoo-dev 2005-02-08 07:25:47 UTC
This patch causes the build to fail for me on xorg-x11-6.8.1.902.  We need to make sure whatever patches we apply will work for all versions.  I don't think we support xfree anymore so just xorg-x11 is of concern.
Comment 5 Ginsu 2005-02-08 10:06:18 UTC
Ok, thats weird that it fails, but I found a much better solution.  Just pass --x-includes=/usr/X11R6/include to econf and it will properly detect the headers being in /usr/X11R6/include and the variable won't be empty and the test won't fail.
Comment 6 Don Seiler (RETIRED) gentoo-dev 2005-02-08 13:42:39 UTC
(14:25:36) ajax: if they're pulling in the X headers by their short names then the app is busted
Comment 7 Don Seiler (RETIRED) gentoo-dev 2005-02-08 14:09:27 UTC
/usr/include/X11 is a symlink to /usr/X11R6/include/X11, so it should be found.  Do you not have that symlink in .904?
Comment 8 Ginsu 2005-02-08 15:45:01 UTC
.904 totally got rid of /usr/X11R6 and it is just a symlink to ../usr.  So my /usr/include/X11 is a real directory.  According to the comments in the ./configure script...

# We can't assume that $x_libraries will be set, because autoconf does not
# set it in the case when the X libraries are in a standard place.
# Ditto for $x_includes

So autoconf picks up that the includes are in /usr/include and doesn't set the variable.
Comment 9 J. Alexander Treuman 2005-02-12 04:35:06 UTC
The comment is explaining the workaround that follows it. Unfortunately later on the gaim developers completely ignore the issue:

CPPFLAGS="$CPPFLAGS -I$x_includes"

It should be:

CPPFLAGS="$CPPFLAGS $x_incpath_add"

in order to make use of the workaround. The same line is in there twice, both for xss and xsm support.
Comment 10 Ginsu 2005-02-12 13:39:13 UTC
My original patch did exactly that.  But as per comment #4, aparently it didn't work.
Comment 11 J. Alexander Treuman 2005-02-13 04:41:42 UTC
Ah sorry, I didn't see that. I was just helping a friend who was hit by the bug and wanted to figure out why the --x-includes=/usr/X11R6/include solution worked.

The reason your patch doesn't work is because you need to regenerate the configure script from configure.ac with the GNU autotools. Unfortunately gaim doesn't distribute their autogen.sh (it's only in cvs), so that's not really a clean solution. imho, it would be better for Gentoo to patch configure directly, and send the configure.ac patch upstream for inclusion.
Comment 12 Ginsu 2005-02-13 12:35:13 UTC
When I was testing it on my computer with .904 it worked fine, I put a call to autoconf in my ebuild.  But I didn't understand why it caused gaim on .902 to fail.  I assume he also ran autoconf to regenerate the configure, but it should have worked just the same w/o the patch.

The --x-includes works because when autoconf detects that the X includes are in /usr/include and not /usr/X11R6 it doesn't set the variable and the test fails.  Forcing it to /usr/X11R6/includes make it think it's out of the standard path so it sets the variable.  I think thats the easiest solution instead of directionly patching configure which is not right.
Comment 13 Don Seiler (RETIRED) gentoo-dev 2005-02-17 10:55:53 UTC
I'm going to let this go in 1.1.2 and wait for the fix in 1.1.3, which should be out tonight.
---
(11:38:47) nosnilmot: rizzo: Gaim 1.1.3 should correctly detect X screensaver and X session management support for you bleeding edge gentooers