Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156784 - x11-base/x11-drm-20060608 failed with kernel-2.6.19
Summary: x11-base/x11-drm-20060608 failed with kernel-2.6.19
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bryan Stine (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: kernel-2.6.19
  Show dependency tree
 
Reported: 2006-12-01 04:00 UTC by Gianluca Parmiggiani
Modified: 2007-01-03 23:37 UTC (History)
17 users (show)

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


Attachments
x11-drm-20061207.ebuild (x11-drm-20061207.ebuild,6.35 KB, text/plain)
2006-12-10 14:01 UTC, Santiago M. Mola (RETIRED)
Details
x11-drm-20061207-linux-core-Makefile.patch (x11-drm-20061207-linux-core-Makefile.patch,1.09 KB, patch)
2006-12-10 14:02 UTC, Santiago M. Mola (RETIRED)
Details | Diff
x11-drm-20061207.ebuild (x11-drm-20061207.ebuild,6.28 KB, text/plain)
2006-12-11 04:57 UTC, Santiago M. Mola (RETIRED)
Details
x11-drm-20060608-r1.ebuild (x11-drm-20060608.ebuild,6.32 KB, text/plain)
2006-12-16 14:31 UTC, David Li
Details
x11-drm-20060608.ebuild (x11-drm-20060608.ebuild,6.47 KB, text/plain)
2006-12-30 18:08 UTC, David Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gianluca Parmiggiani 2006-12-01 04:00:01 UTC
make[1]: Entering directory `/usr/src/linux-2.6.19-gentoo'
  CC [M]  /var/tmp/portage/x11-base/x11-drm-20060608/work/drm/linux-core/drm_auth.o
In file included from /var/tmp/portage/x11-base/x11-drm-20060608/work/drm/linux-core/drm_auth.c:36:
/var/tmp/portage/x11-base/x11-drm-20060608/work/drm/linux-core/drmP.h:44:26: error: linux/config.h: No such file or directory
make[2]: *** [/var/tmp/portage/x11-base/x11-drm-20060608/work/drm/linux-core/drm_auth.o] Error 1
make[1]: *** [_module_/var/tmp/portage/x11-base/x11-drm-20060608/work/drm/linux-core] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.19-gentoo'
make: *** [modules] Error 2
Comment 1 Yangtse Su 2006-12-01 07:36:16 UTC
sed -i "s:#include <linux/config.h>:#ifndef _LINUX_CONFIG_H\n\
#define _LINUX_CONFIG_H\n\
#include <linux/autoconf.h>\n\
#endif:" *.c

sed -i "s:#include <linux/config.h>:#ifndef _LINUX_CONFIG_H\n\
#define _LINUX_CONFIG_H\n\
#include <linux/autoconf.h>\n\
#endif:" *.h

hope this bug be fixed soon.

the same problem with ati-drivers.
confgi.h had been removed from the new kernel.
Comment 2 William Keaney 2006-12-02 15:55:41 UTC
Are we even sure that, 6 months later, the drivers in this package are more up-to-date than the in-kernel ones?  Perhaps some sort of version bump is more in order.
Comment 3 Yangtse Su 2006-12-03 16:35:24 UTC
4 days passed.
this bug is still "Leave as NEW"
Comment 4 Rafal Boniecki 2006-12-04 09:24:19 UTC
As a temporary workaround you may be interested in using live ebuild, which is found here:
http://sturmartillerie.org/portage/mesa-cvs/x11-base/x11-drm/
Comment 5 Marc Doughty 2006-12-05 07:02:03 UTC
If you search bugzilla for '2.6.19', you'll see that a TON of packages that build external sources against the kernel are failing.

I have a ticket open to bump x11-drm to a more recent version.

The in-kernel drivers are stale and old compared to the ones from the DRM folks, and it makes a lot of sense to use external ones that can be toyed-with and/or upgraded and downgraded to suit a user's needs.
Comment 6 Francisco José Cañizares Santofimia 2006-12-07 14:54:03 UTC
(In reply to comment #5)
> If you search bugzilla for '2.6.19', you'll see that a TON of packages that
> build external sources against the kernel are failing.

:O And anyone knows why this is happening? Kernel fault?

Comment 7 Marc Doughty 2006-12-08 05:00:41 UTC
(In reply to comment #6)
> :O And anyone knows why this is happening? Kernel fault?

I'm totally out of my area of expertise, this is all inference, but it seems that a major kbuild cleanup  results in a file (config.h?) not being built, and a lot of Gentoo's ebuilds use said file to build against the kernel sources.

Packages that make modules from outside the shipping kernel can't seem to build correctly, and those that can are getting sandbox errors.
Comment 8 Santiago M. Mola (RETIRED) gentoo-dev 2006-12-10 14:01:31 UTC
Created attachment 103760 [details]
x11-drm-20061207.ebuild

This ebuild works with kernel 2.6.19. However, I haven't tested with 2.4.x (and probably it won't work).
Comment 9 Santiago M. Mola (RETIRED) gentoo-dev 2006-12-10 14:02:36 UTC
Created attachment 103761 [details, diff]
x11-drm-20061207-linux-core-Makefile.patch

Misc fixes to linux-core/Makefile (adapted from the previous gentoo patches).
Comment 10 Santiago M. Mola (RETIRED) gentoo-dev 2006-12-10 14:04:04 UTC
The snapshot I've used to build with kernel 2.6.19 can be found here:
http://personales.alumno.upv.es/sanmove/stuff/x11-drm-20061207.tar.bz2
Comment 11 Sergey Ilinykh 2006-12-11 01:22:12 UTC
(In reply to comment #10)
> The snapshot I've used to build with kernel 2.6.19 can be found here:
> http://personales.alumno.upv.es/sanmove/stuff/x11-drm-20061207.tar.bz2
> 
it tries to download something like blabla-kernelsource-blabla which not found on that server
Comment 12 Santiago M. Mola (RETIRED) gentoo-dev 2006-12-11 03:00:14 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > The snapshot I've used to build with kernel 2.6.19 can be found here:
> > http://personales.alumno.upv.es/sanmove/stuff/x11-drm-20061207.tar.bz2
> > 
> it tries to download something like blabla-kernelsource-blabla which not found
> on that server
> 

Sure, I named the files incorrectly. You can edit the ebuild and write the correct file name on SRC_URI. I'll correct the ebuild and do some tests later.
Comment 13 Santiago M. Mola (RETIRED) gentoo-dev 2006-12-11 04:57:36 UTC
Created attachment 103792 [details]
x11-drm-20061207.ebuild

Fixed ebuild.
Comment 14 Florian Berger 2006-12-16 00:16:49 UTC
(In reply to comment #10)
> The snapshot I've used to build with kernel 2.6.19 can be found here:
> http://personales.alumno.upv.es/sanmove/stuff/x11-drm-20061207.tar.bz2

Hi,
that URI yields an "Internal Server Error" and "Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request." I'd really like to check out x11-drm-20061207, since x11-drm-20060608 fails with the very same config.h error here.

BTW, why is x11-drm-20060608 marked "stable" for x86 when it so obviously fails with a recent kernel?

Best regards, Florian
Comment 15 Bastien Armand 2006-12-16 05:47:11 UTC
Hi,

I have a simple work around.

Before emerging x11-drm you can create config.h, for example (assuming kernel is a symblic lynk for a 2.6.19 kernel) :

ln -s /usr/include/linux/config.h /usr/src/kernel/include/linux/config.h 

It is not very clean but it works.
Comment 16 Francisco José Cañizares Santofimia 2006-12-16 06:19:18 UTC
(In reply to comment #15)
> Hi,
> 
> I have a simple work around.

It works! :DDD

Thanks. :)
Comment 17 David Li 2006-12-16 14:31:31 UTC
Created attachment 104170 [details]
x11-drm-20060608-r1.ebuild

Well, it would appear that the long term solution is to update the snapshot to something that works.

In the meanwhile, we have Velasco's ebuild which seems to have hosting problems and droop's quick hack. This ebuild just has one extra line that removes references to config.h that you can dump into your overlay and should JustWork(TM).
Comment 18 Santiago M. Mola (RETIRED) gentoo-dev 2006-12-17 03:50:09 UTC
(In reply to comment #14)
> that URI yields an "Internal Server Error" and "Additionally, a 403 Forbidden
> error was encountered while trying to use an ErrorDocument to handle the
> request." 

The links works again. Sorry for the inconvenience.

> 
> BTW, why is x11-drm-20060608 marked "stable" for x86 when it so obviously fails
> with a recent kernel?

x11-drm is marked stable because it works with the stable kernels. 2.6.19 is not marked stable yet.
Comment 19 Florian Berger 2006-12-17 04:05:35 UTC
(In reply to comment #18)
Oh yes, I see. I'm just too used to have sys-kernel/vanilla-sources in package.keywords. ;-)

x11-drm-20060608-r1.ebuild from comment 17 does fine here when emerged with FEATURES="-sandbox" because of the 2.6.19 sandbox issue that breaks emerging. Thanks, now DRM is running again.

Florian
Comment 20 Daniel Drake (RETIRED) gentoo-dev 2006-12-19 15:33:09 UTC
(In reply to comment #17)
> Created an attachment (id=104170) [edit]
> x11-drm-20060608-r1.ebuild

This is incorrect - the sed needs to only happen on >=2.6.18
Try using kernel_is

Another approach would be to unconditionally apply a patch which does something like

#include <linux/version.h>
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
#include <linux/config.h>
#endif


Maintainers, please ensure this is fixed in the stable tree ASAP
Comment 21 Daniel Drake (RETIRED) gentoo-dev 2006-12-30 17:26:49 UTC
Bump... any volunteers to produce a patch based on the info in my last comment?
Comment 22 David Li 2006-12-30 18:08:19 UTC
Created attachment 105022 [details]
x11-drm-20060608.ebuild

> Bump... any volunteers to produce a patch based on the info in my last comment?
Sure. Sorry, I didn't intend the previous one to be an actual fix. It is still probably better for maintainers to just grab a new CVS snapshot.

I guess this is no longer a -r1 because there is no reason to reemerge if it already works and -r1 is already used for FreeBSD stuffs.
Comment 23 Daniel Drake (RETIRED) gentoo-dev 2007-01-02 15:06:11 UTC
It needs to be fixed in the stable tree so a patch is necessary even if a new version enters portage.

Also you use a kernel-mod function in a linux-mod eclass, that won't work. A patch would still be better.
Comment 24 Bryan Stine (RETIRED) gentoo-dev 2007-01-03 23:37:18 UTC
Okay, I've added a patch to do conditional includes per dsd's suggestion. New patchball is version 0.3 for the 20060608 ebuilds. I've tested building against Gentoo's 2.6.18, 2.6.19 and 2.4.32 sources. Any problems, let me know.

I haven't added a new snapshot yet. Upstream has removed 2.4 kernel support, so I'll need to do some work on the ebuild to compensate.