* qemu fails to build with glibc-2.15
@ 2012-07-16 12:37 X O
2012-07-16 14:11 ` Veruca Salt
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: X O @ 2012-07-16 12:37 UTC (permalink / raw)
To: kvm
Hello,
I suspect upgrading my system to glibc-2.15 was a mistake. It seems to
be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be
compiled anymore. Yes, I did search around and that led me to glibc,
resp. http://sourceware.org/ml/libc-ports/2011-08/msg00019.html
Please, could somebody confirm or deny the following error is thanks
to glibc-2.15?
Is there a way to compile qemu with glibc-2.15?
Or is my system broken?
~~~
CC i386-linux-user/syscall.o
/tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents':
/tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents'
undeclared (first use in this function)
/tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared
identifier is reported only once for each function it appears in
/tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek':
/tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek'
undeclared (first use in this function)
/tmp/qemu-1.1.1/linux-user/syscall.c: At top level:
/tmp/qemu-1.1.1/linux-user/syscall.c:358:12: warning: 'sys_futimesat'
defined but not used [-Wunused-function]
/tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek':
/tmp/qemu-1.1.1/linux-user/syscall.c:223:1: warning: control reaches
end of non-void function [-Wreturn-type]
/tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents':
/tmp/qemu-1.1.1/linux-user/syscall.c:217:1: warning: control reaches
end of non-void function [-Wreturn-type]
~~~
Thanks,
bexoff
^ permalink raw reply [flat|nested] 15+ messages in thread* RE: qemu fails to build with glibc-2.15 2012-07-16 12:37 qemu fails to build with glibc-2.15 X O @ 2012-07-16 14:11 ` Veruca Salt 2012-07-16 14:56 ` X O 2012-07-16 15:14 ` [Qemu-devel] " Avi Kivity 2012-07-21 11:34 ` [Qemu-devel] " X O 2 siblings, 1 reply; 15+ messages in thread From: Veruca Salt @ 2012-07-16 14:11 UTC (permalink / raw) To: bexoff, QEMU-KVM Mailing List Hi Bexoff, I can confirm that we are currently using a patched 2.13 on my project; it may be that 2.14 produces issues, or requires special instructions or patches to make it work with late qemu-kvm. I have had no issues using 2.13 on k-q 1.1 and below. Simon ---------------------------------------- > Date: Mon, 16 Jul 2012 14:37:25 +0200 > Subject: qemu fails to build with glibc-2.15 > From: bexoff@gmail.com > To: kvm@vger.kernel.org > > Hello, > > I suspect upgrading my system to glibc-2.15 was a mistake. It seems to > be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be > compiled anymore. Yes, I did search around and that led me to glibc, > resp. http://sourceware.org/ml/libc-ports/2011-08/msg00019.html > > Please, could somebody confirm or deny the following error is thanks > to glibc-2.15? > Is there a way to compile qemu with glibc-2.15? > Or is my system broken? > > ~~~ > CC i386-linux-user/syscall.o > /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' > undeclared (first use in this function) > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared > identifier is reported only once for each function it appears in > /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': > /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' > undeclared (first use in this function) > /tmp/qemu-1.1.1/linux-user/syscall.c: At top level: > /tmp/qemu-1.1.1/linux-user/syscall.c:358:12: warning: 'sys_futimesat' > defined but not used [-Wunused-function] > /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': > /tmp/qemu-1.1.1/linux-user/syscall.c:223:1: warning: control reaches > end of non-void function [-Wreturn-type] > /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: warning: control reaches > end of non-void function [-Wreturn-type] > ~~~ > > Thanks, > bexoff > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: qemu fails to build with glibc-2.15 2012-07-16 14:11 ` Veruca Salt @ 2012-07-16 14:56 ` X O 0 siblings, 0 replies; 15+ messages in thread From: X O @ 2012-07-16 14:56 UTC (permalink / raw) To: Veruca Salt; +Cc: QEMU-KVM Mailing List On Mon, Jul 16, 2012 at 4:11 PM, Veruca Salt <verucasaltuk@hotmail.co.uk> wrote: > > > Hi Bexoff, > I can confirm that we are currently using a patched 2.13 on my project; it may be that 2.14 produces issues, or requires special instructions or patches to make it work with late qemu-kvm. > I have had no issues using 2.13 on k-q 1.1 and below. > Simon Thank you Simon for confirmation. I guess nobody knows whether there are plans to fix(??? ok, now I'm implying qemu is broken which is not exactly what I want to do aka watch my mouth) this? From what I understood, glibc is expecting something else and use of these macros(?) is deprecated. Is there anything I can do, resp. would that be a good thing to do - poke into code, hack around, waste time, send a patch? :) I admit I have no idea how much and what is needed, but that haven't scared me before. Thanks, bexoff > ---------------------------------------- >> Date: Mon, 16 Jul 2012 14:37:25 +0200 >> Subject: qemu fails to build with glibc-2.15 >> From: bexoff@gmail.com >> To: kvm@vger.kernel.org >> >> Hello, >> >> I suspect upgrading my system to glibc-2.15 was a mistake. It seems to >> be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be >> compiled anymore. Yes, I did search around and that led me to glibc, >> resp. http://sourceware.org/ml/libc-ports/2011-08/msg00019.html >> >> Please, could somebody confirm or deny the following error is thanks >> to glibc-2.15? >> Is there a way to compile qemu with glibc-2.15? >> Or is my system broken? >> >> ~~~ >> CC i386-linux-user/syscall.o >> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' >> undeclared (first use in this function) >> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared >> identifier is reported only once for each function it appears in >> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >> /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' >> undeclared (first use in this function) >> /tmp/qemu-1.1.1/linux-user/syscall.c: At top level: >> /tmp/qemu-1.1.1/linux-user/syscall.c:358:12: warning: 'sys_futimesat' >> defined but not used [-Wunused-function] >> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >> /tmp/qemu-1.1.1/linux-user/syscall.c:223:1: warning: control reaches >> end of non-void function [-Wreturn-type] >> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: warning: control reaches >> end of non-void function [-Wreturn-type] >> ~~~ >> >> Thanks, >> bexoff >> -- >> To unsubscribe from this list: send the line "unsubscribe kvm" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: qemu fails to build with glibc-2.15 2012-07-16 12:37 qemu fails to build with glibc-2.15 X O @ 2012-07-16 15:14 ` Avi Kivity 2012-07-16 15:14 ` [Qemu-devel] " Avi Kivity 2012-07-21 11:34 ` [Qemu-devel] " X O 2 siblings, 0 replies; 15+ messages in thread From: Avi Kivity @ 2012-07-16 15:14 UTC (permalink / raw) To: X O; +Cc: kvm, qemu-devel (fixed mailing list) On 07/16/2012 03:37 PM, X O wrote: > Hello, > > I suspect upgrading my system to glibc-2.15 was a mistake. It seems to > be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be > compiled anymore. Yes, I did search around and that led me to glibc, > resp. http://sourceware.org/ml/libc-ports/2011-08/msg00019.html > > Please, could somebody confirm or deny the following error is thanks > to glibc-2.15? > Is there a way to compile qemu with glibc-2.15? > Or is my system broken? > > ~~~ > CC i386-linux-user/syscall.o > /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' > undeclared (first use in this function) > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared > identifier is reported only once for each function it appears in > /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': > /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' > undeclared (first use in this function) Please report the output of grep -r __NR_getdents /usr/include/ on your system. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] qemu fails to build with glibc-2.15 @ 2012-07-16 15:14 ` Avi Kivity 0 siblings, 0 replies; 15+ messages in thread From: Avi Kivity @ 2012-07-16 15:14 UTC (permalink / raw) To: X O; +Cc: qemu-devel, kvm (fixed mailing list) On 07/16/2012 03:37 PM, X O wrote: > Hello, > > I suspect upgrading my system to glibc-2.15 was a mistake. It seems to > be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be > compiled anymore. Yes, I did search around and that led me to glibc, > resp. http://sourceware.org/ml/libc-ports/2011-08/msg00019.html > > Please, could somebody confirm or deny the following error is thanks > to glibc-2.15? > Is there a way to compile qemu with glibc-2.15? > Or is my system broken? > > ~~~ > CC i386-linux-user/syscall.o > /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' > undeclared (first use in this function) > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared > identifier is reported only once for each function it appears in > /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': > /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' > undeclared (first use in this function) Please report the output of grep -r __NR_getdents /usr/include/ on your system. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: qemu fails to build with glibc-2.15 2012-07-16 15:14 ` [Qemu-devel] " Avi Kivity @ 2012-07-16 16:35 ` X O -1 siblings, 0 replies; 15+ messages in thread From: X O @ 2012-07-16 16:35 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm, qemu-devel On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity <avi@redhat.com> wrote: > (fixed mailing list) > > On 07/16/2012 03:37 PM, X O wrote: >> Hello, >> >> I suspect upgrading my system to glibc-2.15 was a mistake. It seems to >> be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be >> compiled anymore. Yes, I did search around and that led me to glibc, >> resp. http://sourceware.org/ml/libc-ports/2011-08/msg00019.html >> >> Please, could somebody confirm or deny the following error is thanks >> to glibc-2.15? >> Is there a way to compile qemu with glibc-2.15? >> Or is my system broken? >> >> ~~~ >> CC i386-linux-user/syscall.o >> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' >> undeclared (first use in this function) >> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared >> identifier is reported only once for each function it appears in >> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >> /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' >> undeclared (first use in this function) > > Please report the output of > > grep -r __NR_getdents /usr/include/ > > on your system. > Here goes: ~~~ bash-3.1$ grep -r __NR_getdents /usr/include/ /usr/include/bits/syscall.h:#define SYS_getdents __NR_getdents /usr/include/bits/syscall.h:#define SYS_getdents64 __NR_getdents64 /usr/include/bits/syscall.h:#define SYS_getdents __NR_getdents /usr/include/bits/syscall.h:#define SYS_getdents64 __NR_getdents64 /usr/include/asm-generic/unistd_32.h:#define __NR_getdents 141 /usr/include/asm-generic/unistd_32.h:#define __NR_getdents64 220 /usr/include/asm-generic/unistd_64.h:#define __NR_getdents 78 /usr/include/asm-generic/unistd_64.h:__SYSCALL(__NR_getdents, sys_getdents) /usr/include/asm-generic/unistd_64.h:#define __NR_getdents64 217 /usr/include/asm-generic/unistd_64.h:__SYSCALL(__NR_getdents64, sys_getdents64) /usr/include/asm-generic/unistd.h:#define __NR_getdents64 61 /usr/include/asm-generic/unistd.h:__SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64) /usr/include/asm-generic/unistd.h:#define __NR_getdents 1065 /usr/include/asm-generic/unistd.h:__SYSCALL(__NR_getdents, sys_getdents) ~~~ btw system is x86-64. I've neglected to mention that and it might have been important. Thanks, bexoff PS: I'm not signed up to qemu-devel (still under consideration), please keep me on CC. > > > -- > error compiling committee.c: too many arguments to function > > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] qemu fails to build with glibc-2.15 @ 2012-07-16 16:35 ` X O 0 siblings, 0 replies; 15+ messages in thread From: X O @ 2012-07-16 16:35 UTC (permalink / raw) To: Avi Kivity; +Cc: qemu-devel, kvm On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity <avi@redhat.com> wrote: > (fixed mailing list) > > On 07/16/2012 03:37 PM, X O wrote: >> Hello, >> >> I suspect upgrading my system to glibc-2.15 was a mistake. It seems to >> be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be >> compiled anymore. Yes, I did search around and that led me to glibc, >> resp. http://sourceware.org/ml/libc-ports/2011-08/msg00019.html >> >> Please, could somebody confirm or deny the following error is thanks >> to glibc-2.15? >> Is there a way to compile qemu with glibc-2.15? >> Or is my system broken? >> >> ~~~ >> CC i386-linux-user/syscall.o >> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' >> undeclared (first use in this function) >> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared >> identifier is reported only once for each function it appears in >> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >> /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' >> undeclared (first use in this function) > > Please report the output of > > grep -r __NR_getdents /usr/include/ > > on your system. > Here goes: ~~~ bash-3.1$ grep -r __NR_getdents /usr/include/ /usr/include/bits/syscall.h:#define SYS_getdents __NR_getdents /usr/include/bits/syscall.h:#define SYS_getdents64 __NR_getdents64 /usr/include/bits/syscall.h:#define SYS_getdents __NR_getdents /usr/include/bits/syscall.h:#define SYS_getdents64 __NR_getdents64 /usr/include/asm-generic/unistd_32.h:#define __NR_getdents 141 /usr/include/asm-generic/unistd_32.h:#define __NR_getdents64 220 /usr/include/asm-generic/unistd_64.h:#define __NR_getdents 78 /usr/include/asm-generic/unistd_64.h:__SYSCALL(__NR_getdents, sys_getdents) /usr/include/asm-generic/unistd_64.h:#define __NR_getdents64 217 /usr/include/asm-generic/unistd_64.h:__SYSCALL(__NR_getdents64, sys_getdents64) /usr/include/asm-generic/unistd.h:#define __NR_getdents64 61 /usr/include/asm-generic/unistd.h:__SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64) /usr/include/asm-generic/unistd.h:#define __NR_getdents 1065 /usr/include/asm-generic/unistd.h:__SYSCALL(__NR_getdents, sys_getdents) ~~~ btw system is x86-64. I've neglected to mention that and it might have been important. Thanks, bexoff PS: I'm not signed up to qemu-devel (still under consideration), please keep me on CC. > > > -- > error compiling committee.c: too many arguments to function > > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: qemu fails to build with glibc-2.15 2012-07-16 16:35 ` [Qemu-devel] " X O @ 2012-07-17 9:38 ` X O -1 siblings, 0 replies; 15+ messages in thread From: X O @ 2012-07-17 9:38 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm, qemu-devel, Veruca Salt On Mon, Jul 16, 2012 at 6:35 PM, X O <bexoff@gmail.com> wrote: > On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity <avi@redhat.com> wrote: >> (fixed mailing list) >> >> On 07/16/2012 03:37 PM, X O wrote: [...] >>> Is there a way to compile qemu with glibc-2.15? [...] >>> ~~~ >>> CC i386-linux-user/syscall.o >>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' >>> undeclared (first use in this function) >>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared >>> identifier is reported only once for each function it appears in >>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >>> /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' >>> undeclared (first use in this function) Please, see below. I know it is nowhere near clean solution, but it is a quick hack which works for me and might be useful for somebody else. Feel free to kick me in the right direction for a proper patch. I know, some #ifdefs would have to take a place; "<asm/unistd_32.h>" won't be available for all platforms and all glibc versions(?) etc. etc. At least these are the issues I can think off from top of my head. ~~~[CUT]~~~ --- linux-user/syscall.c.orig 2012-07-17 09:45:07.000000000 +0200 +++ linux-user/syscall.c 2012-07-17 10:36:12.000000000 +0200 @@ -25,6 +25,7 @@ #include <endian.h> #include <errno.h> #include <unistd.h> +#include <asm/unistd_32.h> #include <fcntl.h> #include <time.h> #include <limits.h> @@ -200,11 +201,6 @@ #define __NR_sys_inotify_add_watch __NR_inotify_add_watch #define __NR_sys_inotify_rm_watch __NR_inotify_rm_watch -#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__) || \ - defined(__s390x__) -#define __NR__llseek __NR_lseek -#endif - #ifdef __NR_gettid _syscall0(int, gettid) #else ~~~[CUT]~~~ Thanks to all whom replied. Regards, bexoff >> >> Please report the output of >> >> grep -r __NR_getdents /usr/include/ >> >> on your system. >> > > Here goes: > > ~~~ > bash-3.1$ grep -r __NR_getdents /usr/include/ > /usr/include/bits/syscall.h:#define SYS_getdents __NR_getdents > /usr/include/bits/syscall.h:#define SYS_getdents64 __NR_getdents64 > /usr/include/bits/syscall.h:#define SYS_getdents __NR_getdents > /usr/include/bits/syscall.h:#define SYS_getdents64 __NR_getdents64 > /usr/include/asm-generic/unistd_32.h:#define __NR_getdents 141 > /usr/include/asm-generic/unistd_32.h:#define __NR_getdents64 220 > /usr/include/asm-generic/unistd_64.h:#define __NR_getdents > 78 > /usr/include/asm-generic/unistd_64.h:__SYSCALL(__NR_getdents, sys_getdents) > /usr/include/asm-generic/unistd_64.h:#define __NR_getdents64 > 217 > /usr/include/asm-generic/unistd_64.h:__SYSCALL(__NR_getdents64, sys_getdents64) > /usr/include/asm-generic/unistd.h:#define __NR_getdents64 61 > /usr/include/asm-generic/unistd.h:__SC_COMP(__NR_getdents64, > sys_getdents64, compat_sys_getdents64) > /usr/include/asm-generic/unistd.h:#define __NR_getdents 1065 > /usr/include/asm-generic/unistd.h:__SYSCALL(__NR_getdents, sys_getdents) > ~~~ > > btw system is x86-64. I've neglected to mention that and it might have > been important. > > Thanks, > bexoff > > PS: I'm not signed up to qemu-devel (still under consideration), > please keep me on CC. > >> >> >> -- >> error compiling committee.c: too many arguments to function >> >> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] qemu fails to build with glibc-2.15 @ 2012-07-17 9:38 ` X O 0 siblings, 0 replies; 15+ messages in thread From: X O @ 2012-07-17 9:38 UTC (permalink / raw) To: Avi Kivity; +Cc: Veruca Salt, qemu-devel, kvm On Mon, Jul 16, 2012 at 6:35 PM, X O <bexoff@gmail.com> wrote: > On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity <avi@redhat.com> wrote: >> (fixed mailing list) >> >> On 07/16/2012 03:37 PM, X O wrote: [...] >>> Is there a way to compile qemu with glibc-2.15? [...] >>> ~~~ >>> CC i386-linux-user/syscall.o >>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' >>> undeclared (first use in this function) >>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared >>> identifier is reported only once for each function it appears in >>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >>> /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' >>> undeclared (first use in this function) Please, see below. I know it is nowhere near clean solution, but it is a quick hack which works for me and might be useful for somebody else. Feel free to kick me in the right direction for a proper patch. I know, some #ifdefs would have to take a place; "<asm/unistd_32.h>" won't be available for all platforms and all glibc versions(?) etc. etc. At least these are the issues I can think off from top of my head. ~~~[CUT]~~~ --- linux-user/syscall.c.orig 2012-07-17 09:45:07.000000000 +0200 +++ linux-user/syscall.c 2012-07-17 10:36:12.000000000 +0200 @@ -25,6 +25,7 @@ #include <endian.h> #include <errno.h> #include <unistd.h> +#include <asm/unistd_32.h> #include <fcntl.h> #include <time.h> #include <limits.h> @@ -200,11 +201,6 @@ #define __NR_sys_inotify_add_watch __NR_inotify_add_watch #define __NR_sys_inotify_rm_watch __NR_inotify_rm_watch -#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__) || \ - defined(__s390x__) -#define __NR__llseek __NR_lseek -#endif - #ifdef __NR_gettid _syscall0(int, gettid) #else ~~~[CUT]~~~ Thanks to all whom replied. Regards, bexoff >> >> Please report the output of >> >> grep -r __NR_getdents /usr/include/ >> >> on your system. >> > > Here goes: > > ~~~ > bash-3.1$ grep -r __NR_getdents /usr/include/ > /usr/include/bits/syscall.h:#define SYS_getdents __NR_getdents > /usr/include/bits/syscall.h:#define SYS_getdents64 __NR_getdents64 > /usr/include/bits/syscall.h:#define SYS_getdents __NR_getdents > /usr/include/bits/syscall.h:#define SYS_getdents64 __NR_getdents64 > /usr/include/asm-generic/unistd_32.h:#define __NR_getdents 141 > /usr/include/asm-generic/unistd_32.h:#define __NR_getdents64 220 > /usr/include/asm-generic/unistd_64.h:#define __NR_getdents > 78 > /usr/include/asm-generic/unistd_64.h:__SYSCALL(__NR_getdents, sys_getdents) > /usr/include/asm-generic/unistd_64.h:#define __NR_getdents64 > 217 > /usr/include/asm-generic/unistd_64.h:__SYSCALL(__NR_getdents64, sys_getdents64) > /usr/include/asm-generic/unistd.h:#define __NR_getdents64 61 > /usr/include/asm-generic/unistd.h:__SC_COMP(__NR_getdents64, > sys_getdents64, compat_sys_getdents64) > /usr/include/asm-generic/unistd.h:#define __NR_getdents 1065 > /usr/include/asm-generic/unistd.h:__SYSCALL(__NR_getdents, sys_getdents) > ~~~ > > btw system is x86-64. I've neglected to mention that and it might have > been important. > > Thanks, > bexoff > > PS: I'm not signed up to qemu-devel (still under consideration), > please keep me on CC. > >> >> >> -- >> error compiling committee.c: too many arguments to function >> >> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] qemu fails to build with glibc-2.15 2012-07-17 9:38 ` [Qemu-devel] " X O @ 2012-07-17 9:51 ` Peter Maydell -1 siblings, 0 replies; 15+ messages in thread From: Peter Maydell @ 2012-07-17 9:51 UTC (permalink / raw) To: X O; +Cc: Avi Kivity, Veruca Salt, qemu-devel, kvm On 17 July 2012 10:38, X O <bexoff@gmail.com> wrote: > On Mon, Jul 16, 2012 at 6:35 PM, X O <bexoff@gmail.com> wrote: >> On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity <avi@redhat.com> wrote: >>> (fixed mailing list) >>> >>> On 07/16/2012 03:37 PM, X O wrote: > [...] >>>> Is there a way to compile qemu with glibc-2.15? > [...] >>>> ~~~ >>>> CC i386-linux-user/syscall.o >>>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >>>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' >>>> undeclared (first use in this function) >>>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared >>>> identifier is reported only once for each function it appears in >>>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >>>> /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' >>>> undeclared (first use in this function) > > Please, see below. I know it is nowhere near clean solution, but it is > a quick hack which works for me and might be useful for somebody else. > Feel free to kick me in the right direction for a proper patch. > > I know, some #ifdefs would have to take a place; "<asm/unistd_32.h>" > won't be available for all platforms and all glibc versions(?) etc. > etc. At least these are the issues I can think off from top of my > head. > > ~~~[CUT]~~~ > --- linux-user/syscall.c.orig 2012-07-17 09:45:07.000000000 +0200 > +++ linux-user/syscall.c 2012-07-17 10:36:12.000000000 +0200 > @@ -25,6 +25,7 @@ > #include <endian.h> > #include <errno.h> > #include <unistd.h> > +#include <asm/unistd_32.h> This is (obviously) the wrong thing -- we shouldn't need to include asm/ headers and certainly including 32 bit only headers will break 64 bit compiles. My Ubuntu Precise system has (e)glibc-2.15 and it works fine, because: * qemu linux-user/syscall.c #includes <linux/unistd.h> * /usr/include/linux/unistd.h #includes <asm/unistd.h> * /usr/include/asm/unistd.h #includes either asm/unistd_32.h or asm/unistd_64.h as appropriate for 32/64 bit compiles. Is part of this chain broken on your system? -- PMM ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] qemu fails to build with glibc-2.15 @ 2012-07-17 9:51 ` Peter Maydell 0 siblings, 0 replies; 15+ messages in thread From: Peter Maydell @ 2012-07-17 9:51 UTC (permalink / raw) To: X O; +Cc: Veruca Salt, Avi Kivity, kvm, qemu-devel On 17 July 2012 10:38, X O <bexoff@gmail.com> wrote: > On Mon, Jul 16, 2012 at 6:35 PM, X O <bexoff@gmail.com> wrote: >> On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity <avi@redhat.com> wrote: >>> (fixed mailing list) >>> >>> On 07/16/2012 03:37 PM, X O wrote: > [...] >>>> Is there a way to compile qemu with glibc-2.15? > [...] >>>> ~~~ >>>> CC i386-linux-user/syscall.o >>>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >>>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' >>>> undeclared (first use in this function) >>>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared >>>> identifier is reported only once for each function it appears in >>>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >>>> /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' >>>> undeclared (first use in this function) > > Please, see below. I know it is nowhere near clean solution, but it is > a quick hack which works for me and might be useful for somebody else. > Feel free to kick me in the right direction for a proper patch. > > I know, some #ifdefs would have to take a place; "<asm/unistd_32.h>" > won't be available for all platforms and all glibc versions(?) etc. > etc. At least these are the issues I can think off from top of my > head. > > ~~~[CUT]~~~ > --- linux-user/syscall.c.orig 2012-07-17 09:45:07.000000000 +0200 > +++ linux-user/syscall.c 2012-07-17 10:36:12.000000000 +0200 > @@ -25,6 +25,7 @@ > #include <endian.h> > #include <errno.h> > #include <unistd.h> > +#include <asm/unistd_32.h> This is (obviously) the wrong thing -- we shouldn't need to include asm/ headers and certainly including 32 bit only headers will break 64 bit compiles. My Ubuntu Precise system has (e)glibc-2.15 and it works fine, because: * qemu linux-user/syscall.c #includes <linux/unistd.h> * /usr/include/linux/unistd.h #includes <asm/unistd.h> * /usr/include/asm/unistd.h #includes either asm/unistd_32.h or asm/unistd_64.h as appropriate for 32/64 bit compiles. Is part of this chain broken on your system? -- PMM ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] qemu fails to build with glibc-2.15 2012-07-17 9:51 ` Peter Maydell @ 2012-07-17 10:01 ` X O -1 siblings, 0 replies; 15+ messages in thread From: X O @ 2012-07-17 10:01 UTC (permalink / raw) To: Peter Maydell; +Cc: Avi Kivity, Veruca Salt, qemu-devel, kvm On Tue, Jul 17, 2012 at 11:51 AM, Peter Maydell <peter.maydell@linaro.org> wrote: > On 17 July 2012 10:38, X O <bexoff@gmail.com> wrote: >> On Mon, Jul 16, 2012 at 6:35 PM, X O <bexoff@gmail.com> wrote: >>> On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity <avi@redhat.com> wrote: >>>> (fixed mailing list) >>>> >>>> On 07/16/2012 03:37 PM, X O wrote: >> [...] >>>>> Is there a way to compile qemu with glibc-2.15? >> [...] >>>>> ~~~ >>>>> CC i386-linux-user/syscall.o >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' >>>>> undeclared (first use in this function) >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared >>>>> identifier is reported only once for each function it appears in >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' >>>>> undeclared (first use in this function) >> >> Please, see below. I know it is nowhere near clean solution, but it is >> a quick hack which works for me and might be useful for somebody else. >> Feel free to kick me in the right direction for a proper patch. >> >> I know, some #ifdefs would have to take a place; "<asm/unistd_32.h>" >> won't be available for all platforms and all glibc versions(?) etc. >> etc. At least these are the issues I can think off from top of my >> head. >> >> ~~~[CUT]~~~ >> --- linux-user/syscall.c.orig 2012-07-17 09:45:07.000000000 +0200 >> +++ linux-user/syscall.c 2012-07-17 10:36:12.000000000 +0200 >> @@ -25,6 +25,7 @@ >> #include <endian.h> >> #include <errno.h> >> #include <unistd.h> >> +#include <asm/unistd_32.h> > > This is (obviously) the wrong thing -- we shouldn't need to > include asm/ headers and certainly including 32 bit only > headers will break 64 bit compiles. > This is 64bit build. > My Ubuntu Precise system has (e)glibc-2.15 and it works fine, because: eglibc ??? > > * qemu linux-user/syscall.c #includes <linux/unistd.h> > * /usr/include/linux/unistd.h #includes <asm/unistd.h> No, it doesn't. It includes <bits/unistd.h> and it "ends" there. It doesn't work as "expected" anymore(?), resp. beyond glibc-2.15. > * /usr/include/asm/unistd.h #includes either asm/unistd_32.h > or asm/unistd_64.h as appropriate for 32/64 bit compiles. > > Is part of this chain broken on your system? > Yes, it is "broken" as explained above. -- bexoff > -- PMM ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] qemu fails to build with glibc-2.15 @ 2012-07-17 10:01 ` X O 0 siblings, 0 replies; 15+ messages in thread From: X O @ 2012-07-17 10:01 UTC (permalink / raw) To: Peter Maydell; +Cc: Veruca Salt, Avi Kivity, kvm, qemu-devel On Tue, Jul 17, 2012 at 11:51 AM, Peter Maydell <peter.maydell@linaro.org> wrote: > On 17 July 2012 10:38, X O <bexoff@gmail.com> wrote: >> On Mon, Jul 16, 2012 at 6:35 PM, X O <bexoff@gmail.com> wrote: >>> On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity <avi@redhat.com> wrote: >>>> (fixed mailing list) >>>> >>>> On 07/16/2012 03:37 PM, X O wrote: >> [...] >>>>> Is there a way to compile qemu with glibc-2.15? >> [...] >>>>> ~~~ >>>>> CC i386-linux-user/syscall.o >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' >>>>> undeclared (first use in this function) >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared >>>>> identifier is reported only once for each function it appears in >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': >>>>> /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' >>>>> undeclared (first use in this function) >> >> Please, see below. I know it is nowhere near clean solution, but it is >> a quick hack which works for me and might be useful for somebody else. >> Feel free to kick me in the right direction for a proper patch. >> >> I know, some #ifdefs would have to take a place; "<asm/unistd_32.h>" >> won't be available for all platforms and all glibc versions(?) etc. >> etc. At least these are the issues I can think off from top of my >> head. >> >> ~~~[CUT]~~~ >> --- linux-user/syscall.c.orig 2012-07-17 09:45:07.000000000 +0200 >> +++ linux-user/syscall.c 2012-07-17 10:36:12.000000000 +0200 >> @@ -25,6 +25,7 @@ >> #include <endian.h> >> #include <errno.h> >> #include <unistd.h> >> +#include <asm/unistd_32.h> > > This is (obviously) the wrong thing -- we shouldn't need to > include asm/ headers and certainly including 32 bit only > headers will break 64 bit compiles. > This is 64bit build. > My Ubuntu Precise system has (e)glibc-2.15 and it works fine, because: eglibc ??? > > * qemu linux-user/syscall.c #includes <linux/unistd.h> > * /usr/include/linux/unistd.h #includes <asm/unistd.h> No, it doesn't. It includes <bits/unistd.h> and it "ends" there. It doesn't work as "expected" anymore(?), resp. beyond glibc-2.15. > * /usr/include/asm/unistd.h #includes either asm/unistd_32.h > or asm/unistd_64.h as appropriate for 32/64 bit compiles. > > Is part of this chain broken on your system? > Yes, it is "broken" as explained above. -- bexoff > -- PMM ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: qemu fails to build with glibc-2.15 2012-07-16 12:37 qemu fails to build with glibc-2.15 X O @ 2012-07-21 11:34 ` X O 2012-07-16 15:14 ` [Qemu-devel] " Avi Kivity 2012-07-21 11:34 ` [Qemu-devel] " X O 2 siblings, 0 replies; 15+ messages in thread From: X O @ 2012-07-21 11:34 UTC (permalink / raw) To: kvm, qemu-devel On Mon, Jul 16, 2012 at 2:37 PM, X O <bexoff@gmail.com> wrote: > Hello, > > I suspect upgrading my system to glibc-2.15 was a mistake. It seems to > be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be > compiled anymore. Yes, I did search around and that led me to glibc, > resp. http://sourceware.org/ml/libc-ports/2011-08/msg00019.html > > Please, could somebody confirm or deny the following error is thanks > to glibc-2.15? > Is there a way to compile qemu with glibc-2.15? > Or is my system broken? > > ~~~ > CC i386-linux-user/syscall.o > /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' > undeclared (first use in this function) > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared > identifier is reported only once for each function it appears in > /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': > /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' > undeclared (first use in this function) > /tmp/qemu-1.1.1/linux-user/syscall.c: At top level: > /tmp/qemu-1.1.1/linux-user/syscall.c:358:12: warning: 'sys_futimesat' > defined but not used [-Wunused-function] > /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': > /tmp/qemu-1.1.1/linux-user/syscall.c:223:1: warning: control reaches > end of non-void function [-Wreturn-type] > /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: warning: control reaches > end of non-void function [-Wreturn-type] > ~~~ > > Thanks, > bexoff I meant to sent this out as soon as I found out, but it seems I didn't. Yeah, my system was broken, resp. /usr/include/ was. As soon as I had qemu back up, I put some time and effort to find out "why". Conclusion is - qemu-1.1.1 can be compiled just fine with glibc-2.15 and on x86_64. Sorry for inconvenience and thanks for all help. -- bexoff ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] qemu fails to build with glibc-2.15 @ 2012-07-21 11:34 ` X O 0 siblings, 0 replies; 15+ messages in thread From: X O @ 2012-07-21 11:34 UTC (permalink / raw) To: kvm, qemu-devel On Mon, Jul 16, 2012 at 2:37 PM, X O <bexoff@gmail.com> wrote: > Hello, > > I suspect upgrading my system to glibc-2.15 was a mistake. It seems to > be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be > compiled anymore. Yes, I did search around and that led me to glibc, > resp. http://sourceware.org/ml/libc-ports/2011-08/msg00019.html > > Please, could somebody confirm or deny the following error is thanks > to glibc-2.15? > Is there a way to compile qemu with glibc-2.15? > Or is my system broken? > > ~~~ > CC i386-linux-user/syscall.o > /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: error: '__NR_getdents' > undeclared (first use in this function) > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: note: each undeclared > identifier is reported only once for each function it appears in > /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': > /tmp/qemu-1.1.1/linux-user/syscall.c:224:1: error: '__NR_lseek' > undeclared (first use in this function) > /tmp/qemu-1.1.1/linux-user/syscall.c: At top level: > /tmp/qemu-1.1.1/linux-user/syscall.c:358:12: warning: 'sys_futimesat' > defined but not used [-Wunused-function] > /tmp/qemu-1.1.1/linux-user/syscall.c: In function '_llseek': > /tmp/qemu-1.1.1/linux-user/syscall.c:223:1: warning: control reaches > end of non-void function [-Wreturn-type] > /tmp/qemu-1.1.1/linux-user/syscall.c: In function 'sys_getdents': > /tmp/qemu-1.1.1/linux-user/syscall.c:217:1: warning: control reaches > end of non-void function [-Wreturn-type] > ~~~ > > Thanks, > bexoff I meant to sent this out as soon as I found out, but it seems I didn't. Yeah, my system was broken, resp. /usr/include/ was. As soon as I had qemu back up, I put some time and effort to find out "why". Conclusion is - qemu-1.1.1 can be compiled just fine with glibc-2.15 and on x86_64. Sorry for inconvenience and thanks for all help. -- bexoff ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-07-21 11:34 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-07-16 12:37 qemu fails to build with glibc-2.15 X O 2012-07-16 14:11 ` Veruca Salt 2012-07-16 14:56 ` X O 2012-07-16 15:14 ` Avi Kivity 2012-07-16 15:14 ` [Qemu-devel] " Avi Kivity 2012-07-16 16:35 ` X O 2012-07-16 16:35 ` [Qemu-devel] " X O 2012-07-17 9:38 ` X O 2012-07-17 9:38 ` [Qemu-devel] " X O 2012-07-17 9:51 ` Peter Maydell 2012-07-17 9:51 ` Peter Maydell 2012-07-17 10:01 ` X O 2012-07-17 10:01 ` X O 2012-07-21 11:34 ` X O 2012-07-21 11:34 ` [Qemu-devel] " X O
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.