GNU bug report logs - #39402
set-xorg-configuration pulls in unsupported packages on target architecture

Previous Next

Package: guix;

Reported by: shtwzrd <shtwzrd <at> protonmail.com>

Date: Mon, 3 Feb 2020 01:23:01 UTC

Severity: normal

Done: Jakub Kądziołka <kuba <at> kadziolka.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39402 in the body.
You can then email your comments to 39402 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#39402; Package guix. (Mon, 03 Feb 2020 01:23:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to shtwzrd <shtwzrd <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 03 Feb 2020 01:23:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: shtwzrd <shtwzrd <at> protonmail.com>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: set-xorg-configuration pulls in unsupported packages on target
 architecture
Date: Mon, 03 Feb 2020 01:22:16 +0000
Howdy :),

I've found that the `set-xorg-configuration` service ends up pulling in `xf86-video-intel` as a dependency. But `xf86-video-intel` fails to build, with:

```
checking whether to include UXA support... no
checking whether to include SNA support... auto
checking for xvmc dri2proto x11 x11-xcb xcb-dri2 xcb-aux libdrm_intel... no
checking whether to include XvMC support... no
checking which acceleration method to use by default... configure: error: UXA requested as default, but is not enabled
command "/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/bash" "./configure" "CONFIG_SHELL=/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/bash" "SHELL=/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/bash" "--prefix=/gnu/store/grlry4nmhxmb2ahlbpzdvyy33wgnh87h-xf86-video-intel-2.99.917-15.f66d395" "--enable-fast-install" "--build=aarch64-unknown-linux-gnu" "--with-default-accel=uxa" failed with status 1
```

What's more, the package definition for xf86-video-intel contains this:

```
(supported-systems
       ;; This driver is only supported on Intel systems.
       (filter (lambda (system) (or (string-prefix? "i686-" system)
                                    (string-prefix? "x86_64-" system)))
               %supported-systems))
```

So it seems like it's a bug that it currently gets included on non i686 and x86_64 targets.

Even if I supply a modules field in set-xorg-configuration where I exclude `xf86-video-intel`, guix still tries to build it.

The only reference to `xf86-video-intel` is its inclusion in %default-xorg-modules -- would making the contents of that list target-aware be a potential fix?




Information forwarded to bug-guix <at> gnu.org:
bug#39402; Package guix. (Tue, 04 Feb 2020 11:06:01 GMT) Full text and rfc822 format available.

Message #8 received at 39402 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: shtwzrd <shtwzrd <at> protonmail.com>
Cc: 39402 <at> debbugs.gnu.org
Subject: Re: bug#39402: set-xorg-configuration pulls in unsupported packages
 on target architecture
Date: Tue, 4 Feb 2020 13:05:21 +0200
[Message part 1 (text/plain, inline)]
On Mon, Feb 03, 2020 at 01:22:16AM +0000, shtwzrd via Bug reports for GNU Guix wrote:
> Howdy :),
> 
> I've found that the `set-xorg-configuration` service ends up pulling in `xf86-video-intel` as a dependency. But `xf86-video-intel` fails to build, with:
> 
> ```
> checking whether to include UXA support... no
> checking whether to include SNA support... auto
> checking for xvmc dri2proto x11 x11-xcb xcb-dri2 xcb-aux libdrm_intel... no
> checking whether to include XvMC support... no
> checking which acceleration method to use by default... configure: error: UXA requested as default, but is not enabled
> command "/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/bash" "./configure" "CONFIG_SHELL=/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/bash" "SHELL=/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/bash" "--prefix=/gnu/store/grlry4nmhxmb2ahlbpzdvyy33wgnh87h-xf86-video-intel-2.99.917-15.f66d395" "--enable-fast-install" "--build=aarch64-unknown-linux-gnu" "--with-default-accel=uxa" failed with status 1
> ```
> 
> What's more, the package definition for xf86-video-intel contains this:
> 
> ```
> (supported-systems
>        ;; This driver is only supported on Intel systems.
>        (filter (lambda (system) (or (string-prefix? "i686-" system)
>                                     (string-prefix? "x86_64-" system)))
>                %supported-systems))
> ```
> 
> So it seems like it's a bug that it currently gets included on non i686 and x86_64 targets.
> 
> Even if I supply a modules field in set-xorg-configuration where I exclude `xf86-video-intel`, guix still tries to build it.

Can you share your config? We might be able to work around it for now.

> The only reference to `xf86-video-intel` is its inclusion in %default-xorg-modules -- would making the contents of that list target-aware be a potential fix?

That sounds like a good long-term solution, to only include modules
which are appropriate for that architecture.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#39402; Package guix. (Sat, 08 Feb 2020 09:32:02 GMT) Full text and rfc822 format available.

Message #11 received at 39402 <at> debbugs.gnu.org (full text, mbox):

From: shtwzrd <shtwzrd <at> protonmail.com>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: "39402 <at> debbugs.gnu.org" <39402 <at> debbugs.gnu.org>
Subject: Re: bug#39402: set-xorg-configuration pulls in unsupported packages
 on target architecture
Date: Sat, 08 Feb 2020 09:30:57 +0000
I did a little bit more experimenting and can see it's not set-xorg-configuration that is the problem, it goes deeper.

Perhaps it's `xorg-configuration` itself?

Here's my full config at the minute, now trying with `xorg-start-command`, which has the same problem:

```
(use-modules (guix download)
	     (guix git-download)
	     (guix packages)
	     (gnu)
	     (gnu bootloader u-boot)
	     (gnu packages linux)
	     (gnu packages bootloaders)
	     (gnu packages libusb)
	     (gnu packages certs)
	     (gnu packages bootloaders)
	     (gnu packages suckless)
	     (gnu packages xdisorg)
	     (gnu packages gnome)
	     (gnu packages xorg)
	     (gnu services xorg)
	     (gnu services dbus)
	     (gnu services sound)
	     (gnu services networking)
	     (gnu services avahi)
	     (gnu services desktop)
	     (guix build-system trivial))
(use-service-modules desktop)

;; bootloader ---
(define-public u-boot-pinebook-pro-rk3399
  (let ((base (make-u-boot-package "pinebook_pro-rk3399" "aarch64-linux-gnu")))
    (package
     (inherit base)
     (source (origin
	      (method url-fetch)
	      (uri (string-append
		    "ftp://ftp.denx.de/pub/u-boot/"
		    "u-boot-" (package-version base)".tar.bz2"))
	      (sha256
	       (base32
		"1w9ml4jl15q6ixpdqzspxjnl7d3rgxd7f99ms1xv5c8869h3qida"))
	      ;; need a rather large patch, based on commit:
	      ;; 3034b8864e47bfbf6f0330dc67620a2a71cfe3f8
	      ;; from git.eno.space/pbp-uboot.git
	      (patches '("./patches/uboot-pinebook-pro-rk3399.patch"))))
     (arguments
      (substitute-keyword-arguments
       (package-arguments base)
       ((#:phases phases)
	`(modify-phases ,phases
			(add-after
			 'unpack 'set-environment
			 (lambda* (#:key inputs #:allow-other-keys)
			   (setenv "BL31" (string-append (assoc-ref inputs "firmware")
							 "/bl31.elf"))
			   #t))
			;; Phases do not succeed on the bl31 ELF.
			(delete 'strip)
			(delete 'validate-runpath)))))
     (native-inputs
      `(("firmware" ,arm-trusted-firmware-rk3399)
	,@(package-native-inputs base))))))

(define u-boot-pinebook-pro-bootloader
  (bootloader
   (inherit u-boot-rockpro64-rk3399-bootloader)
   (package u-boot-pinebook-pro-rk3399)))

					;(define u-boot-pinebookpro-rk3399-bootloader
;; SD and eMMC use the same format
					;  (bootloader
					;   (inherit u-boot-bootloader)
					;   (package u-boot-rockpro64-rk3399)
					;   (installer install-rockpro64-rk3399-u-boot)))

;; linux kernel ---
(define kernel-config
  (string-append (dirname (current-filename)) "/kernel.config"))

;; we need a custom patched kernel for now
;; hopefully the changes get mainlined soon
(define linux-pbp
  (let ((repo "gitlab.manjaro.org/tsys/linux-pinebook-pro")
	(commit "b262e709c608c1a5acefca280a2899acab9a802b")
	(revision "3"))
    (package
     (inherit linux-libre)
     (name "linux-pbp")
     (version (git-version "5.5.0" revision commit))
     (native-inputs
      `(("kconfig" ,kernel-config)
	,@(assoc-remove! (package-native-inputs linux-libre) "kconfig")))
     (source (origin
	      (method url-fetch)
	      (uri (string-append
		    "https://" repo "/repository/archive.tar.gz?ref=" commit))
	      (sha256
	       (base32
		"087qla48jqwa1bwn6d3qriizjfnv2xvl7q8akjmrkgfa46a5lrxr")))))))


(operating-system
 (kernel linux-pbp)
 (host-name "pinebook-pro")
 (timezone "Europe/Copenhagen")
 (locale "en_US.utf8")
 (keyboard-layout (keyboard-layout "us" "altgr-intl"))

 (bootloader
  (bootloader-configuration
   (target "/dev/mmcblk1boot0")
   (bootloader u-boot-pinebook-pro-bootloader)))

 (initrd-modules '()); (delq "ahci" %base-initrd-modules))

 (file-systems (append
		(list
		 (file-system
		  (device "/dev/mmcblk1p1")
		  (mount-point "/boot")
		  (type "vfat"))
		 (file-system
		  (device "/dev/mmcblk1p2")
		  (mount-point "/")
		  (type "ext4")))
		%base-file-systems))

 ;; This is where user accounts are specified.  The "root"
 ;; account is implicit, and is initially created with the
 ;; empty password.
 (users
  (cons
   (user-account
    (name "rock")
    (group "users")

    ;; Adding the account to the "wheel" group
    ;; makes it a sudoer.  Adding it to "audio"
    ;; and "video" allows the user to play sound
    ;; and access the webcam.
    (supplementary-groups '("wheel"
			    "audio" "video")))
   %base-user-accounts))

 ;; Globally-installed packages.
 (packages (append
	    (list
	     nss-certs)
	    %base-packages))

 (services (append
	    (list
	     ;; desktop environment and xorg config
	     (service xfce-desktop-service-type)
					;	      slim-service-type)
	     (simple-service 'startx-file
			     special-files-service-type
			     (let
				 ((startx
				   (xorg-start-command
				    (xorg-configuration
				     (keyboard-layout keyboard-layout)
				     (extra-config
				      '(
					;; small fix for the trackpad, as described on wiki.pine64.org
					"Section \"InputClass\"
                        		     Identifier \"touchpad catchall\"
                           		     Driver \"synaptics\"
                         		     MatchIsTouchpad \"on\"
                              		     MatchDevicePath \"/dev/input/event*\"
                           		     Option \"MinSpeed\" \"0.25\"
                                	 EndSection"))))))
			       `(("/bin/startx" ,(file-append startx "/bin/startx")))))

	     (screen-locker-service slock)
	     (screen-locker-service xlockmore "xlock")

	     ;; Add udev rules for MTP devices so that non-root users can access
	     ;; them.
	     (simple-service 'mtp udev-service-type (list libmtp))

	     ;; network management
	     (service network-manager-service-type)
	     (service wpa-supplicant-service-type)
	     (simple-service 'network-manager-applet
			     profile-service-type
			     (list network-manager-applet))
	     (service modem-manager-service-type)

	     (service usb-modeswitch-service-type)
	     (service avahi-service-type)
	     (udisks-service)
	     (service upower-service-type)
	     (service cups-pk-helper-service-type)
	     (geoclue-service)
	     (service polkit-service-type)
	     (elogind-service)
	     (dbus-service)
	     (service ntp-service-type)
	     x11-socket-directory-service
	     (service alsa-service-type))
	    %base-services))

 ;; Allow resolution of '.local' host names with mDNS.
 (name-service-switch %mdns-host-lookup-nss))
```

I wonder, does the use of `default` in `xorg-configuration` cause the default provided parameters to be evaluated and included even when the given field was initialized with a different value?

I want to try to fix this in guix but my knowledge of the project and guile are limited at the moment.

Alternatively, are there any cute workarounds I could do? I tried to find a way to do a package replacement but I couldn't see how ot make it work in this case, where the package is pulled in by a service somehow and doesn't provide a way to configure what it uses.

Thanks for helping. :)


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, February 4, 2020 11:05 AM, Efraim Flashner <efraim <at> flashner.co.il> wrote:

> On Mon, Feb 03, 2020 at 01:22:16AM +0000, shtwzrd via Bug reports for GNU Guix wrote:
>
> > Howdy :),
> > I've found that the `set-xorg-configuration` service ends up pulling in `xf86-video-intel` as a dependency. But `xf86-video-intel` fails to build, with:
> >
> >     checking whether to include UXA support... no
> >     checking whether to include SNA support... auto
> >     checking for xvmc dri2proto x11 x11-xcb xcb-dri2 xcb-aux libdrm_intel... no
> >     checking whether to include XvMC support... no
> >     checking which acceleration method to use by default... configure: error: UXA requested as default, but is not enabled
> >     command "/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/bash" "./configure" "CONFIG_SHELL=/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/bash" "SHELL=/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/bash" "--prefix=/gnu/store/grlry4nmhxmb2ahlbpzdvyy33wgnh87h-xf86-video-intel-2.99.917-15.f66d395" "--enable-fast-install" "--build=aarch64-unknown-linux-gnu" "--with-default-accel=uxa" failed with status 1
> >
> >
> > What's more, the package definition for xf86-video-intel contains this:
> >
> >     (supported-systems
> >            ;; This driver is only supported on Intel systems.
> >            (filter (lambda (system) (or (string-prefix? "i686-" system)
> >                                         (string-prefix? "x86_64-" system)))
> >                    %supported-systems))
> >
> >
> > So it seems like it's a bug that it currently gets included on non i686 and x86_64 targets.
> > Even if I supply a modules field in set-xorg-configuration where I exclude `xf86-video-intel`, guix still tries to build it.
>
> Can you share your config? We might be able to work around it for now.
>
> > The only reference to `xf86-video-intel` is its inclusion in %default-xorg-modules -- would making the contents of that list target-aware be a potential fix?
>
> That sounds like a good long-term solution, to only include modules
> which are appropriate for that architecture.
>
> -------------------------------------------------------------------------------------------------------------------
>
> Efraim Flashner efraim <at> flashner.co.il אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted






Reply sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
You have taken responsibility. (Sat, 15 Feb 2020 23:05:01 GMT) Full text and rfc822 format available.

Notification sent to shtwzrd <shtwzrd <at> protonmail.com>:
bug acknowledged by developer. (Sat, 15 Feb 2020 23:05:01 GMT) Full text and rfc822 format available.

Message #16 received at 39402-done <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: shtwzrd <shtwzrd <at> protonmail.com>
Cc: 39402-done <at> debbugs.gnu.org, 39535-done <at> debbugs.gnu.org
Subject: Re: [PATCH] services: xorg: Filter modules based on system
Date: Sun, 16 Feb 2020 00:04:42 +0100
[Message part 1 (text/plain, inline)]
On Sun, Feb 09, 2020 at 09:31:09PM +0000, shtwzrd wrote:
> @@ -356,7 +361,7 @@ in @var{config}, are available.  The result should be used in place of
>      #~(apply execl #$X #$X ;; Second #$X is for argv[0].
>               "-logverbose" "-verbose" "-terminate"
>               #$@(xorg-configuration-server-arguments config)
> -              (cdr (command-line))))
> +             (cdr (command-line))))
>  
>    (program-file "startx" exp))
>  
> @@ -477,7 +482,7 @@ desktop session from the system or user profile will be used."
>    (auto-login? slim-configuration-auto-login?
>                 (default #f))
>    (default-user slim-configuration-default-user
> -                (default ""))
> +    (default ""))
>    (theme slim-configuration-theme
>           (default %default-slim-theme))
>    (theme-name slim-configuration-theme-name
> @@ -870,10 +875,10 @@ the GNOME desktop environment.")
>                     "Enable=" (if (gdm-configuration-debug? config)
>                                   "true"
>                                   "false") "\n"
> -                   "\n"
> -                   "[security]\n"
> -                   "#DisallowTCP=true\n"
> -                   "#AllowRemoteAutoLogin=false\n"))
> +                                 "\n"
> +                                 "[security]\n"
> +                                 "#DisallowTCP=true\n"
> +                                 "#AllowRemoteAutoLogin=false\n"))
>  
>  (define (gdm-pam-service config)
>    "Return a PAM service for @command{gdm}."
Looks like you reformatted the file by accident. Apart from that, LGTM,
so pushed as 779d96c9b0ee38cbaca9f8577e6cc7f907fb29cb after removing the
formatting mishap.

Thanks for the patch!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 15 Mar 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.