Re: Missing .if in usr.sbin/Makefile.riscv
- In reply to: Milan Obuch : "Missing .if in usr.sbin/Makefile.riscv"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Jun 2025 17:59:13 UTC
> On 13 Jun 2025, at 08:58, Milan Obuch <freebsd-riscv@dino.sk> wrote:
>
> Hi,
>
> for a test (and some fun - okay, somewhat slow one), I did a make
> buildworld on my Star64 board. It worked well, albeit a bit slow (at
> the moment, I am running from micro SD card, not the quick media
> either).
>
> There was a fatal error, trying to build bhyve binary in presence of
> WITHOUT_BHYVE in my /etc/src.conf (I do not plan to test bhyve on
> Star64 for now, thus I decided to not build it). See:
>
> --- 8< ---------------------------------------------------------------
>
> ===> usr.sbin/bhyve (all)
> cc -target riscv64-unknown-freebsd15.0 --sysroot=/usr/obj/usr/src/riscv.riscv64/tmp -B/usr/obj/usr/src/riscv.riscv64/tmp/usr/bin -fpie -DPIC -O2 -pipe -fno-common -march=rv64imafdc -mabi=lp64d -I/usr/src/sys/contrib/libfdt -I/usr/src/usr.sbin/bhyve -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DOPENSSL_API_COMPAT=0x10100000L -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -mno-relax -MD -MF.depend.acpi.pieo -MTacpi.pieo -std=gnu17 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wchar-subscripts -Wnested-externs -Wold-style-definition -Wno-pointer-sign -Wdate-time -Wmissing-variable-declarations -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-parameter -Wno-
> error=cast-function-type-mismatch -Qunused-arguments -c /usr/src/usr.sbin/bhyve/acpi.c -o acpi.pieo
> /usr/src/usr.sbin/bhyve/acpi.c:54:10: fatal error: 'vmmapi.h' file not found
> 54 | #include <vmmapi.h>
> | ^~~~~~~~~~
> 1 error generated.
> *** Error code 1
>
> Stop.
> make[4]: stopped making "all" in /usr/src/usr.sbin/bhyve
> *** Error code 1
>
> Stop.
> make[3]: stopped making "all" in /usr/src/usr.sbin
> *** Error code 1
>
> Stop.
> make[2]: stopped making "all" in /usr/src
> 950.67 real 303.38 user 63.05 sys
> *** Error code 1
>
> Stop.
> make[1]: stopped making "buildworld" in /usr/src
> *** Error code 1
>
> Stop.
> make: stopped making "buildworld" in /usr/src
>
> --- 8< ---------------------------------------------------------------
>
> I realised usr.sbin/Makefile.riscv is problem here, as there is just
>
> --- 8< ---------------------------------------------------------------
>
> SUBDIR+= bhyve
> SUBDIR+= bhyvectl
>
> --- 8< ---------------------------------------------------------------
>
>
> while relevant part of usr.sbin/Makefile.aarch64 is
>
> --- 8< ---------------------------------------------------------------
>
> .if ${MK_BHYVE} != "no"
> SUBDIR+= bhyve
> SUBDIR+= bhyvectl
> .endif
>
> --- 8< ---------------------------------------------------------------
>
> and I think that's what usr.sbin/Makefile.riscv should contain.
Indeed, thanks for the report. Fixed in 67f18e8d494f.
Jess