* [uml-devel] compile problem
@ 2008-02-10 20:06 Jiri Olsa
2008-02-11 23:18 ` Jeff Dike
2008-02-12 1:12 ` Jeff Dike
0 siblings, 2 replies; 5+ messages in thread
From: Jiri Olsa @ 2008-02-10 20:06 UTC (permalink / raw)
To: uml-devel
Hi,
I have problem with last Linus' git tree:
scripts/kconfig/conf -s arch/um/Kconfig
SYMLINK arch/um/include/kern_constants.h
SYMLINK arch/um/include/sysdep
CHK arch/um/include/uml-config.h
UPD arch/um/include/uml-config.h
CC arch/um/sys-i386/user-offsets.s
In file included from /usr/include/asm/ptrace.h:5,
from arch/um/sys-i386/user-offsets.c:7:
/usr/include/asm/ptrace-abi.h:92: error: expected specifier-qualifier-list before 'u32'
arch/um/sys-i386/user-offsets.c: In function 'foo':
arch/um/sys-i386/user-offsets.c:20: error: 'struct sigcontext' has no member named 'eip'
arch/um/sys-i386/user-offsets.c:21: error: 'struct sigcontext' has no member named 'esp'
arch/um/sys-i386/user-offsets.c:28: error: 'struct sigcontext' has no member named 'eflags'
arch/um/sys-i386/user-offsets.c:29: error: 'struct sigcontext' has no member named 'eax'
arch/um/sys-i386/user-offsets.c:30: error: 'struct sigcontext' has no member named 'ebx'
arch/um/sys-i386/user-offsets.c:31: error: 'struct sigcontext' has no member named 'ecx'
arch/um/sys-i386/user-offsets.c:32: error: 'struct sigcontext' has no member named 'edx'
arch/um/sys-i386/user-offsets.c:33: error: 'struct sigcontext' has no member named 'edi'
arch/um/sys-i386/user-offsets.c:34: error: 'struct sigcontext' has no member named 'esi'
arch/um/sys-i386/user-offsets.c:35: error: 'struct sigcontext' has no member named 'ebp'
make[1]: *** [arch/um/sys-i386/user-offsets.s] Error 1
make: *** [arch/um/sys-i386/user-offsets.s] Error 2
v2.6.24 is working for me...
thanks,
Jiri Olsa
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uml-devel] compile problem
2008-02-10 20:06 [uml-devel] compile problem Jiri Olsa
@ 2008-02-11 23:18 ` Jeff Dike
2008-02-12 21:26 ` Jiri Olsa
2008-02-12 1:12 ` Jeff Dike
1 sibling, 1 reply; 5+ messages in thread
From: Jeff Dike @ 2008-02-11 23:18 UTC (permalink / raw)
To: Jiri Olsa; +Cc: uml-devel
On Sun, Feb 10, 2008 at 09:06:08PM +0100, Jiri Olsa wrote:
> Hi,
>
> I have problem with last Linus' git tree:
>
> scripts/kconfig/conf -s arch/um/Kconfig
> SYMLINK arch/um/include/kern_constants.h
> SYMLINK arch/um/include/sysdep
> CHK arch/um/include/uml-config.h
> UPD arch/um/include/uml-config.h
> CC arch/um/sys-i386/user-offsets.s
> In file included from /usr/include/asm/ptrace.h:5,
> from arch/um/sys-i386/user-offsets.c:7:
> /usr/include/asm/ptrace-abi.h:92: error: expected specifier-qualifier-list before 'u32'
This looks like a bug in your headers. ptrace-abi includes
<asm/types.h>, apparently to get the likes of u32, but they're not
there.
> arch/um/sys-i386/user-offsets.c: In function 'foo':
> arch/um/sys-i386/user-offsets.c:20: error: 'struct sigcontext' has
> no member named 'eip'
This is a bit of a problem. You installed new headers, which have the
'e' removed from the register names, but I can't just change UML
because that will break compilation on current hosts with existing
headers.
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uml-devel] compile problem
2008-02-10 20:06 [uml-devel] compile problem Jiri Olsa
2008-02-11 23:18 ` Jeff Dike
@ 2008-02-12 1:12 ` Jeff Dike
1 sibling, 0 replies; 5+ messages in thread
From: Jeff Dike @ 2008-02-12 1:12 UTC (permalink / raw)
To: Jiri Olsa; +Cc: uml-devel
On Sun, Feb 10, 2008 at 09:06:08PM +0100, Jiri Olsa wrote:
> arch/um/sys-i386/user-offsets.c:20: error: 'struct sigcontext' has no member named 'eip'
> arch/um/sys-i386/user-offsets.c:21: error: 'struct sigcontext' has no member named 'esp'
This turns out not to be such a big problem after all. This stuff
isn't used, so it can just be deleted.
Try the patch below.
Jeff
--
Work email - jdike at linux dot intel dot com
Index: linux-2.6.22/arch/um/sys-i386/user-offsets.c
===================================================================
--- linux-2.6.22.orig/arch/um/sys-i386/user-offsets.c 2007-11-14 10:33:29.000000000 -0500
+++ linux-2.6.22/arch/um/sys-i386/user-offsets.c 2008-02-11 20:10:56.000000000 -0500
@@ -17,36 +17,9 @@
void foo(void)
{
- OFFSET(HOST_SC_IP, sigcontext, eip);
- OFFSET(HOST_SC_SP, sigcontext, esp);
- OFFSET(HOST_SC_FS, sigcontext, fs);
- OFFSET(HOST_SC_GS, sigcontext, gs);
- OFFSET(HOST_SC_DS, sigcontext, ds);
- OFFSET(HOST_SC_ES, sigcontext, es);
- OFFSET(HOST_SC_SS, sigcontext, ss);
- OFFSET(HOST_SC_CS, sigcontext, cs);
- OFFSET(HOST_SC_EFLAGS, sigcontext, eflags);
- OFFSET(HOST_SC_EAX, sigcontext, eax);
- OFFSET(HOST_SC_EBX, sigcontext, ebx);
- OFFSET(HOST_SC_ECX, sigcontext, ecx);
- OFFSET(HOST_SC_EDX, sigcontext, edx);
- OFFSET(HOST_SC_EDI, sigcontext, edi);
- OFFSET(HOST_SC_ESI, sigcontext, esi);
- OFFSET(HOST_SC_EBP, sigcontext, ebp);
OFFSET(HOST_SC_TRAPNO, sigcontext, trapno);
OFFSET(HOST_SC_ERR, sigcontext, err);
OFFSET(HOST_SC_CR2, sigcontext, cr2);
- OFFSET(HOST_SC_FPSTATE, sigcontext, fpstate);
- OFFSET(HOST_SC_SIGMASK, sigcontext, oldmask);
- OFFSET(HOST_SC_FP_CW, _fpstate, cw);
- OFFSET(HOST_SC_FP_SW, _fpstate, sw);
- OFFSET(HOST_SC_FP_TAG, _fpstate, tag);
- OFFSET(HOST_SC_FP_IPOFF, _fpstate, ipoff);
- OFFSET(HOST_SC_FP_CSSEL, _fpstate, cssel);
- OFFSET(HOST_SC_FP_DATAOFF, _fpstate, dataoff);
- OFFSET(HOST_SC_FP_DATASEL, _fpstate, datasel);
- OFFSET(HOST_SC_FP_ST, _fpstate, _st);
- OFFSET(HOST_SC_FXSR_ENV, _fpstate, _fxsr_env);
DEFINE_LONGS(HOST_FP_SIZE, sizeof(struct user_fpregs_struct));
DEFINE_LONGS(HOST_XFP_SIZE, sizeof(struct user_fpxregs_struct));
Index: linux-2.6.22/arch/um/sys-x86_64/user-offsets.c
===================================================================
--- linux-2.6.22.orig/arch/um/sys-x86_64/user-offsets.c 2007-11-14 10:33:29.000000000 -0500
+++ linux-2.6.22/arch/um/sys-x86_64/user-offsets.c 2008-02-11 19:21:27.000000000 -0500
@@ -19,37 +19,9 @@
void foo(void)
{
- OFFSET(HOST_SC_RBX, sigcontext, rbx);
- OFFSET(HOST_SC_RCX, sigcontext, rcx);
- OFFSET(HOST_SC_RDX, sigcontext, rdx);
- OFFSET(HOST_SC_RSI, sigcontext, rsi);
- OFFSET(HOST_SC_RDI, sigcontext, rdi);
- OFFSET(HOST_SC_RBP, sigcontext, rbp);
- OFFSET(HOST_SC_RAX, sigcontext, rax);
- OFFSET(HOST_SC_R8, sigcontext, r8);
- OFFSET(HOST_SC_R9, sigcontext, r9);
- OFFSET(HOST_SC_R10, sigcontext, r10);
- OFFSET(HOST_SC_R11, sigcontext, r11);
- OFFSET(HOST_SC_R12, sigcontext, r12);
- OFFSET(HOST_SC_R13, sigcontext, r13);
- OFFSET(HOST_SC_R14, sigcontext, r14);
- OFFSET(HOST_SC_R15, sigcontext, r15);
- OFFSET(HOST_SC_IP, sigcontext, rip);
- OFFSET(HOST_SC_SP, sigcontext, rsp);
OFFSET(HOST_SC_CR2, sigcontext, cr2);
OFFSET(HOST_SC_ERR, sigcontext, err);
OFFSET(HOST_SC_TRAPNO, sigcontext, trapno);
- OFFSET(HOST_SC_CS, sigcontext, cs);
- OFFSET(HOST_SC_FS, sigcontext, fs);
- OFFSET(HOST_SC_GS, sigcontext, gs);
- OFFSET(HOST_SC_EFLAGS, sigcontext, eflags);
- OFFSET(HOST_SC_SIGMASK, sigcontext, oldmask);
-#if 0
- OFFSET(HOST_SC_ORIG_RAX, sigcontext, orig_rax);
- OFFSET(HOST_SC_DS, sigcontext, ds);
- OFFSET(HOST_SC_ES, sigcontext, es);
- OFFSET(HOST_SC_SS, sigcontext, ss);
-#endif
DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long));
DEFINE(HOST_XFP_SIZE, 0);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uml-devel] compile problem
2008-02-11 23:18 ` Jeff Dike
@ 2008-02-12 21:26 ` Jiri Olsa
2008-02-13 17:43 ` Jeff Dike
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Olsa @ 2008-02-12 21:26 UTC (permalink / raw)
To: Jeff Dike; +Cc: uml-devel
Hi,
<asm/types.h> declares u32 only if there's __KERNEL__ defined, which is not case
of UML compile.
I found out the ptrace-abi.h is changed in the 2.6.24.1 and differs with the Linus
tree among others with adding following structure:
struct ptrace_bts_config {
/* requested or actual size of BTS buffer in bytes */
u32 size;
/* bitmask of below flags */
u32 flags;
/* buffer overflow signal */
u32 signal;
/* actual size of bts_struct in bytes */
u32 bts_size;
};
so thats where the u32 cames from in the Linus' tree.
Now when I know why my Linus' tree wont compile, I'd like to know why yours does :)
(I used your patch regarding the foo function errors as well...)
Maybe I have smth wrong with my headers, I use following symlinks:
/usr/include/linux -> $(kernel)/include/linux
/usr/include/asm -> $(kernel)/include/asm-x86
/usr/include/asm-generic -> $(kernel)/include/asm-generic
thanks,
jirka
Jeff Dike wrote:
> On Sun, Feb 10, 2008 at 09:06:08PM +0100, Jiri Olsa wrote:
>> Hi,
>>
>> I have problem with last Linus' git tree:
>>
>> scripts/kconfig/conf -s arch/um/Kconfig
>> SYMLINK arch/um/include/kern_constants.h
>> SYMLINK arch/um/include/sysdep
>> CHK arch/um/include/uml-config.h
>> UPD arch/um/include/uml-config.h
>> CC arch/um/sys-i386/user-offsets.s
>> In file included from /usr/include/asm/ptrace.h:5,
>> from arch/um/sys-i386/user-offsets.c:7:
>> /usr/include/asm/ptrace-abi.h:92: error: expected specifier-qualifier-list before 'u32'
>
> This looks like a bug in your headers. ptrace-abi includes
> <asm/types.h>, apparently to get the likes of u32, but they're not
> there.
>
>> arch/um/sys-i386/user-offsets.c: In function 'foo':
>> arch/um/sys-i386/user-offsets.c:20: error: 'struct sigcontext' has
>> no member named 'eip'
>
> This is a bit of a problem. You installed new headers, which have the
> 'e' removed from the register names, but I can't just change UML
> because that will break compilation on current hosts with existing
> headers.
>
> Jeff
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uml-devel] compile problem
2008-02-12 21:26 ` Jiri Olsa
@ 2008-02-13 17:43 ` Jeff Dike
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Dike @ 2008-02-13 17:43 UTC (permalink / raw)
To: Jiri Olsa; +Cc: uml-devel
On Tue, Feb 12, 2008 at 10:26:39PM +0100, Jiri Olsa wrote:
> <asm/types.h> declares u32 only if there's __KERNEL__ defined, which is not case
> of UML compile.
And anything else that uses ptrace.
> Now when I know why my Linus' tree wont compile, I'd like to know why yours does :)
Because you have this header installed as your system ptrace-abi...
> (I used your patch regarding the foo function errors as well...)
> Maybe I have smth wrong with my headers, I use following symlinks:
>
> /usr/include/linux -> $(kernel)/include/linux
> /usr/include/asm -> $(kernel)/include/asm-x86
This is the one - you're not supposed to do that any more. No distro
has done this in probably 10 years. You're supposed to use the
sanitized libc headers that come with your distro.
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-13 17:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-10 20:06 [uml-devel] compile problem Jiri Olsa
2008-02-11 23:18 ` Jeff Dike
2008-02-12 21:26 ` Jiri Olsa
2008-02-13 17:43 ` Jeff Dike
2008-02-12 1:12 ` Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.