Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Feb 2023 09:45:34 -0800
From:      Kevin Oberman <rkoberman@gmail.com>
To:        "freebsd-emulation@freebsd.org" <emulation@freebsd.org>
Subject:   virtualbon-ose-kmod build fails with 14-CURRENT and llvm15
Message-ID:  <CAN6yY1td9cRtj3BzMw-eAHS4HCAv049w3rjOpmjq-fCpmfp2Pw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--000000000000e78d3b05f59deebb
Content-Type: text/plain; charset="UTF-8"

I updated my system yesterday. I then tried to rebuild virtualbox-ose-kmod.
This fails under llvm15. The same source code built successfully with
llvm14, so I assume that the code has a problem with 15. I suspect that 15
changed some default and declared this as an error, but may be "fixed" with
the proper build option.

Here is the command and error that I see:

cc  -O2 -pipe -fno-strict-aliasing -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0
-DIN_SUP_R0 -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX -DRT_WITH_VBOX -w
-DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_AMD64  -Werror
-D_KERNEL -DKLD_MODULE -nostdinc  -Iinclude -I. -Ir0drv -include
/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-6.1.36/out/freebsd.amd64/release/bin/src/vboxdrv/opt_global.h
-I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common
 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
-fdebug-prefix-map=./x86=/usr/src/sys/x86/include
-fdebug-prefix-map=./i386=/usr/src/sys/i386/include     -MD
 -MF.depend.SUPDrv-freebsd.o -MTSUPDrv-freebsd.o -mcmodel=kernel
-mno-red-zone -mno-mmx -mno-sse -msoft-float
 -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector
-Wall -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign
-D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error=tautological-compare -Wno-error=empty-body
-Wno-error=parentheses-equality -Wno-error=unused-function
-Wno-error=pointer-sign -Wno-error=shift-negative-value
-Wno-address-of-packed-member -Wno-error=array-parameter
-Wno-error=deprecated-non-prototype -Wno-error=strict-prototypes
-Wno-error=unused-but-set-variable -Wno-format-zero-length   -mno-aes
-mno-avx  -std=iso9899:1999 -c
/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-6.1.36/out/freebsd.amd64/release/bin/src/vboxdrv/freebsd/SUPDrv-freebsd.c
-o SUPDrv-freebsd.o
/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-6.1.36/out/freebsd.amd64/release/bin/src/vboxdrv/freebsd/SUPDrv-freebsd.c:433:50:
error: incompatible pointer to integer conversion passing 'void *' to
parameter of type 'RTR3PTR' (aka 'unsigned long') [-Wint-conversion]
        if (RT_FAILURE(RTR0MemUserCopyFrom(&Hdr, pvUser, sizeof(Hdr))))
                                                 ^~~~~~
include/iprt/errcore.h:99:58: note: expanded from macro 'RT_FAILURE'

Any help appreciated. I really need virtualbox. I think I may force it to
build with llvm14, but I's prefer a fix to build with llvm15.

-- 
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

--000000000000e78d3b05f59deebb
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:tahoma,s=
ans-serif;font-size:small">I updated my system yesterday. I then tried to r=
ebuild virtualbox-ose-kmod. This fails under llvm15. The same source code b=
uilt successfully with llvm14, so I assume that the code has a problem with=
 15. I suspect that 15 changed some default and declared this as an error, =
but may be &quot;fixed&quot; with the proper build option.</div><div class=
=3D"gmail_default" style=3D"font-family:tahoma,sans-serif;font-size:small">=
<br></div><div class=3D"gmail_default" style=3D"font-family:tahoma,sans-ser=
if;font-size:small">Here is the command and error that I see:<br></div><div=
 class=3D"gmail_default" style=3D"font-family:tahoma,sans-serif;font-size:s=
mall"><br></div><div class=3D"gmail_default" style=3D"font-family:tahoma,sa=
ns-serif;font-size:small">cc =C2=A0-O2 -pipe -fno-strict-aliasing -DRT_OS_F=
REEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DSUPDRV_WITH_RELEASE_LOGGER -DVBO=
X -DRT_WITH_VBOX -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DRT_A=
RCH_AMD64 =C2=A0-Werror -D_KERNEL -DKLD_MODULE -nostdinc =C2=A0-Iinclude -I=
. -Ir0drv -include /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox=
-6.1.36/out/freebsd.amd64/release/bin/src/vboxdrv/opt_global.h -I. -I/usr/s=
rc/sys -I/usr/src/sys/contrib/ck/include -fno-common =C2=A0-fno-omit-frame-=
pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=3D./machine=3D/usr/=
src/sys/amd64/include -fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include=
 -fdebug-prefix-map=3D./i386=3D/usr/src/sys/i386/include =C2=A0 =C2=A0 -MD =
=C2=A0-MF.depend.SUPDrv-freebsd.o -MTSUPDrv-freebsd.o -mcmodel=3Dkernel -mn=
o-red-zone -mno-mmx -mno-sse -msoft-float =C2=A0-fno-asynchronous-unwind-ta=
bles -ffreestanding -fwrapv -fstack-protector -Wall -Wnested-externs -Wstri=
ct-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno=
-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs -fd=
iagnostics-show-option -Wno-unknown-pragmas -Wno-error=3Dtautological-compa=
re -Wno-error=3Dempty-body -Wno-error=3Dparentheses-equality -Wno-error=3Du=
nused-function -Wno-error=3Dpointer-sign -Wno-error=3Dshift-negative-value =
-Wno-address-of-packed-member -Wno-error=3Darray-parameter -Wno-error=3Ddep=
recated-non-prototype -Wno-error=3Dstrict-prototypes -Wno-error=3Dunused-bu=
t-set-variable -Wno-format-zero-length =C2=A0 -mno-aes -mno-avx =C2=A0-std=
=3Diso9899:1999 -c /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox=
-6.1.36/out/freebsd.amd64/release/bin/src/vboxdrv/freebsd/SUPDrv-freebsd.c =
-o SUPDrv-freebsd.o<br>/usr/ports/emulators/virtualbox-ose-kmod/work/Virtua=
lBox-6.1.36/out/freebsd.amd64/release/bin/src/vboxdrv/freebsd/SUPDrv-freebs=
d.c:433:50: error: incompatible pointer to integer conversion passing &#39;=
void *&#39; to parameter of type &#39;RTR3PTR&#39; (aka &#39;unsigned long&=
#39;) [-Wint-conversion]<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (RT_FAILURE(RTR0=
MemUserCopyFrom(&amp;Hdr, pvUser, sizeof(Hdr))))<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0^~~~~~<br>include/iprt/errcore.h:99:58: note: expanded from macro &#3=
9;RT_FAILURE&#39;<br></div><div><br></div><div><div style=3D"font-family:ta=
homa,sans-serif;font-size:small" class=3D"gmail_default">Any help appreciat=
ed. I really need virtualbox. I think I may force it to build with llvm14, =
but I&#39;s prefer a fix to build with llvm15.<br></div><br></div>-- <br><d=
iv dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature"=
><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=
=3D"ltr">Kevin Oberman, Part time kid herder and retired Network Engineer<b=
r>E-mail: <a href=3D"mailto:rkoberman@gmail.com" target=3D"_blank">rkoberma=
n@gmail.com</a><br></div><div>PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB=
39EF1B055683</div></div></div></div></div></div></div></div></div>

--000000000000e78d3b05f59deebb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1td9cRtj3BzMw-eAHS4HCAv049w3rjOpmjq-fCpmfp2Pw>