Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193699 - dev-util/mono-debugger-0.50 does not compile on AMD64 - asm/user.h is not on my machine
Summary: dev-util/mono-debugger-0.50 does not compile on AMD64 - asm/user.h is not on ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Jurek Bartuszek (RETIRED)
URL:
Whiteboard:
Keywords:
: 207736 (view as bug list)
Depends on:
Blocks: sane-linux-headers
  Show dependency tree
 
Reported: 2007-09-24 23:34 UTC by Michal Kovac
Modified: 2008-12-26 00:31 UTC (History)
5 users (show)

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


Attachments
build log (emergeMonoDebugger,99.20 KB, text/plain)
2007-09-24 23:36 UTC, Michal Kovac
Details
emerge --info (emerge-info,4.31 KB, text/plain)
2007-10-01 21:57 UTC, Michal Kovac
Details
Add x86_64 structs formerly present at asm/user.h (mono-debugger-kernel-2.6.19-fix-x86_64-asm.patch,1.61 KB, patch)
2008-01-14 08:01 UTC, Jan Oravec
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Kovac 2007-09-24 23:34:58 UTC
I am trying to compile dev-util/mono-debugger-0.50, bud with this result:

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

Reproducible: Always

Steps to Reproduce:
1.try to build dev-util/mono-debugger-0.50 on updated amd64 gentoo machine

Actual Results:  
It fails
Comment 1 Michal Kovac 2007-09-24 23:36:56 UTC
Created attachment 131814 [details]
build log
Comment 2 Jurek Bartuszek (RETIRED) gentoo-dev 2007-09-25 20:18:30 UTC
Please post your emerge --info. Do you have include/asm/user.h in your kernel directory (/usr/src/linux by default)?
Comment 3 Michal Kovac 2007-10-01 21:57:22 UTC
Created attachment 132339 [details]
emerge --info

This is my "emerge --info"
Comment 4 Michal Kovac 2007-10-01 22:03:51 UTC
(In reply to comment #2)
> Please post your emerge --info.
atached

> Do you have include/asm/user.h in your kernel
> directory (/usr/src/linux by default)?
there is file /usr/src/linux/include/asm/user.h,
but not file /usr/include/asm/user.h. When searching for info, I have found this page 
http://lkml.org/lkml/2007/8/23/281 , where is written, that asm/user.h is disappearing and sys/user.h should used instead of asm/user.h.
Comment 5 Radoslaw Kojdecki 2007-11-06 23:32:11 UTC
It is also impossible to compile UML Linux Kernel :

intranet linux # make ARCH=um
  SYMLINK arch/um/include/kern_constants.h
  CC      arch/um/sys-x86_64/user-offsets.s
arch/um/sys-x86_64/user-offsets.c:16:22: error: asm/user.h: No such file or directory
arch/um/sys-x86_64/user-offsets.c: In function 'foo':
arch/um/sys-x86_64/user-offsets.c:91: error: invalid application of 'sizeof' to incomplete type 'struct user_regs_struct' 
make[1]: *** [arch/um/sys-x86_64/user-offsets.s] Error 1
make: *** [arch/um/sys-x86_64/user-offsets.s] Error 2


intranet linux # emerge --info
Portage 2.1.3.9 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r8 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
Timestamp of tree: Tue, 06 Nov 2007 23:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.6.3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="pl"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 berkdb bitmap-fonts bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv isdnlog ldap midi mmx mudflap mysql ncurses nls nptl nptlonly odbc openmp pam pcre perl postgres pppd python readline reflection samba session slang spl sse sse2 ssl tcpd truetype-fonts type1-fonts xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Comment 6 Jurek Bartuszek (RETIRED) gentoo-dev 2008-01-02 06:19:49 UTC
is this reproducible with mono-debugger-0.60 (now in the portage tree)?
Comment 7 Michal Kovac 2008-01-02 23:45:25 UTC
(In reply to comment #6)
> is this reproducible with mono-debugger-0.60 (now in the portage tree)?
> 

yes, still the same problem :-(
Comment 8 Jurek Bartuszek (RETIRED) gentoo-dev 2008-01-03 00:46:26 UTC
Still waiting for response from upstream:

https://bugzilla.novell.com/show_bug.cgi?id=324557
Comment 9 Jan Oravec 2008-01-13 23:11:42 UTC
Exactly same problem is fixed for i386 with #ifdef around kernel version with the patch mono-debugger-kernel-2.6.19-fix-i386-asm.patch in portage. Could something similar be done with x86_64? Thanks.
Comment 10 Jurek Bartuszek (RETIRED) gentoo-dev 2008-01-14 07:36:14 UTC
Could you please be so kind and post a patch?
Comment 11 Jan Oravec 2008-01-14 08:01:19 UTC
Created attachment 140916 [details, diff]
Add x86_64 structs formerly present at asm/user.h

Structs in patch are copied from /usr/src/linux/include/asm-x86_64/user.h of 2.6.23 kernel. After applying patch, mono-debugger compiles without errors.
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2008-01-27 19:32:02 UTC
*** Bug 207736 has been marked as a duplicate of this bug. ***
Comment 13 Aaron Pelton 2008-03-15 23:55:58 UTC
(In reply to comment #11)
> Created an attachment (id=140916) [edit]
> Add x86_64 structs formerly present at asm/user.h
> 
> Structs in patch are copied from /usr/src/linux/include/asm-x86_64/user.h of
> 2.6.23 kernel. After applying patch, mono-debugger compiles without errors.
> 

FWIW
in backend/server/x86_64-arch.h
changing
#include <asm/user.h>

#define INFERIOR_REGS_TYPE      struct user_regs_struct
#define INFERIOR_FPREGS_TYPE    struct user_i387_struct

to
#include <sys/user.h>

#define INFERIOR_REGS_TYPE      struct user_regs_struct
#define INFERIOR_FPREGS_TYPE    struct user_fpregs_struct

allows it to compile but as I'm only starting with mono I can't swear whether the debugger works other than starting...
Comment 14 Peter Alfredsen (RETIRED) gentoo-dev 2008-12-26 00:31:39 UTC
2.0 does not suffer from this.