Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

Mike Clarke-17
portmaster -a fails with:

cc -O -pipe -march=athlon-mp -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_X86 -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -Iinclude -I. -Ir0drv -I. -I@ -I@/contrib/altq -finline-limit=8000 --param
inline-unit-growth=100 --param
large-function-growth=1000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c
/data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:
In function 'rtR0MemObjFreeBSDAllocPhysPages':
/data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:405:
error: invalid type argument of '->'
*** Error code 1

Stop
in /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv.

I ran portsnap immediately before portmaster so my ports are up to date.

Any suggestions?

--
Mike Clarke
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

Lowell Gilbert
Mike Clarke <[hidden email]> writes:

> portmaster -a fails with:
>
> cc -O -pipe -march=athlon-mp -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_X86 -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -Iinclude -I. -Ir0drv -I. -I@ -I@/contrib/altq -finline-limit=8000 --param
> inline-unit-growth=100 --param
> large-function-growth=1000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c
> /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:
> In function 'rtR0MemObjFreeBSDAllocPhysPages':
> /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:405:
> error: invalid type argument of '->'
> *** Error code 1
>
> Stop
> in /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv.
>
> I ran portsnap immediately before portmaster so my ports are up to date.
>
> Any suggestions?

There have been more updates to the port since, and I don't see any
failures in the automated builds. I've got a build on my fast system
(RELENG_8, amd64) running now for a check, but it will take a while to
grab the distfiles. You might want to grab the latest port and try it.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

Lowell Gilbert
Lowell Gilbert <[hidden email]> writes:

> Mike Clarke <[hidden email]> writes:
>
>> portmaster -a fails with:
>>
>> cc -O -pipe -march=athlon-mp -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_X86 -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -Iinclude -I. -Ir0drv -I. -I@ -I@/contrib/altq -finline-limit=8000 --param
>> inline-unit-growth=100 --param
>> large-function-growth=1000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c
>> /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:
>> In function 'rtR0MemObjFreeBSDAllocPhysPages':
>> /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:405:
>> error: invalid type argument of '->'
>> *** Error code 1
>>
>> Stop
>> in /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv.
>>
>> I ran portsnap immediately before portmaster so my ports are up to date.
>>
>> Any suggestions?
>
> There have been more updates to the port since, and I don't see any
> failures in the automated builds. I've got a build on my fast system
> (RELENG_8, amd64) running now for a check, but it will take a while to
> grab the distfiles. You might want to grab the latest port and try it.

And it builds fine for me.

My best advice is: clean out the directory for that port, update again,
and see if the problem is the same.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

Adam Vande More
In reply to this post by Mike Clarke-17
On Tue, Mar 13, 2012 at 9:13 AM, Mike Clarke <[hidden email]>wrote:

>
> in
> /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv.
>
> I ran portsnap immediately before portmaster so my ports are up to date.
>
> Any suggestions?
>

Did you follow the relevant /usr/src/UPDATING instructions?

--
Adam Vande More
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

Mike Clarke-17
In reply to this post by Lowell Gilbert
On Friday 16 March 2012, Lowell Gilbert wrote:

> My best advice is: clean out the directory for that port, update
> again, and see if the problem is the same.

I've now deleted everything in /usr/ports/emulators/virtualbox-ose-kmod and downloaded a fresh copy of the
port (4.1.10) from the FreeBSD website but still get the same problem when compiling.

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

I've also updated the source files for the base system and built a new kernel in case it's a header problem
since I noticed that /usr/src/include/unistd.h and /usr/src/lib/libc/include/libc_private.h were both updated
in security advisory SA-11:07 (for which I only did a binary update at the time) but this didn't cure the
problem.

I've had no problem building earlier versions but it went pear shaped with 4.1.8_2

As an experiment I've used portdowngrade to try compiling a few older versions

number         date         portversion  comment
    1  2012/03/15 09:32:29  VirtualBox-${DISTVERSION}  - Update to 4.1.10
    2  2012/03/09 21:46:18  VirtualBox-${DISTVERSION}_2  - Reenabled fixed memobj r0 patch
    3  2012/02/22 22:09:41  VirtualBox-${DISTVERSION}_1  - Revert memobj r0 patch until the problems on i386
are solved
    4  2012/02/21 14:31:54  VirtualBox-${DISTVERSION}  - Update to 4.1.8

Of these, the only one to compile OK was 4.1.8_1 so it looks like the fixed memobj r0 patch still has problems
on my system.

FreeBSD curlew.lan 8.1-RELEASE-p8 FreeBSD 8.1-RELEASE-p8 #0: Tue Mar 20 19:00:39 GMT 2012    
[hidden email]:/usr/obj/usr/src/sys/GENERIC  i386

--
Mike Clarke
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

Mike Clarke-17
In reply to this post by Adam Vande More
On Friday 16 March 2012, Adam Vande More wrote:

> On Tue, Mar 13, 2012 at 9:13 AM, Mike Clarke
<[hidden email]>wrote:

> > in
> > /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-
> >4.1.8_OSE/out/freebsd.x86/release/bin/src/vboxdrv.
> >
> > I ran portsnap immediately before portmaster so my ports are up to
> > date.
> >
> > Any suggestions?
>
> Did you follow the relevant /usr/src/UPDATING instructions?

The latest relevant one appears to be this:

20120221:
  AFFECTS: users of emulators/virtualbox-ose
  AUTHOR: [hidden email]

  virtualbox-ose has been updated to 4.1.8 and requires the latest
  devel/kBuild-devel now. It is only a build dependency so it is safe
  to remove it before updating.

  # pkg_delete -f kBuild-\*

I did this some time ago and the earlier version, 4.1.8_1, compiled fine
but I started to have problems with 4.1.8_2

--
Mike Clarke
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

Lowell Gilbert
In reply to this post by Mike Clarke-17
Mike Clarke <[hidden email]> writes:

> On Friday 16 March 2012, Lowell Gilbert wrote:
>
>> My best advice is: clean out the directory for that port, update
>> again, and see if the problem is the same.
>
> I've now deleted everything in /usr/ports/emulators/virtualbox-ose-kmod and downloaded a fresh copy of the
> port (4.1.10) from the FreeBSD website but still get the same problem when compiling.
>
> /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.10/out/freebsd.x86/                                                                                        
> 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? It is a little tricky for me to 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.

> I've also updated the source files for the base system and built a new kernel in case it's a header problem
> since I noticed that /usr/src/include/unistd.h and /usr/src/lib/libc/include/libc_private.h were both updated
> in security advisory SA-11:07 (for which I only did a binary update at the time) but this didn't cure the
> problem.
>
> I've had no problem building earlier versions but it went pear shaped with 4.1.8_2
>
> As an experiment I've used portdowngrade to try compiling a few older versions
>
> number         date         portversion  comment
>     1  2012/03/15 09:32:29  VirtualBox-${DISTVERSION}  - Update to 4.1.10
>     2  2012/03/09 21:46:18  VirtualBox-${DISTVERSION}_2  - Reenabled fixed memobj r0 patch
>     3  2012/02/22 22:09:41  VirtualBox-${DISTVERSION}_1  - Revert memobj r0 patch until the problems on i386
> are solved
>     4  2012/02/21 14:31:54  VirtualBox-${DISTVERSION}  - Update to 4.1.8
>
> Of these, the only one to compile OK was 4.1.8_1 so it looks like the fixed memobj r0 patch still has problems
> on my system.
>
> FreeBSD curlew.lan 8.1-RELEASE-p8 FreeBSD 8.1-RELEASE-p8 #0: Tue Mar 20 19:00:39 GMT 2012    
> [hidden email]:/usr/obj/usr/src/sys/GENERIC  i386

I can't reproduce the problem. My i386 system is a little weird, so that
may not say much.

Also, my system code trees are updated more recently than yours, which
may well matter for a kernel module, such as this port builds. You might
want to try updating your system or trying the -legacy version of the port.

Be well.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

Mike Clarke-17
On Wednesday 21 March 2012, Lowell Gilbert wrote:

> > /data1/tmp/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-
> >4.1.10/out/freebsd.x86/                                            
> >                                            
> > 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 == RTR0MEMOBJTYPE_PHYS);
    404             VM_OBJECT_LOCK(pMemFreeBSD->pObject);
    405             pMemFreeBSD->Core.u.Phys.PhysBase =
VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0));
    406             VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
    407             pMemFreeBSD->Core.u.Phys.fAllocated = true;
    408         }

> It is a little tricky for me to
> 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
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 = (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 that for
the time being unless a fix turns up before I upgrade to 9.0-RELEASE which I'm
planning to do shortly.

--
Mike Clarke
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

Lowell Gilbert
In reply to this post by Lowell Gilbert
Bernhard Froehlich <[hidden email]> writes:

> Pointyhat has triggered the same compile error so it is real. Probably
> avg has a clue how to fix it.

A (quick) look at pointyhat only shows me amd64 errors.

My main build server (on amd64, building for i386 and amd64) doesn't see
those problems, and neither does my i386 sandbox. This seems to be quite
conditional, and I don't see much guidance as to what the conditions
need to be. As good as Andriy has been on keeping up, I can't provide a
debug case to solve for this problem.

I'll try to come up with something more useful, but until/unless I can
reproduce the problem, I'm not sure how to make progress.

Be well.
.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Problem compiling emulators/virtualbox-ose-kmod 4.1.8_2

vttfreebsd
Hi,
I have the same error with virtualbox-ose-kmod 4.1.10 but only with FreeBSD 8.0 and 8.0-p2.
With FreeBSD 8.2, no problem.
Hope this help you for investigating this "bug" since I need it working on FreeBSD 8.0.
Regards