Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2012 23:10:30 +0000
From:      Mike Clarke <jmc-freebsd2@milibyte.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2
Message-ID:  <201203212310.31281.jmc-freebsd2@milibyte.co.uk>
In-Reply-To: <44pqc564oo.fsf@lowell-desk.lan>
References:  <201203131413.41392.jmc-freebsd2@milibyte.co.uk> <201203202256.12788.jmc-freebsd2@milibyte.co.uk> <44pqc564oo.fsf@lowell-desk.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 21 March 2012, Lowell Gilbert wrote:

> > /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-
> >4.1.10/out/freebsd.x86/ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0
> > release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:405:
> > error: invalid type argument of '->'
> > *** Error code 1

> That line is supposed to be an assignment in between a VM_OBJECT_LOCK
> and the corresponding VM_OBJECT_UNLOCK. Can you confirm that the
> patches cause this to be the case?

Yes, that's where it is.

    401         if (fContiguous)
    402         {
    403             Assert(enmType =3D=3D RTR0MEMOBJTYPE_PHYS);
    404             VM_OBJECT_LOCK(pMemFreeBSD->pObject);
    405             pMemFreeBSD->Core.u.Phys.PhysBase =3D=20
VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0));
    406             VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
    407             pMemFreeBSD->Core.u.Phys.fAllocated =3D true;
    408         }

> It is a little tricky for me to=20
> edit files in an i386 environment, but the next step is to track down
> the definition of PRTR0MEMOBJFREEBSD, assuming that is the
> dereference giving the error on your system, and determining whether
> it ought to have the structure entry being dereferenced.

This takes me out of my depth in my very limited experience of C but would =
it be=20
this, also in memobj-r0drv-freebsd.c:

     50 /**
     51  * The FreeBSD version of the memory object structure.
     52  */
     53 typedef struct RTR0MEMOBJFREEBSD
     54 {
     55     /** The core structure. */
     56     RTR0MEMOBJINTERNAL  Core;
     57     /** Type dependent data */
     58     /** The VM object associated with the allocation. */
     59     vm_object_t         pObject;
     60 } RTR0MEMOBJFREEBSD, *PRTR0MEMOBJFREEBSD;

and then:

    109     PRTR0MEMOBJFREEBSD pMemFreeBSD =3D (PRTR0MEMOBJFREEBSD)pMem;

[snip]

> You might want to try updating your system or trying the -legacy
> version of the port.

Version 4.1.8_1 seems to be working OK for me so I'll probably stick with t=
hat for=20
the time being unless a fix turns up before I upgrade to 9.0-RELEASE which =
I'm=20
planning to do shortly.

=2D-=20
Mike Clarke



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203212310.31281.jmc-freebsd2>