* UML fails to build on arch i386
@ 2018-06-14 5:16 Ritesh Raj Sarraf
2018-06-14 8:58 ` Ritesh Raj Sarraf
0 siblings, 1 reply; 8+ messages in thread
From: Ritesh Raj Sarraf @ 2018-06-14 5:16 UTC (permalink / raw)
To: linux-um
[-- Attachment #1.1: Type: text/plain, Size: 1648 bytes --]
Hello Richard/UML Team,
In preparing the 4.16 UML build, the code fails to build from source on
i386. It build successfully on arch amd64.
Full build log is available at:
https://buildd.debian.org/status/fetch.php?pkg=user-mode-linux&arch=i38
6&ver=4.16-1um-1&stamp=1528784216&raw=0
CC arch/um/kernel/tlb.o
CC arch/um/kernel/trap.o
CC arch/um/kernel/um_arch.o
CC arch/um/kernel/umid.o
CC arch/um/kernel/maccess.o
CC arch/um/kernel/kmsg_dump.o
CC arch/um/kernel/skas/clone.o
In file included from ./arch/x86/um/shared/sysdep/ptrace.h:42:0,
from ./arch/um/include/shared/as-layout.h:38,
from arch/um/kernel/skas/clone.c:11:
./arch/x86/um/shared/sysdep/ptrace_32.h:16:23:
^
scripts/Makefile.build:329: recipe for target 'arch/um/kernel/skas/clone.o' failed
make[3]: *** [arch/um/kernel/skas/clone.o] Error 1
scripts/Makefile.build:588: recipe for target 'arch/um/kernel/skas' failed
make[2]: *** [arch/um/kernel/skas] Error 2
Makefile:1048: recipe for target 'arch/um/kernel' failed
make[1]: *** [arch/um/kernel] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>/linux-source-4.16'
debian/rules:74: recipe for target 'build-stamp' failed
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2018-06-12T06:16:48Z
Finished
--------
--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: UML fails to build on arch i386 2018-06-14 5:16 UML fails to build on arch i386 Ritesh Raj Sarraf @ 2018-06-14 8:58 ` Ritesh Raj Sarraf 2018-06-14 11:15 ` Richard Weinberger 0 siblings, 1 reply; 8+ messages in thread From: Ritesh Raj Sarraf @ 2018-06-14 8:58 UTC (permalink / raw) To: linux-um [-- Attachment #1.1: Type: text/plain, Size: 1686 bytes --] On Thu, 2018-06-14 at 11:01 +0545, Ritesh Raj Sarraf wrote: > CC arch/um/kernel/skas/clone.o > In file included from ./arch/x86/um/shared/sysdep/ptrace.h:42:0, > from ./arch/um/include/shared/as-layout.h:38, > from arch/um/kernel/skas/clone.c:11: > ./arch/x86/um/shared/sysdep/ptrace_32.h:16:23: > ^ This log missed the main error line: CC arch/um/kernel/maccess.o CC arch/um/kernel/kmsg_dump.o CC arch/um/kernel/skas/clone.o In file included from ./arch/x86/um/shared/sysdep/ptrace.h:42:0, from ./arch/um/include/shared/as-layout.h:38, from arch/um/kernel/skas/clone.c:11: ./arch/x86/um/shared/sysdep/ptrace_32.h:16:23: error: expected identifier before numeric constant #define PTRACE_SYSEMU 31 ^ scripts/Makefile.build:329: recipe for target 'arch/um/kernel/skas/clone.o' failed make[3]: *** [arch/um/kernel/skas/clone.o] Error 1 scripts/Makefile.build:588: recipe for target 'arch/um/kernel/skas' failed make[2]: *** [arch/um/kernel/skas] Error 2 Makefile:1048: recipe for target 'arch/um/kernel' failed make[1]: *** [arch/um/kernel] Error 2 make[1]: Leaving directory '/<<PKGBUILDDIR>>/linux-source-4.16' debian/rules:74: recipe for target 'build-stamp' failed make: *** [build-stamp] Error 2 dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 2018-06-12T06:16:48Z -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: UML fails to build on arch i386 2018-06-14 8:58 ` Ritesh Raj Sarraf @ 2018-06-14 11:15 ` Richard Weinberger 2018-06-14 15:44 ` Ritesh Raj Sarraf 0 siblings, 1 reply; 8+ messages in thread From: Richard Weinberger @ 2018-06-14 11:15 UTC (permalink / raw) To: rrs; +Cc: linux-um On Thu, Jun 14, 2018 at 10:58 AM, Ritesh Raj Sarraf <rrs@researchut.com> wrote: > On Thu, 2018-06-14 at 11:01 +0545, Ritesh Raj Sarraf wrote: >> CC arch/um/kernel/skas/clone.o >> In file included from ./arch/x86/um/shared/sysdep/ptrace.h:42:0, >> from ./arch/um/include/shared/as-layout.h:38, >> from arch/um/kernel/skas/clone.c:11: >> ./arch/x86/um/shared/sysdep/ptrace_32.h:16:23: >> ^ > > This log missed the main error line: > > CC arch/um/kernel/maccess.o > CC arch/um/kernel/kmsg_dump.o > CC arch/um/kernel/skas/clone.o > In file included from ./arch/x86/um/shared/sysdep/ptrace.h:42:0, > from ./arch/um/include/shared/as-layout.h:38, > from arch/um/kernel/skas/clone.c:11: > ./arch/x86/um/shared/sysdep/ptrace_32.h:16:23: error: expected identifier before numeric constant > #define PTRACE_SYSEMU 31 Hmm, can you please check how PTRACE_SYSEMU is defined in your UAPI? The code is pretty boring: #ifndef PTRACE_SYSEMU #define PTRACE_SYSEMU 31 #endif My best guess is that PTRACE_SYSEMU is not a define but something else and then #define fails in an interesting way. -- Thanks, //richard _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: UML fails to build on arch i386 2018-06-14 11:15 ` Richard Weinberger @ 2018-06-14 15:44 ` Ritesh Raj Sarraf 2018-06-14 18:41 ` Richard Weinberger 0 siblings, 1 reply; 8+ messages in thread From: Ritesh Raj Sarraf @ 2018-06-14 15:44 UTC (permalink / raw) To: Richard Weinberger; +Cc: linux-um [-- Attachment #1.1: Type: text/plain, Size: 1705 bytes --] On Thu, 2018-06-14 at 13:15 +0200, Richard Weinberger wrote: > > This log missed the main error line: > > > > CC arch/um/kernel/maccess.o > > CC arch/um/kernel/kmsg_dump.o > > CC arch/um/kernel/skas/clone.o > > In file included from ./arch/x86/um/shared/sysdep/ptrace.h:42:0, > > from ./arch/um/include/shared/as-layout.h:38, > > from arch/um/kernel/skas/clone.c:11: > > ./arch/x86/um/shared/sysdep/ptrace_32.h:16:23: error: expected > > identifier before numeric constant > > #define PTRACE_SYSEMU 31 > > Hmm, can you please check how PTRACE_SYSEMU is defined in your UAPI? > > The code is pretty boring: > #ifndef PTRACE_SYSEMU > #define PTRACE_SYSEMU 31 > #endif > > My best guess is that PTRACE_SYSEMU is not a define but something > else and then > #define fails in an interesting way. There's nothing much in here either. From file: i386-linux-gnu/sys/ptrace.h And it is the same code on x86_64 too, where I've been able to successfully build it. #ifdef __x86_64__ /* Access TLS data. */ PTRACE_ARCH_PRCTL = 30, # define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL #endif /* Continue and stop at the next syscall, it will not be executed. */ PTRACE_SYSEMU = 31, #define PT_SYSEMU PTRACE_SYSEMU /* Single step the process, the next syscall will not be executed. */ PTRACE_SYSEMU_SINGLESTEP = 32, #define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP /* Execute process until next taken branch. */ PTRACE_SINGLEBLOCK = 33, #define PT_STEPBLOCK PTRACE_SINGLEBLOCK -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: UML fails to build on arch i386 2018-06-14 15:44 ` Ritesh Raj Sarraf @ 2018-06-14 18:41 ` Richard Weinberger 2018-06-15 6:35 ` Ritesh Raj Sarraf 0 siblings, 1 reply; 8+ messages in thread From: Richard Weinberger @ 2018-06-14 18:41 UTC (permalink / raw) To: rrs, linux-um Am Donnerstag, 14. Juni 2018, 17:44:37 CEST schrieb Ritesh Raj Sarraf: > On Thu, 2018-06-14 at 13:15 +0200, Richard Weinberger wrote: > > > This log missed the main error line: > > > > > > CC arch/um/kernel/maccess.o > > > CC arch/um/kernel/kmsg_dump.o > > > CC arch/um/kernel/skas/clone.o > > > In file included from ./arch/x86/um/shared/sysdep/ptrace.h:42:0, > > > from ./arch/um/include/shared/as-layout.h:38, > > > from arch/um/kernel/skas/clone.c:11: > > > ./arch/x86/um/shared/sysdep/ptrace_32.h:16:23: error: expected > > > identifier before numeric constant > > > #define PTRACE_SYSEMU 31 > > > > Hmm, can you please check how PTRACE_SYSEMU is defined in your UAPI? > > > > The code is pretty boring: > > #ifndef PTRACE_SYSEMU > > #define PTRACE_SYSEMU 31 > > #endif > > > > My best guess is that PTRACE_SYSEMU is not a define but something > > else and then > > #define fails in an interesting way. > > There's nothing much in here either. > From file: i386-linux-gnu/sys/ptrace.h > And it is the same code on x86_64 too, where I've been able to > successfully build it. > > > > #ifdef __x86_64__ > /* Access TLS data. */ > PTRACE_ARCH_PRCTL = 30, > # define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL > #endif > > /* Continue and stop at the next syscall, it will not be executed. */ > PTRACE_SYSEMU = 31, > #define PT_SYSEMU PTRACE_SYSEMU Okay, PTRACE_SYSEMU seems to be part of an enum, that's why UML's #ifndef does not not protect the #define. What libc is this? I think we can remove UML's define check and just assume that every system has PTRACE_SYSEMU properly defined. Thanks, //richard -- sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria ATU66964118 - FN 374287y _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: UML fails to build on arch i386 2018-06-14 18:41 ` Richard Weinberger @ 2018-06-15 6:35 ` Ritesh Raj Sarraf 2018-06-15 6:43 ` Richard Weinberger 0 siblings, 1 reply; 8+ messages in thread From: Ritesh Raj Sarraf @ 2018-06-15 6:35 UTC (permalink / raw) To: Richard Weinberger, linux-um [-- Attachment #1.1: Type: text/plain, Size: 1297 bytes --] Hello Richard, On Thu, 2018-06-14 at 20:41 +0200, Richard Weinberger wrote: > > > > #ifdef __x86_64__ > > /* Access TLS data. */ > > PTRACE_ARCH_PRCTL = 30, > > # define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL > > #endif > > > > /* Continue and stop at the next syscall, it will not be > > executed. */ > > PTRACE_SYSEMU = 31, > > #define PT_SYSEMU PTRACE_SYSEMU > > Okay, PTRACE_SYSEMU seems to be part of an enum, that's why UML's > #ifndef does not > not protect the #define. > > What libc is this? This is glibc 2.27 from Debian. rrs@priyasi:~$ dpkg -S /usr/include/x86_64-linux-gnu/sys/ptrace.h libc6-dev:amd64: /usr/include/x86_64-linux-gnu/sys/ptrace.h 12:19 ♒♒♒ ☺ 😄 rrs@priyasi:~$ apt policy libc6-dev libc6-dev: Installed: 2.27-3 Candidate: 2.27-3 Version table: *** 2.27-3 900 900 http://deb.debian.org/debian testing/main amd64 Packages 500 http://deb.debian.org/debian unstable/main amd64 Packages 100 /var/lib/dpkg/status 12:19 ♒♒♒ ☺ 😄 > > I think we can remove UML's define check and just assume that every > system has PTRACE_SYSEMU > properly defined. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: UML fails to build on arch i386 2018-06-15 6:35 ` Ritesh Raj Sarraf @ 2018-06-15 6:43 ` Richard Weinberger 2018-06-15 11:58 ` Ritesh Raj Sarraf 0 siblings, 1 reply; 8+ messages in thread From: Richard Weinberger @ 2018-06-15 6:43 UTC (permalink / raw) To: rrs; +Cc: linux-um Am Freitag, 15. Juni 2018, 08:35:02 CEST schrieb Ritesh Raj Sarraf: > Hello Richard, > > On Thu, 2018-06-14 at 20:41 +0200, Richard Weinberger wrote: > > > > > > #ifdef __x86_64__ > > > /* Access TLS data. */ > > > PTRACE_ARCH_PRCTL = 30, > > > # define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL > > > #endif > > > > > > /* Continue and stop at the next syscall, it will not be > > > executed. */ > > > PTRACE_SYSEMU = 31, > > > #define PT_SYSEMU PTRACE_SYSEMU > > > > Okay, PTRACE_SYSEMU seems to be part of an enum, that's why UML's > > #ifndef does not > > not protect the #define. > > > > What libc is this? > > This is glibc 2.27 from Debian. > > rrs@priyasi:~$ dpkg -S /usr/include/x86_64-linux-gnu/sys/ptrace.h > libc6-dev:amd64: /usr/include/x86_64-linux-gnu/sys/ptrace.h > 12:19 ♒♒♒ ☺ 😄 > rrs@priyasi:~$ apt policy libc6-dev > libc6-dev: > Installed: 2.27-3 > Candidate: 2.27-3 > Version table: > *** 2.27-3 900 > 900 http://deb.debian.org/debian testing/main amd64 Packages > 500 http://deb.debian.org/debian unstable/main amd64 Packages > 100 /var/lib/dpkg/status > 12:19 ♒♒♒ ☺ 😄 Okay, as expected, the ptrace SYSEMU request code is now an enum. Changed by in glibc: commit c48831d0eebf876d986919baf2d9240a79192837 Author: Dmitry V. Levin <ldv@altlinux.org> Date: Wed Dec 27 00:54:38 2017 +0000 linux/x86: sync sys/ptrace.h with Linux 4.14 [BZ #22433] Clone generic linux/sys/ptrace.h, add the following x86-specific __ptrace_request constants: PTRACE_GET_THREAD_AREA, PTRACE_SET_THREAD_AREA, PTRACE_ARCH_PRCTL, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP, and PTRACE_SINGLEBLOCK. [BZ #22433] * sysdeps/unix/sysv/linux/x86/sys/ptrace.h: New file. Does this change make UML build on your host? diff --git a/arch/x86/um/shared/sysdep/ptrace_32.h b/arch/x86/um/shared/sysdep/ptrace_32.h index b94a108de1dc..ae00d22bce02 100644 --- a/arch/x86/um/shared/sysdep/ptrace_32.h +++ b/arch/x86/um/shared/sysdep/ptrace_32.h @@ -10,20 +10,10 @@ static inline void update_debugregs(int seq) {} -/* syscall emulation path in ptrace */ - -#ifndef PTRACE_SYSEMU -#define PTRACE_SYSEMU 31 -#endif - void set_using_sysemu(int value); int get_using_sysemu(void); extern int sysemu_supported; -#ifndef PTRACE_SYSEMU_SINGLESTEP -#define PTRACE_SYSEMU_SINGLESTEP 32 -#endif - #define UPT_SYSCALL_ARG1(r) UPT_BX(r) #define UPT_SYSCALL_ARG2(r) UPT_CX(r) #define UPT_SYSCALL_ARG3(r) UPT_DX(r) Thanks, //richard -- sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria ATU66964118 - FN 374287y _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: UML fails to build on arch i386 2018-06-15 6:43 ` Richard Weinberger @ 2018-06-15 11:58 ` Ritesh Raj Sarraf 0 siblings, 0 replies; 8+ messages in thread From: Ritesh Raj Sarraf @ 2018-06-15 11:58 UTC (permalink / raw) To: Richard Weinberger; +Cc: linux-um [-- Attachment #1.1: Type: text/plain, Size: 1754 bytes --] On Fri, 2018-06-15 at 08:43 +0200, Richard Weinberger wrote: > Okay, as expected, the ptrace SYSEMU request code is now an enum. > Changed by in glibc: > commit c48831d0eebf876d986919baf2d9240a79192837 > Author: Dmitry V. Levin <ldv@altlinux.org> > Date: Wed Dec 27 00:54:38 2017 +0000 > > linux/x86: sync sys/ptrace.h with Linux 4.14 [BZ #22433] > > Clone generic linux/sys/ptrace.h, add the following x86-specific > __ptrace_request constants: PTRACE_GET_THREAD_AREA, > PTRACE_SET_THREAD_AREA, PTRACE_ARCH_PRCTL, PTRACE_SYSEMU, > PTRACE_SYSEMU_SINGLESTEP, and PTRACE_SINGLEBLOCK. > > [BZ #22433] > * sysdeps/unix/sysv/linux/x86/sys/ptrace.h: New file. > > Does this change make UML build on your host? > > diff --git a/arch/x86/um/shared/sysdep/ptrace_32.h > b/arch/x86/um/shared/sysdep/ptrace_32.h > index b94a108de1dc..ae00d22bce02 100644 > --- a/arch/x86/um/shared/sysdep/ptrace_32.h > +++ b/arch/x86/um/shared/sysdep/ptrace_32.h > @@ -10,20 +10,10 @@ > > static inline void update_debugregs(int seq) {} > > -/* syscall emulation path in ptrace */ > - > -#ifndef PTRACE_SYSEMU > -#define PTRACE_SYSEMU 31 > -#endif > - > void set_using_sysemu(int value); > int get_using_sysemu(void); > extern int sysemu_supported; > > -#ifndef PTRACE_SYSEMU_SINGLESTEP > -#define PTRACE_SYSEMU_SINGLESTEP 32 > -#endif > - > #define UPT_SYSCALL_ARG1(r) UPT_BX(r) > #define UPT_SYSCALL_ARG2(r) UPT_CX(r) > #define UPT_SYSCALL_ARG3(r) UPT_DX(r) > Thank you Richard. That does fix the build. I built and verified it on i386 and amd64. Thanks, Ritesh -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention." [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 152 bytes --] _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-06-15 11:59 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-06-14 5:16 UML fails to build on arch i386 Ritesh Raj Sarraf 2018-06-14 8:58 ` Ritesh Raj Sarraf 2018-06-14 11:15 ` Richard Weinberger 2018-06-14 15:44 ` Ritesh Raj Sarraf 2018-06-14 18:41 ` Richard Weinberger 2018-06-15 6:35 ` Ritesh Raj Sarraf 2018-06-15 6:43 ` Richard Weinberger 2018-06-15 11:58 ` Ritesh Raj Sarraf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).