xfree86 compilation failure due to naming conflict (linux 2.4.17, Xfree86 4.1.0)
A message that is not in the archive (sent off-list or not yet received): [email protected]
On 2002.01.10 05:39 jon svendsen wrote:
Hello,
The SiS DRM drivers in the 2.4.17 linux kernel has caused the possibility of failure to compile xfree86 4.1.0 (and CVS). The cause of the conflict is the definition of CONFIG_DRM_SIS, used both in kernel configuration and in the xfree86 DRM code.
If DRM is enabled in the kernel (CONFIG_DRM) but the SiS driver is disabled or configured as a module, <linux/autoconf.h>, included from <linux/config.h>, will contain an #undef CONFIG_DRM_SIS.
<linux/config.h> is included from xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h in the xfree86 source tree. The file xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drmSiS.c does a #define CONFIG_DRM_SIS prior to including this file in order to have necessary parts of it included.
It flows something like this:
xf86drmSiS.c:
#define CONFIG_DRM_SIS
#include "drm.h"
drm.h:
#include <linux/config.h> // #undef CONFIG_DRM_SIS
#ifdef CONFIG_DRM_SIS
// stuff necessary for compilation of xf86drmSiS.c #endif
And compilation of xf86drmSiS.c fails.
I'd supply a patch, but I'm not familiar enough with the relationship between the kernel and xfree86 drivers to know what the proper solution would be, nor am I certain if the modification should happen in linux or in xfree86. Hopefully I have supplied enough information facilitiate a fairly simple solution.
Jon Svendsen
--- Sorcerer GNU Linux (http://sorcerer.wox.org)
Quoted 5 lines
I'd supply a patch, but I'm not familiar enough with the relationship between the kernel and xfree86 drivers to know what the proper solution would be, nor am I certain if the modification should happen in linux or in xfree86. Hopefully I have supplied enough information facilitiate a fairly simple solution.
Fix the XFree86 side I think. Its not shown up because DRI as shipped in 4.1 didn't actually work for the SIS cards