Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 2013 12:30:10 +0100
From:      =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= <decke@FreeBSD.org>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        "freebsd-emulation@freebsd.org" <freebsd-emulation@freebsd.org>
Subject:   Re: [Call for Testers] VirtualBox 4.3.0: cannot reference symbol `X86TSS64_size' in preprocessor
Message-ID:  <CAE-m3X2txev4--1fM9OYUykogb%2BMzwXoNQ9fD0-nHX8V3A-EJQ@mail.gmail.com>
In-Reply-To: <20131114095030.GA26987@sh4-5.1blu.de>
References:  <20131113122618.GA30563@sh4-5.1blu.de> <CAE-m3X3n473dtXnrHTP6yMnKc1T=q93AnE=5oDhW7m=b_o_tRg@mail.gmail.com> <20131114095030.GA26987@sh4-5.1blu.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 14, 2013 at 10:50 AM, Matthias Apitz <guru@unixarea.de> wrote:
> El d=EDa Wednesday, November 13, 2013 a las 04:40:17PM +0100, Bernhard Fr=
?hlich escribi=F3:
>
>> > @/usr/local/bin/kmk_redirect -wo
>> > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/out/freebsd.=
x86/release/obj/VBoxVMM/VMMR3/PATMA.o.dep
>> > -- yasm -f elf32 -DASM_FORMAT_ELF -D__YASM__ -Worphan-labels  -g dwarf=
2
>> > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/src/VBox/V=
MM/
>> > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/src/VBox/V=
MM/include/
>> > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/src/VBox/V=
MM/PATM/
>> > -I/usr/include/ -I/usr/X11R6/include/ -I/usr/local/include/
>> > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/out/freebs=
d.x86/release/obj/VBoxVMM/dtrace/
>> > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/include/
>> > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/out/freebs=
d.x86/release/
>> > -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_DEBUGGER
>> > -DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_X86 -D__X86__ -DIN_RING3
>> > -DHC_ARCH_BITS=3D32 -DGC_ARCH_BITS=3D64 -DIN_VMM_R3 -DIN_DIS -DIN_GMM_=
R3
>> > -DIN_DBG -DVBOX_IN_VMM -DVBOX_WITH_FIRST_IEM_STEP -DVBOX_WITH_REM
>> > -DVBOX_WITH_MULTI_CORE -DVBOX_WITH_PCI_PASSTHROUGH -DVBOX_WITH_SAFE_ST=
R
>> > -DVBOX_WITH_RAW_RING1 -DVBOX_WITH_USB -DVBOX_WITH_PDM_ASYNC_COMPLETION
>> > -DVBOX_WITH_NETSHAPER -DVBOX_WITH_RAW_MODE -DVBOX_WITH_RAW_MODE_NOT_R0
>> > -o
>> > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/out/freebsd.=
x86/release/obj/VBoxVMM/VMMR3/PATMA.o
>> > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/src/VBox/VMM=
/VMMR3/PATMA.asm
>> > -M
>> > ...
>
>> We are currently investigating what is failing there and the vbox develo=
pers
>> suggested to execute the "failed command" manually and add the option -e
>> to the command line switches and post the resulting output. This would
>> show the preprocessor file which is passed to yasm and would help to
>> narrow it down.
>
> I have created a small shell script with the failing command, which does
> not give much more information:
>
> # sh kmk.sh
> + /usr/local/bin/kmk_redirect -wo
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/out/freebsd.x86=
/release/obj/VBoxVMM/VMMR3/PATMA.o.dep
> -- yasm -f elf32 -DASM_FORMAT_ELF -D__YASM__ -Worphan-labels -g dwarf2
> -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/src/VBox/VMM/
> -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/src/VBox/VMM/=
include/
> -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/src/VBox/VMM/=
PATM/
> -I/usr/include/ -I/usr/X11R6/include/ -I/usr/local/include/
> -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/out/freebsd.x=
86/release/obj/VBoxVMM/dtrace/
> -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/include/
> -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/out/freebsd.x=
86/release/
> -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_DEBUGGER
> -DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_X86 -D__X86__ -DIN_RING3
> -DHC_ARCH_BITS=3D32 -DGC_ARCH_BITS=3D64 -DIN_VMM_R3 -DIN_DIS -DIN_GMM_R3
> -DIN_DBG -DVBOX_IN_VMM -DVBOX_WITH_FIRST_IEM_STEP -DVBOX_WITH_REM
> -DVBOX_WITH_MULTI_CORE -DVBOX_WITH_PCI_PASSTHROUGH -DVBOX_WITH_SAFE_STR
> -DVBOX_WITH_RAW_RING1 -DVBOX_WITH_USB -DVBOX_WITH_PDM_ASYNC_COMPLETION
> -DVBOX_WITH_NETSHAPER -DVBOX_WITH_RAW_MODE -DVBOX_WITH_RAW_MODE_NOT_R0
> -o
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/out/freebsd.x86=
/release/obj/VBoxVMM/VMMR3/PATMA.o
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/src/VBox/VMM/VM=
MR3/PATMA.asm
> -M -e
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/include/iprt/x8=
6extra.mac:143:
> error: (AssertCompileSizeML:2) cannot reference symbol `X86TSS16_size'
> in preprocessor
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/include/iprt/x8=
6extra.mac:143:
> warning: (AssertCompileSizeML:5) X86TSS16 is 1 bytes instead of 44
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/include/iprt/x8=
6extra.mac:206:
> error: (AssertCompileSizeML:2) cannot reference symbol `X86TSS64_size'
> in preprocessor
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/include/iprt/x8=
6extra.mac:206:
> warning: (AssertCompileSizeML:5) X86TSS64 is 1 bytes instead of 136
>
> The problems are raised by these lines in the file:
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.0/include/iprt/x8=
6extra.mac
>
> struc X86TSS16
>         .selPrev        resw 1
>         .sp0            resw 1
>         .ss0            resw 1
>         .sp1            resw 1
>         .ss1            resw 1
>         .sp2            resw 1
>         .ss2            resw 1
>         .ip             resw 1
>         .flags          resw 1
>         .ax             resw 1
>         .cx             resw 1
>         .dx             resw 1
>         .bx             resw 1
>         .sp             resw 1
>         .bp             resw 1
>         .si             resw 1
>         .di             resw 1
>         .es             resw 1
>         .cs             resw 1
>         .ss             resw 1
>         .ds             resw 1
>         .selLdt         resw 1
> endstruc
> AssertCompileSize(X86TSS16, 44)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  line 143
>
> and again in line 206:
>
> struc X86TSS64
>         .u32Reserved    resd 1
>         .rsp0           resq 1
>         .rsp1           resq 1
>         .rsp2           resq 1
>         .u32Reserved2   resd 2
>         .ist1           resq 1
>         .ist2           resq 1
>         .ist3           resq 1
>         .ist4           resq 1
>         .ist5           resq 1
>         .ist6           resq 1
>         .ist7           resq 1
>         .u16Reserved    resw 5
>         .offIoBitmap    resw 1
>         .IntRedirBitmap resb 32
> endstruc
> AssertCompileSize(X86TSS64, 136)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  line 206
>
> It looks like the compiler should compare the size of the defined
> storage with some defines about X86TSS16 and X86TSS64 and does not know
> them...
>
> No clue how to fix this :-(

Hm this output does not include the information that we were looking for. I=
t was
expected to see the yasm output of the asm file because we want to rule out
that it is an yasm bug.

If you look further into the definition of AssertCompileSize you will
see it does
a check on the size of the struct that fails because it thinks the size is =
1 but
it should be 136 as defined in the second parameter.

--=20
Bernhard Froehlich
http://www.bluelife.at/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-m3X2txev4--1fM9OYUykogb%2BMzwXoNQ9fD0-nHX8V3A-EJQ>