Hi, guys,
since Jul 20 or so I get this compilation error on glibc-2.1.3/linux-2.4.18:
gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fno-strength-reduce -mpreferred-stack-boundary=2 -D__WINE__ -D_REENTRANT -I/usr/X11R6/include -o wrc.o wrc.c In file included from wrc.h:25, from wrc.c:61: wrctypes.h:447: redefinition of `struct user' make[2]: *** [wrc.o] Error 1 make[2]: Leaving directory `/disks/part9/home/cracauer/work/cvs-packages-work/stupids/wine/wine/tools/wrc'
Wine's definition of struct user is clashing with the one from /usr/include/sys/user.h
Now, it appears that /usr/include/sys/user.h (a glibc-2.1.3 file) is in error having this struct in first place, since newer kernels have this struct in asm/user.h.
I fixed the problem in my /usr/include, but I guess it is better to use a different name for the struct in Wine to be compatible with this configuration (it's Debian-2.1 with an upgraded kernel).
Unless somebody disagrees with that analysis, I'll submit a patch to rename the struct. Suggestions about a suitable name welcome.
Martin
Martin Cracauer cracauer@cons.org writes:
Unless somebody disagrees with that analysis, I'll submit a patch to rename the struct. Suggestions about a suitable name welcome.
Before doing that it would be interesting to find out why sys/user.h gets included. This is not supposed to happen.
Alexandre Julliard wrote on Thu, Aug 01, 2002 at 11:45:27AM -0700:
Martin Cracauer cracauer@cons.org writes:
Unless somebody disagrees with that analysis, I'll submit a patch to rename the struct. Suggestions about a suitable name welcome.
Before doing that it would be interesting to find out why sys/user.h gets included. This is not supposed to happen.
This is the sequence:
make[2]: Entering directory `/disks/part9/home/cracauer/work/cvs-packages-work/stupids/wine/wine/tools/wrc' gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fno-strength-reduce -mpreferred-stack-boundary=2 -D__WINE__ -D_REENTRANT -I/usr/X11R6/include -o wrc.o wrc.c In file included from /usr/include/sys/ucontext.h:31, from /usr/include/ucontext.h:27, from /usr/include/signal.h:317, from wrc.c:59: /usr/include/sys/user.h:26: #error traceme make[2]: *** [wrc.o] Error 1 make[2]: Leaving directory `/disks/part9/home/cracauer/work/cvs-packages-work/stupids/wine/wine/tools/wrc'
Martin Cracauer wrote on Thu, Aug 01, 2002 at 03:08:18PM -0400:
Alexandre Julliard wrote on Thu, Aug 01, 2002 at 11:45:27AM -0700:
Martin Cracauer cracauer@cons.org writes:
Unless somebody disagrees with that analysis, I'll submit a patch to rename the struct. Suggestions about a suitable name welcome.
Before doing that it would be interesting to find out why sys/user.h gets included. This is not supposed to happen.
This is the sequence:
make[2]: Entering directory `/disks/part9/home/cracauer/work/cvs-packages-work/stupids/wine/wine/tools/wrc' gcc -c -I. -I. -I../../include -I../../include -g -O2 -Wall -fno-strength-reduce -mpreferred-stack-boundary=2 -D__WINE__ -D_REENTRANT -I/usr/X11R6/include -o wrc.o wrc.c In file included from /usr/include/sys/ucontext.h:31, from /usr/include/ucontext.h:27, from /usr/include/signal.h:317, from wrc.c:59: /usr/include/sys/user.h:26: #error traceme make[2]: *** [wrc.o] Error 1 make[2]: Leaving directory `/disks/part9/home/cracauer/work/cvs-packages-work/stupids/wine/wine/tools/wrc'
signal.h only includes ucontext.h when __USE_GNU is defined.
That is why a simple test program with its own 'struct user' and #include <signal.h> does not fail.
Now, where does __USE_GNU come from? By definign GNU_SOURCE: #define _GNU_SOURCE /* for pread/pwrite */ ./include/wine/port.h #define _GNU_SOURCE /* we may need to override some GNU extensions */ ./scheduler/pthread.c
The offending _GNU_SOURCE is in here for some time. 1.18 (julliard 07-Jan-02): #define _GNU_SOURCE /* for pread/pwrite */
I think the julliard 22-Jul-02 commits to this file triggered the error.
Have to head for home now, will sniff more later today.
Martin
Martin Cracauer cracauer@cons.org writes:
The offending _GNU_SOURCE is in here for some time. 1.18 (julliard 07-Jan-02): #define _GNU_SOURCE /* for pread/pwrite */
I think the julliard 22-Jul-02 commits to this file triggered the error.
Yes, I see it now. We should probably avoid _GNU_SOURCE here, but this would be a bit of work. And since we don't really need that struct user at all I have simply removed it. Thanks for looking into this.