Compile fails because of src/radeon_drm.h (DEPRECATED, __user)
Hi. /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I./AtomBios/includes -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -Wall -Wextra -Wno-unused-parameter -Werror-implicit-function-declaration -Wstrict-aliasing -Wstrict-overflow -Wpointer-arith -Woverlength-strings -Wvolatile-register-var -Winit-self -Wbad-function-cast -Wstrict-prototypes -Wold-style-definition -Wnested-externs -Wdisabled-optimization -pedantic -Wno-long-long -Wno-variadic-macros -g -O2 -finline-functions -MT radeonhd_drv_la-rhd_cs.lo -MD -MP -MF .deps/radeonhd_drv_la-rhd_cs.Tpo -c -o radeonhd_drv_la-rhd_cs.lo `test -f 'rhd_cs.c' || echo './'`rhd_cs.c gcc -DHAVE_CONFIG_H -I. -I.. -I./AtomBios/includes -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -Wall -Wextra -Wno-unused-parameter -Werror-implicit-function-declaration -Wstrict-aliasing -Wstrict-overflow -Wpointer-arith -Woverlength-strings -Wvolatile-register-var -Winit-self -Wbad-function-cast -Wstrict-prototypes -Wold-style-definition -Wnested-externs -Wdisabled-optimization -pedantic -Wno-long-long -Wno-variadic-macros -g -O2 -finline-functions -MT radeonhd_drv_la-rhd_cs.lo -MD -MP -MF .deps/radeonhd_drv_la-rhd_cs.Tpo -c rhd_cs.c -fPIC -DPIC -o .libs/radeonhd_drv_la-rhd_cs.o In file included from rhd_cs.c:194: radeon_drm.h:531: warning: comma at end of enumerator list radeon_drm.h:546: error: expected ':', ',', ';', '}' or '__attribute__' before 'DEPRECATED' radeon_drm.h:583: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token radeon_drm.h:609: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token radeon_drm.h:626: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token radeon_drm.h:634: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token radeon_drm.h:643: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token radeon_drm.h:647: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token radeon_drm.h:648: warning: struct has no members radeon_drm.h:688: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token radeon_drm.h:700: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token radeon_drm.h:717: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token radeon_drm.h:718: warning: struct has no members make[3]: *** [radeonhd_drv_la-rhd_cs.lo] Error 1 make[3]: Leaving directory `/home/thomas/source/xf86-video-radeonhd/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/thomas/source/xf86-video-radeonhd/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/thomas/source/xf86-video-radeonhd' make: *** [all] Error 2 Problem are these keywords: DEPRECATED unsigned long fb_offset DEPRECATED; /* deprecated, driver asks hardware */ unsigned long mmio_offset DEPRECATED; /* deprecated, driver asks hardware */ and __user: drm_radeon_clear_rect_t __user *depth_boxes; Where are these things definied? What am i missing? Greets thomas -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
Am Montag, den 08.12.2008, 20:02 +0100 schrieb Thomas Meyer:
Hi. Where are these things definied?
Ok. I took the linux kernel definition of __user and defined DEPRECATED
as:
diff --git a/src/radeon_drm.h b/src/radeon_drm.h
index c0d566c..74fdf93 100644
--- a/src/radeon_drm.h
+++ b/src/radeon_drm.h
@@ -30,6 +30,9 @@
* Keith Whitwell
Thomas Meyer wrote:
Am Montag, den 08.12.2008, 20:02 +0100 schrieb Thomas Meyer:
Where are these things definied?
Kernel build system, and libdrm/something.h, but not in the kernel header files.
Ok. I took the linux kernel definition of __user and defined DEPRECATED as:
+#define __user __attribute__((noderef, address_space(1)))
This makes no sense outside the kernel. Better just define it as empty.
+#define DEPRECATED __attribute__ ((deprecated))
That is OK. In fact, I have been building the Fedora packages using make CPPFLAGS='-D__user="" -DDEPRECATED="__attribute__ ((deprecated))"' for some time now. Luc, you recently looked into this problem. Any ideas how are we going to avoid this compile failure? a) Add CPPFLAGS definition to Makefile.am? b) Add #define to src/radeon_drm.h? c) Add #define to src/somethingelse.h? d) Add #define to src/*.c which includes radeon_drm.h? e) Something else? I can do any of a) through d) but I need to know which. -- Hans Ulrich Niedermann
On Dec 10, 08 14:42:21 +0100, Hans Ulrich Niedermann wrote:
In fact, I have been building the Fedora packages using make CPPFLAGS='-D__user="" -DDEPRECATED="__attribute__ ((deprecated))"' for some time now.
Can anybody test the attached patch? It's a sort-of workaround until we
have a real fix - which I don't know how it should look like.
CU
Matthias
--
Matthias Hopf
Matthias Hopf wrote:
On Dec 10, 08 14:42:21 +0100, Hans Ulrich Niedermann wrote:
In fact, I have been building the Fedora packages using make CPPFLAGS='-D__user="" -DDEPRECATED="__attribute__ ((deprecated))"' for some time now.
Can anybody test the attached patch? It's a sort-of workaround until we have a real fix - which I don't know how it should look like.
Works in my F-10 mock chroot. -- Hans Ulrich Niedermann
On Dec 11, 08 13:54:37 +0100, Hans Ulrich Niedermann wrote:
Matthias Hopf wrote:
Can anybody test the attached patch? It's a sort-of workaround until we have a real fix - which I don't know how it should look like. Works in my F-10 mock chroot.
Thanks. Pushed into master.
Matthias
--
Matthias Hopf
participants (3)
-
Hans Ulrich Niedermann
-
Matthias Hopf
-
Thomas Meyer