Compiling Archlinux Template failed on make qubes-vm/vmm-xen-vm

156 views
Skip to first unread message

Fariq Omar

unread,
Sep 14, 2016, 9:06:37 AM9/14/16
to qubes...@googlegroups.com
Firstly, I have to edit the 00_prepare.sh to download the latest
archlinux image from kernel.org. Seems like the script was outdated.
But then it was failed once more while 'make qubes-vm or 'make
vmm-xen-vm' due to the problem below. Any help will be appreciated.

--> Archlinux dist-package (makefile)
--> Building package in /home/user/qubes-src/vmm-xen
sudo BACKEND_VMM=xen chroot
"/home/user/qubes-builder/chroot-archlinux" su user -c 'cd
"/home/user/qubes-src/vmm-xen" && cp archlinux/PKGBUILD* ./ && env
http_proxy="" makepkg --syncdeps --noconfirm --skipinteg'
==> Making package: qubes-vm-xen 4.6.1-20 (Wed Sep 14 12:48:13 UTC 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found xen-4.6.1.tar.gz
-> Found series-vm.conf
-> Found apply-patches
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
-> Extracting xen-4.6.1.tar.gz with bsdtar
bsdtar: Failed to set default locale
==> Starting build()...
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i ./patches.misc/qemu-tls-1.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i ./patches.misc/qemu-tls-2.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.qubes/xen-shared-loop-losetup.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.qubes/xen-no-downloads.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.qubes/xen-hotplug-external-store.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.qubes/xen-tools-qubes-vm.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.qubes/vm-0001-hotplug-do-not-attempt-to-remove-containing-xenstore.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.misc/libxc-fix-xc_gntshr_munmap-semantic.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.misc/libvchan-Fix-cleanup-when-xc_gntshr_open-failed.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.misc/0101-libvchan-create-xenstore-entries-in-one-transaction.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.misc/0001-configure-Fix-when-no-libsystemd-compat-lib-are-avai.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.misc/0001-libxc-prefer-using-privcmd-character-device.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.misc/0001-tools-hotplug-Add-native-systemd-xendriverdomain.ser.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.security/xsa155-xen-0003-libvchan-Read-prod-cons-only-once.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.libxl/0001-libxl-trigger-attach-events-for-devices-attached-bef.patch
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i
./patches.misc/0001-systemd-use-standard-dependencies-for-xendriverdomai.patch
/home/user/qubes-src/vmm-xen/PKGBUILD: line 49: autoreconf: command not found
==> ERROR: A failure occurred in build().
Aborting...
/home/user/qubes-builder/qubes-src/builder-archlinux/Makefile.archlinux:120:
recipe for target 'dist-package' failed
make[2]: *** [dist-package] Error 2

Foppe de Haan

unread,
Sep 14, 2016, 9:50:20 AM9/14/16
to qubes-users

pqg

unread,
Sep 14, 2016, 11:05:22 AM9/14/16
to qubes...@googlegroups.com
Fariq Omar:
The script is not outdated so much as incomplete. It merrily assumed
that the final component of the Archlinux release number was a counter,
but I now suspect it's actually the day-of-month. Most months the ISO
is cut on the first day of the month, but this month it was cut on the
third.

You may override the release number without modifying the script by
exporting the following environment variable before building:

export ARCHLINUX_REL_VERSION=2016.09.03

This is, of course, not at all clear to the casual user and a legitimate
bug.

Secondly, as you note, the autoreconf command is missing from the build
chroot. autoreconf is a component of autoconf, and it is sufficient to
add "autoconf" and "automake" or, more succinctly, "base-devel" to the
"pkgs" variable in prepare-chroot-builder. I've not investigated what
changed here, but presumably base-devel used to be present by default or
as a dependency of something else, but ceased to be some time in the
last 9 months (when I last built the Qubes Archlinux template). I've
submitted a trivial pull request to integrate this:

https://github.com/marmarek/qubes-builder-archlinux/pull/12

Alas, having cleared these obstacles, you'll hit another issue noted a
couple of weeks ago in the thread to which Foppe pointed you. This one
was precipitated by the Archlinux update to glibc 2.24 in early August.
2.24 deprecated readlink_r, which is used by (at least) Xen 4.6;
meanwhile, Xen builds with deprecation warnings treated as compilation
errors. The fix went into Xen 4.7 a few months back, but has not been
backported to 4.6.

The work-around reported by Jovan in the other thread involves pointing
at the Xen 4.7 branch of a couple of marmarek's development repos with a
custom builder.conf. I don't know enough about Xen to say whether this
risks weird and wonderful interactions between the client libraries and
the host Xen, but I think the balance of probability is that is should
be okay to talk to an older host with a newer client of the same major
version number.

Let me know how you get on :)

Marek Marczykowski-Górecki

unread,
Sep 14, 2016, 8:29:48 PM9/14/16
to pqg, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Any idea how to fix this properly? While the version in directory name
could be replaced with "latest", but the filename inside still require
version number

> Secondly, as you note, the autoreconf command is missing from the build
> chroot. autoreconf is a component of autoconf, and it is sufficient to
> add "autoconf" and "automake" or, more succinctly, "base-devel" to the
> "pkgs" variable in prepare-chroot-builder. I've not investigated what
> changed here, but presumably base-devel used to be present by default or
> as a dependency of something else, but ceased to be some time in the
> last 9 months (when I last built the Qubes Archlinux template). I've
> submitted a trivial pull request to integrate this:
>
> https://github.com/marmarek/qubes-builder-archlinux/pull/12

Thanks!

> Alas, having cleared these obstacles, you'll hit another issue noted a
> couple of weeks ago in the thread to which Foppe pointed you. This one
> was precipitated by the Archlinux update to glibc 2.24 in early August.
> 2.24 deprecated readlink_r, which is used by (at least) Xen 4.6;
> meanwhile, Xen builds with deprecation warnings treated as compilation
> errors. The fix went into Xen 4.7 a few months back, but has not been
> backported to 4.6.
>
> The work-around reported by Jovan in the other thread involves pointing
> at the Xen 4.7 branch of a couple of marmarek's development repos with a
> custom builder.conf. I don't know enough about Xen to say whether this
> risks weird and wonderful interactions between the client libraries and
> the host Xen, but I think the balance of probability is that is should
> be okay to talk to an older host with a newer client of the same major
> version number.

As for compatibility with the host - it should be fine. There may be
minor problems with communicating with other in-VM components (gui-agent,
qrexec-agent etc), but there is a big chance that it will simply work.

> Let me know how you get on :)
>

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJX2et3AAoJENuP0xzK19cs93AH/3vQt8SAxzEcItDsyyxcCkVa
t0GirBw0lFAFrVdMbdjdV+k8e5NCFYhzAMFgZxItFrKx19b2SUYLAMzV5lHHqh4B
K3b1gIWpgzhTMDKLYSx4fCn2hw7CuKoqcciwFx4zuYSBzvdts1mfefF+49RAlQzK
9Z42Bl2WSjrbiow72HlHStvxJ7J6hIjFhf8IpAiairpoVuQj5XwAs6x8iJ9NfYzO
xhSudIYHccMcYCOIvh80vYt4OOFYMwRW8xY8ewGhDwtXLOn7pT1bebfKMj7p2ZvV
gdlzojDq/AxfeaI9KMU2nWdFv/+P/4jYI15fR3/e5wesqx6JHOlaC+R7234xfzs=
=vvbP
-----END PGP SIGNATURE-----

necrokulto

unread,
Sep 15, 2016, 11:14:55 AM9/15/16
to qubes-users, p...@riseup.net
I've already follow the workaround, but still have another problem persist on 'gui-agent-linux-vm' while 'make qubes-vm' below:

: Starting full system upgrade...
there is nothing to do
--> Archlinux dist-package (makefile)
--> Building package in /home/user/qubes-src/gui-agent-linux
sudo BACKEND_VMM=xen chroot "/home/user/qubes-builder/chroot-archlinux" su user -c 'cd "/home/user/qubes-src/gui-agent-linux" && cp archlinux/PKGBUILD* ./ && env http_proxy="" makepkg --syncdeps --noconfirm --skipinteg'
==> Making package: qubes-vm-gui 3.1.7-5 (Thu Sep 15 14:27:41 UTC 2016)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: pulseaudio<9.0
==> ERROR: 'pacman' failed to install missing dependencies.
/home/user/qubes-builder/qubes-src/builder-archlinux/Makefile.archlinux:120: recipe for target 'dist-package' failed
make[2]: *** [dist-package] Error 1





BTW, there's another error before that on 'gui-agent-linux', but I already solved it by installing 'xorg-server' package by using pacman on chroot-archlinux. By modifying the 'PKGBUILD' to solve the 'pulseaudio<9.0' version issues bring me another error like this:



gcc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -Wno-deprecated-declarations -I../include/ `pkg-config --cflags vchan-xen` -g -Wall -Wextra -Werror -pie -fPIC -DUSE_XENSTORE_H -D_FORTIFY_SOURCE=2 -c -o ../gui-common/error.o ../gui-common/error.c
../gui-common/error.c: In function ‘dummy_handler’:
../gui-common/error.c:37:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (!print_x11_errors)
^~
../gui-common/error.c:40:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
XGetErrorText(dpy, ev->error_code, buf, sizeof(buf));
^~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [<builtin>: ../gui-common/error.o] Error 1
make[1]: Leaving directory '/home/user/qubes-src/gui-agent-linux/gui-agent'
make: *** [Makefile:50: gui-agent/qubes-gui] Error 2
==> ERROR: A failure occurred in build().
Aborting...
/home/user/qubes-builder/qubes-src/builder-archlinux/Makefile.archlinux:120: recipe for target 'dist-package' failed
make[2]: *** [dist-package] Error 2

Any help?

necrokulto

unread,
Sep 16, 2016, 2:36:44 AM9/16/16
to qubes-users
Start recompiling it again by deleted all the folders. Now i get different error like Jovan (https://groups.google.com/forum/?nomobile=true#!msg/qubes-users/43cDUEWz8M4/wFO8F_rPAQAJ;context-place=forum/qubes-users)

==> Starting build()...
+ patch -s -F0 -E -p1 --no-backup-if-mismatch -i ./patches.misc/qemu-tls-1.patch

patch: **** Can't open patch file ./patches.misc/qemu-tls-1.patch : No such file or directory
++ echo '*** patch ./patches.misc/qemu-tls-1.patch failed ***'
*** patch ./patches.misc/qemu-tls-1.patch failed ***

==> ERROR: A failure occurred in build().
Aborting...
/home/user/qubes-builder/qubes-src/builder-archlinux/Makefile.archlinux:120: recipe for target 'dist-package' failed
make[2]: *** [dist-package] Error 2

Makefile.generic:139: recipe for target 'packages' failed
make[1]: *** [packages] Error 1
Makefile:208: recipe for target 'vmm-xen-vm' failed
make: *** [vmm-xen-vm] Error 1

Not sure of what does he meant by "tweaks in the series.conf file of vmm-xen". I already add the 'patches.misc/qemu-tls-1.patch' there but I still got the same error again and again.

Any clue anyone?

necrokulto

unread,
Sep 17, 2016, 4:27:09 AM9/17/16
to qubes-users
Successfully built the Archlinux template with xen-4.7 but needs to comment some patches-set that's not available on the vmm-xen folder, set cflags to ignore indentation error and clone pulsecore-8 to pulsecore-9 (since this file not available). I'm not sure if this trick will get me more trouble in the future or not. If anyone have better solution, come forward and tell me yours.
Reply all
Reply to author
Forward
0 new messages