guestfs-tools build issues
by Cole Robinson
Hi Rich, I've consistently been hitting issues with guestfs-tools
builds. I have workarounds but they are annoying.
1) With a fresh checkout I run:
$ git submodule init
$ git submodule update
$ autoreconf -if
$ ./configure
$ make -j8
I will get these errors:
make[3]: Entering directory '/home/crobinso/src/guestfs-tools/builder'
GEN virt-builder
GEN virt-builder-repository
/usr/bin/ld: virt_builder_repository-index-scan.o: relocation
R_X86_64_32S against `.rodata' can not be used when making a PIE object;
recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking (exit code 1)
make[3]: *** [Makefile:1261: virt-builder-repository] Error 2
make[3]: *** Waiting for unfinished jobs....
/usr/bin/ld: virt_builder-index-scan.o: relocation R_X86_64_32S against
`.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking (exit code 1)
make[3]: *** [Makefile:1257: virt-builder] Error 2
make[3]: Leaving directory '/home/crobinso/src/guestfs-tools/builder'
I can fix it with `make -j8 CFLAGS="-fPIE -fPIC"` but only after doing a
full `make clean`.
2) If I make a trivial change in common/, like adding whitespace in
common/mlcustomize/customize_run.ml, subsequent guestfs-tools build will
failu with:
make[2]: Entering directory '/home/crobinso/src/guestfs-tools/customize'
GEN virt-customize
File "_none_", line 1:
Error: Files customize_main.cmx and ../common/mlcustomize/mlcustomize.cmxa
make inconsistent assumptions over implementation Customize_run
Again, a `make clean` and rebuild will fix it.
Are these expected, or is something wrong with my environment? Host is
Fedora 41
Thanks,
Cole
4 weeks, 1 day
Supermin errors with symlinked /etc directories
by Leon Blakey
Host has various /etc directories symlinked to a config git repo. Running "virt-filesystems -a ./somevm.qcow2" fails with parent directory not found. Commands ran as root. Filesystem is ZFS and /etc is same dataset as /.
Can Workaround by replacing symlink with regular copied directory.
OS: Debian Sid
virt-filesystems 1.52.3
supermin 5.2.2
Reproduce, command is from above virt-filesystems with "LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1"
$ rm -r /var/tmp/.guestfs-0
$ /usr/bin/supermin --build --verbose --if-newer --lock /var/tmp/.guestfs-0/lock --copy-kernel -f ext2 --host-cpu x86_64 /usr/lib/x86_64-linux gnu/guestfs/supermin.d -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.2.2
supermin: package handler: debian/dpkg
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-hfsplus type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-reiserfs type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-xfs type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 235 packages, including dependencies
supermin: build: 10764 files
supermin: build: 5622 files, after matching excludefiles
supermin: build: 5634 files, after adding hostfiles
supermin: build: 5634 files, after removing unreadable files
supermin: build: 5649 files, after munging
supermin: kernel: looking for kernel using environment variables ...
supermin: kernel: looking for kernels in /lib/modules/*/vmlinuz ...
supermin: kernel: looking for kernels in /boot ...
supermin: kernel: kernel version of /boot/vmlinuz-6.12.21-amd64 = 6.12.21-amd64 (from content)
supermin: kernel: picked modules path /lib/modules/6.12.21-amd64
supermin: kernel: kernel version of /boot/vmlinuz-6.12.16-amd64 = 6.12.16-amd64 (from content)
supermin: kernel: picked modules path /lib/modules/6.12.16-amd64
supermin: kernel: kernel version of /boot/vmlinuz-6.12.13-amd64 = 6.12.13-amd64 (from content)
supermin: kernel: picked modules path /lib/modules/6.12.13-amd64
supermin: kernel: picked vmlinuz /boot/vmlinuz-6.12.21-amd64
supermin: kernel: kernel_version 6.12.21-amd64
supermin: kernel: modpath /lib/modules/6.12.21-amd64
supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-0/appliance.d.teh80a96/root'
supermin: ext2: populating from base image
supermin: *** parent directory not found ***
supermin: When reporting this error:
supermin: please include ALL the debugging information below
supermin: AND tell us what system you are running this on.
src=/var/tmp/superminaa2b2a.tmpdir/base.d/etc/udev/udev.conf
dest=/etc/udev/udev.conf
dirname=/holo/hosts/lyoko/etc/udev
basename=udev.conf
supermin: ext2fs_namei: parent directory not found: /holo/hosts/lyoko/etc/udev: File not found by ext2_lookup
supermin: failure: ext2fs_namei: parent directory not found
Did workaround with udev, next SSH fails. Logs are the same up to this point
supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-0/appliance.d.3zru7brm/root'
supermin: ext2: populating from base image
supermin: *** parent directory not found ***
supermin: When reporting this error:
supermin: please include ALL the debugging information below
supermin: AND tell us what system you are running this on.
src=/var/tmp/superminb70190.tmpdir/base.d/etc/ssh/ssh_config
dest=/etc/ssh/ssh_config
dirname=/holo/hosts/lyoko/etc/ssh
basename=ssh_config
supermin: ext2fs_namei: parent directory not found: /holo/hosts/lyoko/etc/ssh: File not found by ext2_lookup
supermin: failure: ext2fs_namei: parent directory not found
1 month