From patchwork Tue Jul 17 09:38:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: X O X-Patchwork-Id: 171361 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 19E2E2C01D5 for ; Tue, 17 Jul 2012 19:38:58 +1000 (EST) Received: from localhost ([::1]:56933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr4F6-0005ev-6Q for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2012 05:38:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr4Ev-0005cY-6d for qemu-devel@nongnu.org; Tue, 17 Jul 2012 05:38:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sr4Eq-0005b1-8K for qemu-devel@nongnu.org; Tue, 17 Jul 2012 05:38:45 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:41190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr4Eq-0005ap-3Q for qemu-devel@nongnu.org; Tue, 17 Jul 2012 05:38:40 -0400 Received: by obbta14 with SMTP id ta14so309008obb.4 for ; Tue, 17 Jul 2012 02:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QaSWJ74/VSXB2MW1yK3F8rXjKkuZFEpOpmhsgtMhbr0=; b=D+XwAEiAIrxz22EqBqGQt//gyue/T8Ii5PfrEydvjAxbaO5NR+mjpuUyAUN0+1IArV g8e8cBVqOTFFjyDJjPzFNseViY9Pzijvs0cvhvhhBRcUtauRq5JzY5jtXm8+X0wzS/U2 oaOY04PCvKATwtoe8M3QTxSZtmUlCPVfYTbUWt2lYYbNkZi16DlJFzcvH1/GACThvyAG op0Z3wul9Ye7vGGrpL7v9Q8FUH6z78+/KYIKWlCdr7E/tyAcBT/JOdewi89RzV7K6WoQ 68I9wDMjuCmXs94SaVWrejBIcDr7bRUcE12quf0JhjA/lJY5PmTgFfkuq+/VhbtTTKme gLaQ== MIME-Version: 1.0 Received: by 10.182.116.2 with SMTP id js2mr2373754obb.38.1342517919362; Tue, 17 Jul 2012 02:38:39 -0700 (PDT) Received: by 10.76.151.37 with HTTP; Tue, 17 Jul 2012 02:38:39 -0700 (PDT) In-Reply-To: References: <50042FE8.1030300@redhat.com> Date: Tue, 17 Jul 2012 11:38:39 +0200 Message-ID: From: X O To: Avi Kivity X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.173 Cc: Veruca Salt , qemu-devel , kvm@vger.kernel.org Subject: Re: [Qemu-devel] qemu fails to build with glibc-2.15 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Mon, Jul 16, 2012 at 6:35 PM, X O wrote: > On Mon, Jul 16, 2012 at 5:14 PM, Avi Kivity 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; "" 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]~~~ ~~~[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 >> >> --- 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 #include #include +#include #include #include #include @@ -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