Re: qemu fails to build with glibc-2.15

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 16, 2012 at 6:35 PM, X O <bexoff@xxxxxxxxx> wrote:
> On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity <avi@xxxxxxxxxx> 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
>>
>>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux