Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Mar 2013 15:19:55 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        Alie Tan <alie@affle.com>, Oleksandr Tymoshenko <gonzo@bluezbox.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Unable to compile VCHIQ
Message-ID:  <C2DF8350-459B-4B30-9F41-2DE1EF855170@kientzle.com>
In-Reply-To: <456661659-1363845801-cardhu_decombobulator_blackberry.rim.net-733146442-@b26.c6.bise3.blackberry>
References:  <CANuCnH9p%2BaY89wy%2BT6BDdo--URGXP5BZK8KBp6-UQRfdHLgUyg@mail.gmail.com> <51438529.4080604@bluezbox.com> <4FD89AF1-AF9D-4950-8AA4-9CC95FE66D46@kientzle.com> <456661659-1363845801-cardhu_decombobulator_blackberry.rim.net-733146442-@b26.c6.bise3.blackberry>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_ED4F4660-6A1C-459A-9875-188D9B1F18F7
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

> From: Tim Kientzle <tim@kientzle.com>
> Sender: owner-freebsd-arm@freebsd.orgDate: Wed, 20 Mar 2013 23:01:26=20=

> To: Oleksandr Tymoshenko<gonzo@bluezbox.com>
> Cc: <freebsd-arm@freebsd.org>
> Subject: Re: Unable to compile VCHIQ
>=20
>=20
> On Mar 15, 2013, at 1:31 PM, Oleksandr Tymoshenko wrote:
>=20
>>> cc -O3 -pipe -DVCOS_VERIFY_BKPTS=3D1 -DUSE_VCHIQ_ARM
>>> -D__VCCOREVER__=3D0x04000000 -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=3D8000 --param inline-unit-growth=3D100 --param
>>> large-function-growth=3D1000 -fno-common   -ffreestanding =
-std=3Diso9899: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
>>>=20
>>> Stop in /usr/src/vc/vchiq-freebsd.
>>>=20
>>>=20
>>> Anyone got idea how to solve the issue?
>>>=20
>>=20
>> It seems you're trying to build vchiq against your host sources which =
is wrong. You need
>> to use cross-compilation environment for this.
>=20
> I'm seeing this now, too, and I've checked carefully:  I'm
> definitely building inside the "buildworld" cross environment.
>=20
> 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



--Apple-Mail=_ED4F4660-6A1C-459A-9875-188D9B1F18F7
Content-Disposition: attachment;
	filename=vchiq.patch
Content-Type: application/octet-stream;
	name="vchiq.patch"
Content-Transfer-Encoding: 7bit

diff --git a/interface/compat/vchi_bsd.h b/interface/compat/vchi_bsd.h
index 9568af4..b3c249a 100644
--- a/interface/compat/vchi_bsd.h
+++ b/interface/compat/vchi_bsd.h
@@ -32,6 +32,7 @@
 #include <sys/bus.h>
 #include <sys/conf.h>
 #include <sys/lock.h>
+#include <sys/rwlock.h>
 #include <sys/kernel.h>
 #include <sys/kthread.h>
 #include <sys/mutex.h>

--Apple-Mail=_ED4F4660-6A1C-459A-9875-188D9B1F18F7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C2DF8350-459B-4B30-9F41-2DE1EF855170>