Bug 6211

Summary: Won't compile on 2.6.9
Product: DRI Reporter: Shixin Zeng <shixinzeng>
Component: DRM/otherAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: highest    
Version: DRI git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
patch to workaround this issue none

Description Shixin Zeng 2006-03-10 15:47:31 UTC
CVS(HEAD) won't compile on 2.6.9
#uname -a 
Linux SHIXIN-SJTU 2.6.9-22.0.2.EL #1 Tue Jan 17 05:51:43 CST 2006 x86_64 x86_64
x86_64 GNU/Linux
# make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via
+ ln -s ../shared-core/drm.h drm.h
+ ln -s ../shared-core/drm_sarea.h drm_sarea.h
+ ln -s ../shared-core/mga_dma.c mga_dma.c
+ ln -s ../shared-core/mga_drm.h mga_drm.h
+ ln -s ../shared-core/mga_drv.h mga_drv.h
+ ln -s ../shared-core/mga_irq.c mga_irq.c
+ ln -s ../shared-core/mga_state.c mga_state.c
+ ln -s ../shared-core/mga_ucode.h mga_ucode.h
+ ln -s ../shared-core/mga_warp.c mga_warp.c
+ ln -s ../shared-core/r128_drv.h r128_drv.h
+ ln -s ../shared-core/r128_drm.h r128_drm.h
+ ln -s ../shared-core/r128_cce.c r128_cce.c
+ ln -s ../shared-core/r128_state.c r128_state.c
+ ln -s ../shared-core/r128_irq.c r128_irq.c
+ ln -s ../shared-core/radeon_drv.h radeon_drv.h
+ ln -s ../shared-core/radeon_drm.h radeon_drm.h
+ ln -s ../shared-core/radeon_cp.c radeon_cp.c
+ ln -s ../shared-core/radeon_irq.c radeon_irq.c
+ ln -s ../shared-core/radeon_mem.c radeon_mem.c
+ ln -s ../shared-core/radeon_state.c radeon_state.c
+ ln -s ../shared-core/r300_cmdbuf.c r300_cmdbuf.c
+ ln -s ../shared-core/r300_reg.h r300_reg.h
+ ln -s ../shared-core/sis_drv.h sis_drv.h
+ ln -s ../shared-core/sis_drm.h sis_drm.h
+ ln -s ../shared-core/sis_ds.c sis_ds.c
+ ln -s ../shared-core/sis_ds.h sis_ds.h
+ ln -s ../shared-core/sis_mm.c sis_mm.c
+ ln -s ../shared-core/tdfx_drv.h tdfx_drv.h
+ ln -s ../shared-core/via_drm.h via_drm.h
+ ln -s ../shared-core/via_drv.h via_drv.h
+ ln -s ../shared-core/via_mm.h via_mm.h
+ ln -s ../shared-core/via_ds.h via_ds.h
+ ln -s ../shared-core/via_3d_reg.h via_3d_reg.h
+ ln -s ../shared-core/via_drv.c via_drv.c
+ ln -s ../shared-core/via_ds.c via_ds.c
+ ln -s ../shared-core/via_irq.c via_irq.c
+ ln -s ../shared-core/via_map.c via_map.c
+ ln -s ../shared-core/via_mm.c via_mm.c
+ ln -s ../shared-core/via_dma.c via_dma.c
+ ln -s ../shared-core/via_verifier.c via_verifier.c
+ ln -s ../shared-core/via_verifier.h via_verifier.h
+ ln -s ../shared-core/via_video.c via_video.c
+ ln -s ../shared-core/mach64_drv.h mach64_drv.h
+ ln -s ../shared-core/mach64_drm.h mach64_drm.h
+ ln -s ../shared-core/mach64_dma.c mach64_dma.c
+ ln -s ../shared-core/mach64_irq.c mach64_irq.c
+ ln -s ../shared-core/mach64_state.c mach64_state.c
+ ln -s ../shared-core/i915_drv.h i915_drv.h
+ ln -s ../shared-core/i915_drm.h i915_drm.h
+ ln -s ../shared-core/i915_irq.c i915_irq.c
+ ln -s ../shared-core/i915_mem.c i915_mem.c
+ ln -s ../shared-core/i915_dma.c i915_dma.c
+ ln -s ../shared-core/savage_drv.h savage_drv.h
+ ln -s ../shared-core/savage_drm.h savage_drm.h
+ ln -s ../shared-core/savage_bci.c savage_bci.c
+ ln -s ../shared-core/savage_state.c savage_state.c
+ ln -s ../shared-core/nv_drv.h nv_drv.h
sh ../scripts/create_linux_pci_lists.sh < ../shared-core/drm_pciids.txt
rm -f linux
ln -s . linux
make -C /lib/modules/2.6.9-22.0.2.EL/build  SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-22.0.2.EL-x86_64'
  CC [M]  /home/zsx/drm/linux-core/drm_auth.o
/home/zsx/drm/linux-core/drm_auth.c: In function `drm_getmagic':
/home/zsx/drm/linux-core/drm_auth.c:178: warning: type defaults to `int' in
declaration of `DEFINE_SPINLOCK'
/home/zsx/drm/linux-core/drm_auth.c:178: warning: parameter names (without
types) in function declaration
/home/zsx/drm/linux-core/drm_auth.c:188: error: `lock' undeclared (first use in
this function)
/home/zsx/drm/linux-core/drm_auth.c:188: error: (Each undeclared identifier is
reported only once
/home/zsx/drm/linux-core/drm_auth.c:188: error: for each function it appears in.)
make[2]: *** [/home/zsx/drm/linux-core/drm_auth.o] Error 1
make[1]: *** [_module_/home/zsx/drm/linux-core] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-22.0.2.EL-x86_64'
make: *** [modules] Error 2
Comment 1 Shixin Zeng 2006-03-16 01:56:23 UTC
Created attachment 4951 [details] [review]
patch to workaround this issue

This patch add the macro define when it wasn't defined.
With the patch, it compiles and works fine for me.
Comment 2 Shixin Zeng 2006-03-16 02:00:38 UTC
(In reply to comment #1)
> Created an attachment (id=4951) [edit]
> patch to workaround this issue
> 
> This patch add the macro define when it wasn't defined.
> With the patch, it compiles and works fine for me.

In fact, the macro definition was taken from newer linux kernel, so I think it
would be fine to commit.
Comment 3 Alan Hourihane 2006-06-23 09:28:18 UTC
applied.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.