The main host is FreeBSD 13, I created a VM to run FreeBSD and have Poudriere on it, for this, I am using vm-bhyve, here is the config of the VM:
I created the VM using FreeBSD-13.2-RELEASE-amd64-disc1.iso, which currently is up and running:
I updated the sources and wanted to build workd an kernel, for this I am using this script:
But it keeps failing giving errors like:
In the VM I don't have anything in /etc/make.conf or /etc/src.conf
Any ideas of what could be wrong? just in case running the same script in the main host works, but for an unknown reason, I can't make it work within Bhyve.
Code:
loader="bhyveload"
cpu=8
memory=32G
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0"
disk0_dev="sparse-zvol"
uuid="e4937ac8-0a24-11ee-b769-a85e451113f8"
network0_mac="58:9c:fc:02:b7:a1"
I created the VM using FreeBSD-13.2-RELEASE-amd64-disc1.iso, which currently is up and running:
Code:
FreeBSD test 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64
I updated the sources and wanted to build workd an kernel, for this I am using this script:
Code:
#!/bin/sh
FREEBSD_VERSION=13
NUMBER_OF_CORES=`sysctl -n hw.ncpu`
ZPOOL="zroot"
START=$(date +%s)
if [ `sysctl -n kern.securelevel` -gt 0 ]; then
sysrc kern_securelevel_enable="NO"
echo "need to reboot with securelevel 0"
exit
fi
write() {
echo -e '\e[0;32m'
echo \#----------------------------------------------------------------------------
echo \# $1
echo -e \#----------------------------------------------------------------------------'\e[0m'
}
cd /usr/src
write "Checking out and updating sources FreeBSD: ${FREEBSD_VERSION}"
git pull
# Exit immediately if a command exits with a non-zero exit status
set -e
write "building world"
make -j${NUMBER_OF_CORES} buildworld
write "building kernel"
make -j${NUMBER_OF_CORES} kernel
zfs set exec=on ${ZPOOL}/tmp
write "installing world"
make installworld
write "making distribution"
cp -R /etc /etc.old && cd /usr/src && make distribution DESTDIR=/
write "backup /etc"
(cd /etc.old && cp group passwd master.passwd /etc && pwd_mkdb /etc/master.passwd)
cp /etc.old/ssh/sshd_config /etc/ssh/
write "deleting old"
make -DBATCH_DELETE_OLD_FILES delete-old
END=$(date +%s)
DIFF=$(echo "$END - $START" | bc)
ELAPSED=$(printf '%02dh:%02dm:%02ds\n' $(($DIFF/3600)) $(($DIFF%3600/60)) $(($DIFF%60)))
write "Done in: $ELAPSED, rebot and then \"yes | make delete-old-libs\""
But it keeps failing giving errors like:
Code:
--- xz_make ---
(cd /usr/src/rescue/rescue/../../usr.bin/xz && make MK_PIE=no NO_SHARED=yes -DRESCUE CRUNCH_CFLAGS=-DRESCUE CRUNCH_CFLAGS+=-I/usr/obj/usr/src/amd64.amd64/lib/libifconfig CRUNCH_CFLAGS+=-I/usr/obj/usr/src/amd64.amd64/lib/libiscsiutil MK_AUTO_OBJ=yes DIRPRFX=rescue/rescue/xz/ depend && make MK_PIE=no NO_SHARED=yes -DRESCUE CRUNCH_CFLAGS=-DRESCUE CRUNCH_CFLAGS+=-I/usr/obj/usr/src/amd64.amd64/lib/libifconfig CRUNCH_CFLAGS+=-I/usr/obj/usr/src/amd64.amd64/lib/libiscsiutil MK_AUTO_OBJ=yes DIRPRFX=rescue/rescue/xz/ args.o coder.o file_io.o hardware.o list.o main.o message.o mytime.o options.o signals.o suffix.o util.o tuklib_open_stdxxx.o tuklib_progname.o tuklib_exit.o tuklib_cpucores.o tuklib_mbstr_width.o tuklib_mbstr_fw.o)
--- .depend ---
echo xz.full: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libc.a /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/liblzma.a /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libmd.a /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libpthread.a >> .depend
--- args.o ---
cc -target x86_64-unknown-freebsd13.2 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -fno-common -DHAVE_CONFIG_H -I/usr/src/lib/liblzma -I/usr/src/contrib/xz/src/common -DRESCUE -I/usr/obj/usr/src/amd64.amd64/lib/libifconfig -I/usr/obj/usr/src/amd64.amd64/lib/libiscsiutil -MD -MF.depend.args.o -MTargs.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable -Wno-error=array-parameter -Wno-error=deprecated-non-prototype -Wno-error=unused-but-set-parameter -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Qunused-arguments -c /usr/src/contrib/xz/src/xz/args.c -o args.o
--- all_subdir_kerberos5 ---
/usr/src/crypto/heimdal/kadmin/util.c:138:5: error: call to undeclared function 'get_response'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
if(get_response("Attributes", buf, resp, sizeof(resp)) != 0)
^
/usr/src/crypto/heimdal/kadmin/util.c:138:5: note: did you mean 'get_rmsponse'?
/usr/src/crypto/heimdal/kadmin/util.c:43:1: note: 'get_rmsponse' declared here
get_rmsponse(const char *prompt, const char *def, char *buf, size_t len);
^
/usr/src/crypto/heimdal/kadmin/util.c:268:5: error: call to undeclared function 'get_response'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
if(get_response(prompt, buf, resp, sizeof(resp)) != 0)
^
/usr/src/crypto/heimdal/kadmin/util.c:354:5: error: call to undeclared function 'get_response'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
if(get_response(prompt, buf, resp, sizeof(resp)) != 0)
^
/usr/src/crypto/heimdal/kadmin/util.c:580:1: error: static declaration of 'get_response' follows non-static declaration
get_response(const char *prompt, const char *def, char *buf, size_t len)
^
/usr/src/crypto/heimdal/kadmin/util.c:138:5: note: previous implicit declaration is here
if(get_response("Attributes", buf, resp, sizeof(resp)) != 0)
^
4 errors generated.
*** [util.o] Error code 1
make[5]: stopped in /usr/src/kerberos5/usr.bin/kadmin
--- all_subdir_sbin ---
make[2]: stopped in /usr/src
--- all_subdir_kerberos5 ---
make[2]: stopped in /usr/src
--- all_subdir_rescue ---
make[3]: stopped in /usr/src/rescue
--- all_subdir_lib ---
make[2]: stopped in /usr/src
--- all_subdir_rescue ---
make[2]: stopped in /usr/src
make[1]: stopped in /usr/src
make: stopped in /usr/src
In the VM I don't have anything in /etc/make.conf or /etc/src.conf
Any ideas of what could be wrong? just in case running the same script in the main host works, but for an unknown reason, I can't make it work within Bhyve.