Bugzilla – Bug 324557
Don't #include <asm/user.h>
Last modified: 2008-03-13 14:58:29 UTC
---- Reported by serkan.hosca@gmail.com 2007-06-15 14:05:47 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: configure works fine. make fails with this: Making all in server make[3]: Entering directory `/home/serkan/src/mono-debugger-0.50/backend/server' if /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -D_REENTRANT -pthread -I/usr/lib64/pkgconfig/../../include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -D_GNU_SOURCE -MT x86-ptrace.lo -MD -MP -MF ".deps/x86-ptrace.Tpo" -c -o x86-ptrace.lo x86-ptrace.c; \ then mv -f ".deps/x86-ptrace.Tpo" ".deps/x86-ptrace.Plo"; else rm -f ".deps/x86-ptrace.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I../.. -D_REENTRANT -pthread -I/usr/lib64/pkgconfig/../../include/mono-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -D_GNU_SOURCE -MT x86-ptrace.lo -MD -MP -MF .deps/x86-ptrace.Tpo -c x86-ptrace.c -fPIC -DPIC -o .libs/x86-ptrace.o In file included from x86-arch.h:43, from x86-linux-ptrace.h:4, from x86-ptrace.c:36: x86_64-arch.h:10:22: error: asm/user.h: No such file or directory In file included from x86-ptrace.c:36: x86-linux-ptrace.h:7: warning: 'struct user_regs_struct' declared inside parameter list x86-linux-ptrace.h:7: warning: its scope is only this definition or declaration, which is probably not what you want x86-linux-ptrace.h:10: warning: 'struct user_regs_struct' declared inside parameter list x86-linux-ptrace.h:13: warning: 'struct user_i387_struct' declared inside parameter list x86-linux-ptrace.h:16: warning: 'struct user_i387_struct' declared inside parameter list In file included from x86-linux-ptrace.h:39, from x86-ptrace.c:36: x86-ptrace.h:32: warning: 'struct user_regs_struct' declared inside parameter list x86-ptrace.h:32: error: conflicting types for '_server_ptrace_get_registers' x86-linux-ptrace.h:7: error: previous declaration of '_server_ptrace_get_registers' was here x86-ptrace.h:33: warning: 'struct user_regs_struct' declared inside parameter list x86-ptrace.h:33: error: conflicting types for '_server_ptrace_set_registers' x86-linux-ptrace.h:10: error: previous declaration of '_server_ptrace_set_registers' was here x86-ptrace.h:34: warning: 'struct user_i387_struct' declared inside parameter list x86-ptrace.h:34: error: conflicting types for '_server_ptrace_get_fp_registers' x86-linux-ptrace.h:13: error: previous declaration of '_server_ptrace_get_fp_registers' was here x86-ptrace.h:35: warning: 'struct user_i387_struct' declared inside parameter list x86-ptrace.h:35: error: conflicting types for '_server_ptrace_set_fp_registers' x86-linux-ptrace.h:16: error: previous declaration of '_server_ptrace_set_fp_registers' was here In file included from x86-ptrace.c:497: x86-linux-ptrace.c:2: warning: 'struct user_regs_struct' declared inside parameter list x86-linux-ptrace.c:3: error: conflicting types for '_server_ptrace_get_registers' x86-ptrace.h:32: error: previous declaration of '_server_ptrace_get_registers' was here x86-linux-ptrace.c:17: warning: 'struct user_regs_struct' declared inside parameter list x86-linux-ptrace.c:18: error: conflicting types for '_server_ptrace_set_registers' x86-ptrace.h:33: error: previous declaration of '_server_ptrace_set_registers' was here x86-linux-ptrace.c:32: warning: 'struct user_i387_struct' declared inside parameter list x86-linux-ptrace.c:33: error: conflicting types for '_server_ptrace_get_fp_registers' x86-ptrace.h:34: error: previous declaration of '_server_ptrace_get_fp_registers' was here x86-linux-ptrace.c:47: warning: 'struct user_i387_struct' declared inside parameter list x86-linux-ptrace.c:48: error: conflicting types for '_server_ptrace_set_fp_registers' x86-ptrace.h:35: error: previous declaration of '_server_ptrace_set_fp_registers' was here x86-linux-ptrace.c: In function '_server_ptrace_set_dr': x86-linux-ptrace.c:93: error: invalid use of undefined type 'struct user' x86-linux-ptrace.c: In function '_server_ptrace_get_dr': x86-linux-ptrace.c:109: error: invalid use of undefined type 'struct user' x86-linux-ptrace.c: In function 'server_ptrace_get_application': x86-linux-ptrace.c:440: warning: assignment from incompatible pointer type In file included from x86-ptrace.c:507: x86_64-arch.c: At top level: x86_64-arch.c:22: error: field 'current_regs' has incomplete type x86_64-arch.c:23: error: field 'current_fpregs' has incomplete type x86_64-arch.c: In function 'x86_arch_child_stopped': x86_64-arch.c:203: warning: passing argument 2 of '_server_ptrace_set_registers' from incompatible pointer type x86_64-arch.c:206: warning: passing argument 2 of '_server_ptrace_set_fp_registers' from incompatible pointer type x86_64-arch.c:252: warning: passing argument 2 of '_server_ptrace_set_registers' from incompatible pointer type x86_64-arch.c:255: warning: passing argument 2 of '_server_ptrace_set_fp_registers' from incompatible pointer type x86_64-arch.c: In function 'server_ptrace_abort_invoke': x86_64-arch.c:970: warning: passing argument 2 of '_server_ptrace_set_registers' from incompatible pointer type x86_64-arch.c:973: warning: passing argument 2 of '_server_ptrace_set_fp_registers' from incompatible pointer type x86-ptrace.c: At top level: x86-ptrace.c:535: warning: initialization from incompatible pointer type make[3]: *** [x86-ptrace.lo] Error 1 make[3]: Leaving directory `/home/serkan/src/mono-debugger-0.50/backend/server' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/serkan/src/mono-debugger-0.50/backend' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/serkan/src/mono-debugger-0.50' make: *** [all] Error 2 serkan@zoidberg ~/src/mono-debugger-0.50 $ mono -V Mono JIT compiler version 1.2.4 (tarball) Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: normal Architecture: amd64 Disabled: none serkan@zoidberg ~/src/mono-debugger-0.50 $ uname -a Linux zoidberg 2.6.21-suspend2-r6 #1 SMP PREEMPT Thu Jun 14 17:26:16 EDT 2007 x86_64 AMD Turion(tm) 64 X2 Mobile Technology TL-60 AuthenticAMD GNU/Linux serkan@zoidberg ~/src/mono-debugger-0.50 $ gcc -v Using built-in specs. Target: x86_64-pc-linux-gnu Configured with: /var/tmp/paludis/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --enable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,d,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 4.1.2 20070214 ( (gdc 0.23, using dmd 1.007)) (Gentoo 4.1.2) ---- Additional Comments From robertj@gmx.net 2007-06-16 13:52:25 MST ---- Your system is missing /usr/include/asm/user.h Try to install the linux kernel headers with the packaging system of your distro. ---- Additional Comments From serkan.hosca@gmail.com 2007-06-16 22:26:16 MST ---- I have linux-headers installed. serkan@zoidberg ~ $ paludis -q linux-headers * sys-kernel/linux-headers gentoo: (2.0.40-r1)K (2.2.26-r1)K (2.4.26-r1)K (2.4.33.3)K 2.6.8.1-r4 2.6.11-r2 2.6.11-r3 (2.6.11-r4)K (2.6.11-r5)K (2.6.11-r6)K 2.6.16 (2.6.17)K 2.6.17-r1 2.6.17-r2 2.6.19.2-r2 2.6.20-r2 2.6.21 {:0} installed: 2.6.21* {:0} Homepage: http://www.kernel.org/ http://www.gentoo.org/ http://www.kernel.org/ http://www.gentoo.org/ Description: Linux system headers License: ( GPL-2 ) Source origin: sys-kernel/linux-headers-2.6.21::gentoo Installed time: Thu May 3 23:43:10 2007 Provides: ( virtual/os-headers ) But i don't have /usr/include/asm/user.h ---- Additional Comments From remy.suen@gmail.com 2007-08-28 20:50:06 MST ---- Hi, I am having the same problems. I am on Gentoo 2007.0 using gentoo-sources 2.6.22-r5. Robert and Serkan, for the asm/user.h issue, please see below: http://lkml.org/lkml/2007/8/23/281 Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Gentoo 2007.0</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".
So we can close this.
(In reply to comment #1 from Martin Baulig) > So we can close this. Sorry, why is this bug closed? The latest SVN trunk still will not compile on my computer because of the same problem. From the link I provided: http://lkml.org/lkml/2007/8/23/281 "Stop including asm/user.h from libc - it seems to be disappearing from distros. It's replaced with sys/user.h which defines user_fpregs_struct and user_fpxregs_struct instead of user_i387_struct and struct user_fxsr_struct on i386." asm/user.h is the one that is getting replaced by sys/user.h, not the other way around.Some sort of ifdef magic should be used (or whatever it's called, I don't know C/C++, sorry) or these files should be moved to reference sys/user.h instead.
Mono-debugger should stop depending on asm/user.h. Unfortunately, 0.60 suffers from this bug as well. Anyone?
Fixed in SVN.