From owner-freebsd-arm@FreeBSD.ORG Fri Apr 12 07:09:27 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4ACF141E for ; Fri, 12 Apr 2013 07:09:27 +0000 (UTC) (envelope-from alie@affle.com) Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com [IPv6:2607:f8b0:400d:c01::230]) by mx1.freebsd.org (Postfix) with ESMTP id 0E5951364 for ; Fri, 12 Apr 2013 07:09:26 +0000 (UTC) Received: by mail-qc0-f176.google.com with SMTP id n41so1058878qco.7 for ; Fri, 12 Apr 2013 00:09:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=qz/bnnH7/vd0V05fFRkHf3N66rfKjGs5WdbWpDntQBw=; b=GcJ4+rmmBIVVlB+6HGaYb4vlcyaK4sxN5bI7+iAShRpxogLDanWnhwVnrC/sMmslg2 HY1pXWJWflsQxwKrS8m406ztVflfbAcwn9TwnqtgQd/wh+nvAlerkwVMrdk2/7nT6PfY 9eJh4rIMnl0IfbNltU3IKaRk8ClGMURCE69KPSTIrcjlp8NQqFFL9DeME5b5LTXiWi7V 2Ob50cNYh32esHrbJTx+kp6ojrych1l7V1MYw4VuM9GSBtUvrjp0FXxvaF9WajQCsTCN 2Qf1O6suOXIYycuRWp7xevN9wd+xfzD+urFkxi/V1y8JOdN51GoXKgaZokh+GfWuVaES momA== MIME-Version: 1.0 X-Received: by 10.224.25.145 with SMTP id z17mr10573517qab.15.1365750566368; Fri, 12 Apr 2013 00:09:26 -0700 (PDT) Received: by 10.49.82.75 with HTTP; Fri, 12 Apr 2013 00:09:26 -0700 (PDT) In-Reply-To: References: <51438529.4080604@bluezbox.com> <4FD89AF1-AF9D-4950-8AA4-9CC95FE66D46@kientzle.com> <456661659-1363845801-cardhu_decombobulator_blackberry.rim.net-733146442-@b26.c6.bise3.blackberry> Date: Fri, 12 Apr 2013 15:09:26 +0800 Message-ID: Subject: Re: Unable to compile VCHIQ From: Alie Tan To: Tim Kientzle X-Gm-Message-State: ALoCoQmD9DGOO61XPC8JPTxvD4Lb+oDWqpSguzajkLOBEpTmf0UdNWNW+FcCLdPaIsentqtZQ3Nm Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 07:09:27 -0000 On Mon, Mar 25, 2013 at 6:19 AM, Tim Kientzle wrote: > > From: Tim Kientzle > > Sender: owner-freebsd-arm@freebsd.orgDate: Wed, 20 Mar 2013 23:01:26 > > To: Oleksandr Tymoshenko > > Cc: > > Subject: Re: Unable to compile VCHIQ > > > > > > On Mar 15, 2013, at 1:31 PM, Oleksandr Tymoshenko wrote: > > > >>> cc -O3 -pipe -DVCOS_VERIFY_BKPTS=1 -DUSE_VCHIQ_ARM > >>> -D__VCCOREVER__=0x04000000 -O3 -fno-strict-aliasing -funroll-loops > -pipe > >>> -ftree-vectorize -D_KERNEL -DKLD_MODULE -nostdinc > >>> -I/usr/src/vc/vchiq-freebsd/interface -I. -I@ -I@/contrib/altq > >>> -finline-limit=8000 --param inline-unit-growth=100 --param > >>> large-function-growth=1000 -fno-common -ffreestanding > -std=iso9899:1999 > >>> -c /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_2835_arm.c > >>> In file included from > >>> /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_2835_arm.c:65: > >>> @/vm/vm_pager.h: In function 'vm_pager_get_pages': > >>> @/vm/vm_pager.h:127: warning: implicit declaration of function > 'rw_assert' > >>> @/vm/vm_pager.h:127: error: 'RA_WLOCKED' undeclared (first use in this > >>> function) > >>> @/vm/vm_pager.h:127: error: (Each undeclared identifier is reported > only > >>> once > >>> @/vm/vm_pager.h:127: error: for each function it appears in.) > >>> @/vm/vm_pager.h: In function 'vm_pager_put_pages': > >>> @/vm/vm_pager.h:144: error: 'RA_WLOCKED' undeclared (first use in this > >>> function) > >>> @/vm/vm_pager.h: In function 'vm_pager_has_page': > >>> @/vm/vm_pager.h:168: error: 'RA_WLOCKED' undeclared (first use in this > >>> function) > >>> @/vm/vm_pager.h: In function 'vm_pager_page_unswapped': > >>> @/vm/vm_pager.h:191: error: 'RA_WLOCKED' undeclared (first use in this > >>> function) > >>> *** [vchiq_2835_arm.o] Error code 1 > >>> > >>> Stop in /usr/src/vc/vchiq-freebsd. > >>> > >>> > >>> Anyone got idea how to solve the issue? > >>> > >> > >> It seems you're trying to build vchiq against your host sources which > is wrong. You need > >> to use cross-compilation environment for this. > > > > I'm seeing this now, too, and I've checked carefully: I'm > > definitely building inside the "buildworld" cross environment. > > > > It looks like RA_WLOCKED is only defined if INVARIANTS is > > active (sys/sys/rwlock.h). > > The attached patch to vchiq fixes it for me. > > Cheers, > > Tim > > > i am getting different error now: In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.c:34: In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.h:44: ./interface/compat/vchi_bsd.h:97:33: error: passing 'atomic_t *' (aka 'volatile int *') to parameter of type 'volatile uint32_t *' (aka 'volatile unsigned int *') converts between pointers to integer types with different sign [-Werror,-Wpointer-sign] return i + atomic_fetchadd_int(v, i); ^ ./machine/atomic.h:333:39: note: passing argument to parameter 'p' here atomic_fetchadd_32(volatile uint32_t *p, uint32_t val) ^ In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.c:34: In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.h:44: ./interface/compat/vchi_bsd.h:103:29: error: passing 'atomic_t *' (aka 'volatile int *') to parameter of type 'volatile uint32_t *' (aka 'volatile unsigned int *') converts between pointers to integer types with different sign [-Werror,-Wpointer-sign] return atomic_fetchadd_int(v, -i) - i; ^ ./machine/atomic.h:333:39: note: passing argument to parameter 'p' here atomic_fetchadd_32(volatile uint32_t *p, uint32_t val) ^ In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.c:34: In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.h:44: ./interface/compat/vchi_bsd.h:109:28: error: passing 'atomic_t *' (aka 'volatile int *') to parameter of type 'volatile u_int32_t *' (aka 'volatile unsigned int *') converts between pointers to integer types with different sign [-Werror,-Wpointer-sign] if (atomic_cmpset_rel_int(v, oldv, newv)) ^ ./machine/atomic.h:248:42: note: passing argument to parameter 'p' here atomic_cmpset_rel_32(volatile u_int32_t *p, volatile u_int32_t cmpval, volatile u_int32_t newval) ^ In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.c:34: In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.h:44: ./interface/compat/vchi_bsd.h:120:34: error: passing 'atomic_t *' (aka 'volatile int *') to parameter of type 'volatile u_int32_t *' (aka 'volatile unsigned int *') converts between pointers to integer types with different sign [-Werror,-Wpointer-sign] return atomic_readandclear_int(v); ^ ./machine/atomic.h:348:44: note: passing argument to parameter 'p' here atomic_readandclear_32(volatile u_int32_t *p) ^ In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.c:34: In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.h:44: ./interface/compat/vchi_bsd.h:123:31: error: passing 'atomic_t *' (aka 'volatile int *') to parameter of type 'volatile uint32_t *' (aka 'volatile unsigned int *') converts between pointers to integer types with different sign [-Werror,-Wpointer-sign] oldv = atomic_load_acq_int(v); ^ ./machine/atomic.h:363:39: note: passing argument to parameter 'p' here atomic_load_acq_32(volatile uint32_t *p) ^ In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.c:34: In file included from /usr/src/vc/vchiq-freebsd/interface/vchiq_arm/vchiq_core.h:44: ./interface/compat/vchi_bsd.h:124:35: error: passing 'atomic_t *' (aka 'volatile int *') to parameter of type 'volatile u_int32_t *' (aka 'volatile unsigned int *') converts between pointers to integer types with different sign [-Werror,-Wpointer-sign] } while (!atomic_cmpset_rel_int(v, oldv, newv)); ^ ./machine/atomic.h:248:42: note: passing argument to parameter 'p' here atomic_cmpset_rel_32(volatile u_int32_t *p, volatile u_int32_t cmpval, volatile u_int32_t newval) ^ 6 errors generated. *** [vchiq_core.o] Error code 1 Stop in /usr/src/vc/vchiq-freebsd. Regards, Alie T