Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56338 - ati-drivers DRM module fails to compile with gcc 3.4 when CONFIG_REGPARM kernel option enabled
Summary: ati-drivers DRM module fails to compile with gcc 3.4 when CONFIG_REGPARM kern...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-07 08:49 UTC by Charlie Brackett
Modified: 2004-08-10 20:41 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Brackett 2004-07-07 08:49:13 UTC
When using gcc 3.4 enable the CONFIG_REGPARM option in the kernel (gentoo-dev-sources-2.6.7-r8 in this case) causes compilation of the DRM module in ati-drivers to fail.




>>> Unpacking source...
>>> Unpacking fglrx-4.3.0-3.9.0.i386.rpm
 [32;01m*[0m Applying fglrx-2.6-vmalloc-vmaddr.patch...
[A[73G  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying fglrx-2.6-get-page.patch...
[A[73G  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying fglrx-3.9.0-regparm.patch...
[A[73G  [34;01m[ [32;01mok[34;01m ][0m
>>> Source unpacked.
 [32;01m*[0m Building the DRM module...
make: Entering directory `/usr/src/linux-2.6.7-gentoo-r8'
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/agp3.o
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/nvidia-agp.o
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/agpgart_be.o
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/i7505-agp.o
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.o
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:794: error: conflicting types for '__ke_block_all_signals'
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.h:151: error: previous declaration of '__ke_block_all_signals' was here
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:794: error: conflicting types for '__ke_block_all_signals'
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.h:151: error: previous declaration of '__ke_block_all_signals' was here
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c: In function `__ke_block_all_signals':
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:796: warning: passing arg 1 of `block_all_signals' from incompatible pointer type
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c: In function `__ke_request_irq':
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:1828: warning: assignment from incompatible pointer type
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c: At top level:
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:3085: error: conflicting types for '__ke_smp_call_function'
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.h:400: error: previous declaration of '__ke_smp_call_function' was here
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:3085: error: conflicting types for '__ke_smp_call_function'
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.h:400: error: previous declaration of '__ke_smp_call_function' was here
make[1]: *** [/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.o] Error 1
make: *** [_module_/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod] Error 2
make: Leaving directory `/usr/src/linux-2.6.7-gentoo-r8'
 [33;01m*[0m DRM module not built
nostrip

>>> Install ati-drivers-3.9.0-r1 into /var/tmp/portage/ati-drivers-3.9.0-r1/image/ category media-video
install: cannot stat `/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/fglrx.ko': No such file or directory
install: cannot stat `/home/portage-overlay/media-video/ati-drivers/files/09ati': No such file or directory
man:
making executable: /usr/X11R6/lib/libfglrx_gamma.so.1.0




The function declaration in firegl_public.h does not match the one in firegl_public.c.  This patch will make the header match the code:




--- build_mod.old/firegl_public.h	2004-07-06 17:16:21.756438880 -0500
+++ build_mod/firegl_public.h	2004-07-06 17:14:18.253214224 -0500
@@ -148,7 +148,7 @@
 extern void ATI_API_CALL __ke_set_current_state_task_interruptible(void);
 extern void ATI_API_CALL __ke_set_current_state_task_running(void);
 extern void ATI_API_CALL __ke_configure_sigmask(__ke_sigset_t *pSigMask);
-extern void ATI_API_CALL __ke_block_all_signals(int (*notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask);
+extern void ATI_API_CALL __ke_block_all_signals(int (*ATI_API_CALL notifier)(void *priv), void *pPriv, __ke_sigset_t *pSigMask);
 extern void ATI_API_CALL __ke_unblock_all_signals(void);
 
 extern unsigned long ATI_API_CALL __ke__cmpxchg(volatile void *ptr, unsigned long old,                      
@@ -397,7 +397,7 @@
 int ATI_API_CALL __ke_is_athlon(void);
 int ATI_API_CALL __ke_has_PSE(void);
 int ATI_API_CALL __ke_amd_adv_spec_cache_feature(void);
-void ATI_API_CALL __ke_smp_call_function( void (*func)(void *info) );
+void ATI_API_CALL __ke_smp_call_function( void (*ATI_API_CALL func)(void *info) );
 int ATI_API_CALL __ke_smp_processor_id(void);
 
 /*****************************************************************************/



The DRM module will compile and appears to work correctly after applying this patch, but the compile still yields the following warnings.




>>> Unpacking source...
>>> Unpacking fglrx-4.3.0-3.9.0.i386.rpm
 [32;01m*[0m Applying fglrx-2.6-vmalloc-vmaddr.patch...
[A[73G  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying fglrx-2.6-get-page.patch...
[A[73G  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying fglrx-3.9.0-regparm.patch...
[A[73G  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying test.patch...
[A[73G  [34;01m[ [32;01mok[34;01m ][0m
>>> Source unpacked.
 [32;01m*[0m Building the DRM module...
make: Entering directory `/usr/src/linux-2.6.7-gentoo-r8'
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/agp3.o
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/nvidia-agp.o
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/agpgart_be.o
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/i7505-agp.o
  CC [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.o
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c: In function `__ke_block_all_signals':
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:796: warning: passing arg 1 of `block_all_signals' from incompatible pointer type
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c: In function `__ke_request_irq':
/var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/firegl_public.c:1828: warning: assignment from incompatible pointer type
  LD [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/fglrx.o
  Building modules, stage 2.
  MODPOST
  CC      /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/fglrx.mod.o
  LD [M]  /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/fglrx.ko
make: Leaving directory `/usr/src/linux-2.6.7-gentoo-r8'
nostrip

>>> Install ati-drivers-3.9.0-r1 into /var/tmp/portage/ati-drivers-3.9.0-r1/image/ category media-video
install: cannot stat `/home/portage-overlay/media-video/ati-drivers/files/09ati': No such file or directory
man:
making executable: /usr/X11R6/lib/libfglrx_gamma.so.1.0

Reproducible: Always
Steps to Reproduce:
1. enable CONFIG_REGPARM
2. emerge ati-drivers
3.

Actual Results:  
DRM module fails to compile

Expected Results:  
DRM module should compile

Gentoo Base System version 1.5.1
Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.4.0, glibc-2.3.3.20040420-r0,
2.6.7-gentoo-r8)
=================================================================
System uname: 2.6.7-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/portage-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa avi cdr crypt cups dvd encode esd flac gif gpm gtk gtk2 imlib java
jpeg libg++ libwww mad mmx mpeg ncurses nls nptl opengl oss pam pdflib perl pic
png python readline sdl sse ssl svga tcpd truetype x86 xml2 xmms xv xvid zlib"
Comment 1 Travis Tilley (RETIRED) gentoo-dev 2004-07-14 10:13:54 UTC
i'd say file a bug with ATI, but they probably dont care.
Comment 2 ecco 2004-07-30 05:54:45 UTC
This is actually due to the regparm patch; without it it compiles fine. But hey, then it will segfault when you try to load it.
For now I just took the lazy path and disabled CONFIG_REGPARM in my kernel. The module naturally compiles and runs fine then.
Comment 3 Charlie Brackett 2004-08-10 20:04:26 UTC
It looks like this is no longer an issue in ati-drivers-3.11.1
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2004-08-10 20:41:51 UTC
closing it up then