Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: VirtualBox-6.0.6 fails build under 8.99.39



So, again, rebuilding VirtualBox 6.0.8 additions under 8.99.42 I get:
..............
gcc -c -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused
-Wno-trigraphs -fdiagnostics-show-option -Wno-unused-parameter
-Wlogical-op -Wno-vari
adic-macros -Wpointer-arith -Winline -Wno-pointer-sign
-fdiagnostics-show-option -Wstrict-prototypes -Wmissing-prototypes
-Wstrict-prototypes -Wimplicit-f
unction-declaration -Werror-implicit-function-declaration -O2
-ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000
-fno-stack-protector -O2
 -mtune=generic -fno-omit-frame-pointer -nostdinc -std=c99
-msoft-float -include
/p/VirtualBox-6.0.8/include/VBox/VBoxGuestMangling.h -m64 --param
inline-
unit-growth=100 --param large-function-growth=1000
-fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mno-sse
-mno-mmx -mno-avx -fno-asynchronous-unwi
nd-tables -mno-fp-ret-in-387 -I/p/VirtualBox-6.0.8/src/VBox/Runtime
-I/p/VirtualBox-6.0.8/src/VBox/Runtime/include -I/usr/src/sys
-I/usr/src/common/includ
e -I/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include
-I/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/RuntimeGuestR0/dtrace
-I/p/VirtualB
ox-6.0.8/include -I/p/VirtualBox-6.0.8/out/netbsd.amd64/release -DVBOX
-DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_REM -DVBOX_WITH_RAW_MODE
-DRT_OS_NETBSD -DRT
_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_DEBUGGER -DIN_RING0 -DIN_RT_R0
-DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -D_KERNEL -D_MODULE -DIN_GUEST
-DIN_GUEST_R0 -DIN_R
T_R0 -DRT_WITH_VBOX -DRT_WITHOUT_NOCRT_WRAPPERS -DRT_NO_EXPORT_SYMBOL
-DNOFILEID -Wp,-MD,/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/RuntimeGuestR0/r
0drv/netbsd/assert-r0drv-netbsd.o.dep
-Wp,-MT,/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/RuntimeGuestR0/r0drv/netbsd/assert-r0drv-netbsd.o
-Wp,-MP -
o /p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/RuntimeGuestR0/r0drv/netbsd/assert-r0drv-netbsd.o
/p/VirtualBox-6.0.8/src/VBox/Runtime/r0drv/netbsd/ass
ert-r0drv-netbsd.c
In file included from
/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include/machine/cpufunc.h:3:0,
                 from
/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include/x86/lock.h:68,
                 from
/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include/machine/lock.h:3,
                 from /usr/src/sys/sys/lock.h:74,
                 from
/p/VirtualBox-6.0.8/src/VBox/Runtime/r0drv/netbsd/the-netbsd-kernel.h:77,
                 from
/p/VirtualBox-6.0.8/src/VBox/Runtime/r0drv/netbsd/alloc-r0drv-netbsd.c:58:
/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include/x86/cpufunc.h:
In function 'x86_pause':
In file included from
/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include/machine/cpufunc.h:3:0,
                 from
/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include/x86/lock.h:68,
                 from
/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include/machine/lock.h:3,
                 from /usr/src/sys/sys/lock.h:74,
                 from
/p/VirtualBox-6.0.8/src/VBox/Runtime/r0drv/netbsd/the-netbsd-kernel.h:77,
                 from
/p/VirtualBox-6.0.8/src/VBox/Runtime/r0drv/netbsd/RTLogWriteStdOut-r0drv-netbsd.c:31:
/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include/x86/cpufunc.h:
In function 'x86_pause':
/p/VirtualBox-6.0.8/out/netbsd.amd64/release/obj/netbsd/include/x86/cpufunc.h:53:2:
error: 'asm' undeclared (first use in this function)
  asm volatile ("pause");
  ^~~
...............

(I had to revert to the original cpufunc.h as the cvs update was failing).

What is the solution here - should I continue to locally modify
cpufunc.h from the NetBSD src/sys/arch/x86/include/ ? What is the
purpose of having 'asm volatile' if __asm__ does the job (and volatile
is a NOP anyway, according to the gcc manual, it is considered
volatile without the keyword)?

On Sun, 12 May 2019 at 20:57, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
>
> The reason for the compilation failure under -current is revision 1.27
> of cpufunc.h, which has a bunch of 'asm volatile' statements. The gcc
> online documentation states:
> ...
> 6.47.1 Basic Asm — Assembler Instructions Without Operands
> A basic asm statement has the following syntax:
>
> asm asm-qualifiers ( AssemblerInstructions )
> The asm keyword is a GNU extension. When writing code that can be
> compiled with -ansi and the various -std options, use __asm__ instead
> of asm (see Alternate Keywords).
>
> Qualifiers
> volatile
> The optional volatile qualifier has no effect. All basic asm blocks
> are implicitly volatile.
> ....
>
> So I replaced every 'asm volatile'   with '__asm__'. Now it compiles
> and runs fine.
>
> This probably is not right if one uses clang for OS building, but I am
> not there yet.
>
> On Fri, 10 May 2019 at 21:06, Kamil Rytarowski <n54%gmx.com@localhost> wrote:
> >
> > On 10.05.2019 21:04, Mayuresh wrote:
> > > On Sat, May 11, 2019 at 12:05:03AM +0530, Mayuresh wrote:
> > >> pxe_call.c:(.text.pxe_api_call+0x12): undefined reference to `__stack_chk_guard'
> > >
> > > PKGSRC_USE_SSP=no makes it go away, but that gives rise to following
> > > errors that weren't present when it was not set.
> > >
> > >
> > > In file included from
> > > /usr/pkgsrc/wip/virtualbox/work/VirtualBox-5.0.16/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp:67:0:
> > > /usr/pkgsrc/wip/virtualbox/work/VirtualBox-5.0.16/include/VBox/types.h:78:37:
> > > error: expected unqualified-id before numeric constant
> > >  typedef struct VM                  *PVM;
> > >                                      ^
> > > /usr/pkgsrc/wip/virtualbox/work/VirtualBox-5.0.16/include/VBox/types.h:78:37:
> > > error: expected initializer before numeric constant
> > > kmk: ***
> > > [/usr/pkgsrc/wip/virtualbox/work/VirtualBox-5.0.16/out/netbsd.amd64/release/obj/SUPR3HardenedStatic/SUPR3HardenedMain.o]
> > > Error 1
> > >
> > >
> > > Mayuresh
> > >
> >
> > If you want to install it on NetBSD as host, it won't work. The part is
> > not finished.
> >
>
>
> --
> ----



-- 
----


Home | Main Index | Thread Index | Old Index